-
Notifications
You must be signed in to change notification settings - Fork 116
[IMP] l10n_fr_account: show delivery dates in the invoice header #4866
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_account: show delivery dates in the invoice header #4866
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. |
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.
Missing commit description and task id 👀 and title is fucked up i think missing the module ahah
| # 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.
See that little field l10n_fr_is_company_french, maybe we could use that ? You can tell me why it would be better ? 👀
18961ce to
1dc9bad
Compare
malb-odoo
left a comment
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.
Now to go a bit further, what if the user don't put any value in the delivery date, then we would have nothing. If you look at the other localisation we have some function to add thing when posting the move 👀
Also commit message needs to be adapted for the module name and the task id
1dc9bad to
6748a21
Compare
| record.l10n_fr_is_company_french = record.country_code in record.company_id._get_france_country_codes() | ||
|
|
||
| def _post(self, soft=True): | ||
| res = 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.
Don't forget the # EXTENDS 'account'
| def _post(self, soft=True): | ||
| res = super()._post(soft) | ||
| for move in self: | ||
| if move.l10n_fr_is_company_french 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.
you can use show_delivery_date here 😄
A new legislation in france requires the delivery date to be in the header of the invoice, if no delivery date is added at invoice creation, it is set to the invoice date by default task-5231299
6748a21 to
51980b7
Compare
No description provided.