Skip to content

Conversation

@Wajih-Wanis
Copy link

@Wajih-Wanis Wajih-Wanis commented Nov 4, 2025

[IMP] l10n_fr_account: delivery date added on french invoices

as a new legislation in french required the addition of delivery date on invoices we have to modify the localisation for french companies to always have the delivery date included in the invoices to comply with the legislation.

task : [l10n_fr] Add delivery date on invoice

@robodoo
Copy link

robodoo commented Nov 4, 2025

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.

Copy link

@malb-odoo malb-odoo left a comment

Choose a reason for hiding this comment

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

Nicee ! Good job on this, commit message needs a bit more explanation though 😄

Copy link

@malb-odoo malb-odoo left a 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 information in the delivery date. We might need to put a value when posting the move don't you think 😄
Check the other localisation they have done it 👀

@Wajih-Wanis Wajih-Wanis force-pushed the 18.0-rd-accounting-onboarding-delivery-date-waoun branch from 237dc60 to 975df40 Compare November 7, 2025 16:13
@Wajih-Wanis
Copy link
Author

might need to put a value when posting the move don't you think 😄
Check the other localisation they have done it 👀
I did not understand this :(

@malb-odoo
Copy link

might need to put a value when posting the move don't you think 😄
Check the other localisation they have done it 👀
I did not understand this :(

When confirming the move, what if the delivery date is empty ? Then you would have nothing in the delivery date which is a bit weird, we should at least put the invoice date in the delivery date when posting the move, check the other localisation that have the same system 😄

@Wajih-Wanis Wajih-Wanis force-pushed the 18.0-rd-accounting-onboarding-delivery-date-waoun branch from 975df40 to 722ba52 Compare November 14, 2025 10:17

@api.depends('country_code', 'move_type')
def _compute_show_delivery_date(self):
super()._compute_show_delivery_date()

Choose a reason for hiding this comment

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

Also when doing extension of compute it's nice to have a comment like # EXTEND 'account'
if you look at the code you should be able to find many example

for move in self:
if move.l10_fr_is_company_french 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)

Choose a reason for hiding this comment

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

Care with the super that if in the execution the delivery date is modified then the behavior would be different so i would put the super at the beginning of the function to be extra safe

Copy link
Author

Choose a reason for hiding this comment

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

Didn't understand this, if I put super at the beginning what would the function return ?

as a new legislation in french required the addition of delivery date on invoice
s we have to modify the localisation for french companies to always have the deliver
y date included in the invoices to comply with the legislation.

task : 5231338
@Wajih-Wanis Wajih-Wanis force-pushed the 18.0-rd-accounting-onboarding-delivery-date-waoun branch from f027b78 to c05ce18 Compare November 14, 2025 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants