-
Notifications
You must be signed in to change notification settings - Fork 116
[IMP] l10n_fr: automatic display delivery date on fr invoices header #4860
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
base: 18.0-rd-accounting-onboarding-malb
Are you sure you want to change the base?
[IMP] l10n_fr: automatic display delivery date on fr invoices header #4860
Conversation
|
This PR targets the un-managed branch odoo-dev/odoo:18.0-rd-accounting-onboarding-malb, it needs to be retargeted before it can be merged. |
e04f46b to
73e8e87
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.
Commit message is a bit weird there aha, let's modify this and small change to be done 😄
| # EXTENDS 'account' | ||
| super()._compute_show_delivery_date() | ||
| for move in self: | ||
| if move.country_code == 'FR': |
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.
Check l10n_fr_is_company_french, maybe you could use that 👀 Tell me why it would be nice to use that 😄
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.
Yes as there are multiple countrycode for France it is a better idea 😄
| for move in self: | ||
| if move.country_code == 'FR' and move.is_sale_document() and not move.delivery_date: | ||
| move.delivery_date = move.invoice_date or fields.Date.context_today(self) | ||
| return super()._post(soft) |
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.
Care when doing a super at the end of the function you could have a case where the delivery date is modified after in the exection. So might be better to put it at the beginning of the function right ? 😄
Also when doing an extension always put the Extend comment 😄
|
|
||
| def _post(self, soft=True): | ||
| for move in self: | ||
| if move.country_code == 'FR' and move.is_sale_document() and not move.delivery_date: |
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.
Cant you use the show_delivery_date here ? 👀
there was a new legislation in France and the delivery date has to appear on the invoices so now it appears automatically in the customer invoice header and write a date on the invoice layout even if none is specified when creating the invoice task-5231327
73e8e87 to
1cc39b5
Compare
there was a new legislation in France and the delivery date has to appear on the invoices so now it appears automatically in the customer invoice header and write a date on the invoice layout even if none is specified when creating the invoice
task-5231327