Skip to content

Conversation

@vicire1
Copy link

@vicire1 vicire1 commented Nov 4, 2025

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

@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.

@vicire1 vicire1 force-pushed the 18.0-add-deliver-date-fr-invoice-videc branch from e04f46b to 73e8e87 Compare November 4, 2025 12:35
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.

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':

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 😄

Copy link
Author

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)

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:

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
@vicire1 vicire1 force-pushed the 18.0-add-deliver-date-fr-invoice-videc branch from 73e8e87 to 1cc39b5 Compare November 5, 2025 16:49
@vicire1 vicire1 changed the title [IMP] l10n_fr: Display delivery date on invoice [IMP] l10n_fr: automatic display delivery date on fr invoices header Nov 5, 2025
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