Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][IMP] l10n_it_intrastat: added intrastat country origin on product and category #3256

Merged

Conversation

Borruso
Copy link
Contributor

@Borruso Borruso commented Apr 5, 2023

--
Confermo di aver firmato il CLA https://odoo-community.org/page/cla e di aver letto le linee guida su https://odoo-community.org/page/contributing

@Borruso Borruso changed the title [ADD] l10n_it_intrastat: aggiunto paese di origine su prodotto e categoria [14.0][ADD] l10n_it_intrastat: aggiunto paese di origine su prodotto e categoria Apr 5, 2023
@Borruso Borruso force-pushed the 14.0-add_origin_country-l10n_it_intrastat branch from 3d048cc to 50f1a3c Compare April 5, 2023 16:08
Copy link

@baba75 baba75 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

testato su v. 14.0 e funziona

@Borruso Borruso force-pushed the 14.0-add_origin_country-l10n_it_intrastat branch 2 times, most recently from 5e8131d to 11455e5 Compare April 6, 2023 08:25
@Borruso Borruso force-pushed the 14.0-add_origin_country-l10n_it_intrastat branch 2 times, most recently from 00fbd20 to c8b4dd5 Compare July 3, 2023 15:57
@Borruso Borruso requested a review from baba75 July 3, 2023 15:58
@Borruso Borruso force-pushed the 14.0-add_origin_country-l10n_it_intrastat branch from c8b4dd5 to 162261d Compare July 4, 2023 07:57
@Borruso Borruso force-pushed the 14.0-add_origin_country-l10n_it_intrastat branch from 162261d to 5973c3e Compare July 28, 2023 09:45
Copy link
Contributor

@andreampiovesana andreampiovesana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Borruso Borruso force-pushed the 14.0-add_origin_country-l10n_it_intrastat branch from 5973c3e to 467b291 Compare September 14, 2023 08:57
@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

country_good_origin_id = self.move_id.company_id.partner_id.country_id
elif self.move_id.is_purchase_document():
country_good_origin_id = self.move_id.partner_id.country_id
else:
country_good_origin_id = self.env["res.country"].browse()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perché .browse()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

se vedi alla riga 146 del codice attuale come default era impostato così
non l'avevo notato è corretto senza

@Borruso Borruso force-pushed the 14.0-add_origin_country-l10n_it_intrastat branch from 467b291 to 141568e Compare September 15, 2023 15:34
@Borruso Borruso requested a review from TheMule71 October 8, 2023 17:01
@Borruso
Copy link
Contributor Author

Borruso commented Oct 8, 2023

testato su v. 14.0 e funziona

@baba75 scusami forse per errore hai selezionato l'opzione di requesta changes, ma il commento lasciato è positivo.
puoi rifare il commento selezionando approvazione?

Copy link
Contributor

@FrancescoBallerini FrancescoBallerini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ho testato la funzionalità "Recompute intrastat Lines": Premetto che non sono certo lato funzionale di come debba essere impostato il country_origin_id rispetto al country_good_origin_id su questo campo. Attualmente in intrastat_line_ids se si usa la funzione "Recompute intrastat Lines" viene impostato il paese del partner, non del prodotto.

Se mi confermate che questo è il comportamento corretto, e che quindi i check evidenziati dalla review non devono essere portati anche in _prepare_intrastat_line_country_origin la funzionalità testata per me è approvata 👍

Comment on lines +146 to +161
if self.mapped("product_id.product_tmpl_id.intrastat_country_origin_id"):
country_good_origin_id = (
self.product_id.product_tmpl_id.intrastat_country_origin_id
)
elif self.mapped(
"product_id.product_tmpl_id.categ_id.intrastat_country_origin_id"
):
country_good_origin_id = (
self.product_id.product_tmpl_id.categ_id.intrastat_country_origin_id
)
elif self.move_id.is_sale_document():
country_good_origin_id = self.move_id.company_id.partner_id.country_id
elif self.move_id.is_purchase_document():
country_good_origin_id = self.move_id.partner_id.country_id
else:
country_good_origin_id = self.env["res.country"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prima invece di code-review ho erroneamente lasciato un commento generico: #3256 (review) sono questi i checks di cui chiedevo conferma, se è giusto che rimangano solo qui o se sono da da portare anche in in _prepare_intrastat_line_country_origin

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

è giusto che il controllo sia solo in good origin che indica il paese di origine della merce l'altra funzione e per la destinazione

@francesco-ooops francesco-ooops changed the title [14.0][ADD] l10n_it_intrastat: aggiunto paese di origine su prodotto e categoria [14.0][IMP] l10n_it_intrastat: aggiunto paese di origine su prodotto e categoria Dec 20, 2023
@francesco-ooops
Copy link
Contributor

@Borruso issue?

@Borruso Borruso force-pushed the 14.0-add_origin_country-l10n_it_intrastat branch from 141568e to 69fffc2 Compare January 19, 2024 09:18
Copy link
Contributor

@andreampiovesana andreampiovesana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@FrancescoBallerini FrancescoBallerini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Borruso Borruso force-pushed the 14.0-add_origin_country-l10n_it_intrastat branch from 69fffc2 to 47aa96e Compare February 2, 2024 09:24
@Borruso Borruso force-pushed the 14.0-add_origin_country-l10n_it_intrastat branch from 47aa96e to a980538 Compare February 2, 2024 09:35
@Borruso Borruso changed the title [14.0][IMP] l10n_it_intrastat: aggiunto paese di origine su prodotto e categoria [14.0][IMP] l10n_it_intrastat: added intrastat country origin on product and category Feb 2, 2024
@andreampiovesana
Copy link
Contributor

merge?

@tafaRU
Copy link
Member

tafaRU commented Feb 2, 2024

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 14.0-ocabot-merge-pr-3256-by-tafaRU-bump-minor, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 2c3b3a3 into OCA:14.0 Feb 2, 2024
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 04a9239. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[l10n_it_intrastat] aggiunto paese di origine su prodotto e categoria
8 participants