-
-
Notifications
You must be signed in to change notification settings - Fork 310
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
[14.0][IMP] l10n_it_intrastat: added intrastat country origin on product and category #3256
Conversation
3d048cc
to
50f1a3c
Compare
There was a problem hiding this 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
5e8131d
to
11455e5
Compare
00fbd20
to
c8b4dd5
Compare
c8b4dd5
to
162261d
Compare
162261d
to
5973c3e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
5973c3e
to
467b291
Compare
This PR has the |
l10n_it_intrastat/models/account.py
Outdated
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() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perché .browse()
?
There was a problem hiding this comment.
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
467b291
to
141568e
Compare
@baba75 scusami forse per errore hai selezionato l'opzione di |
There was a problem hiding this 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 👍
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"] |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
@Borruso issue? |
141568e
to
69fffc2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
69fffc2
to
47aa96e
Compare
47aa96e
to
a980538
Compare
merge? |
/ocabot merge minor |
This PR looks fantastic, let's merge it! |
Congratulations, your PR was merged at 04a9239. Thanks a lot for contributing to OCA. ❤️ |
--
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