-
Notifications
You must be signed in to change notification settings - Fork 118
[FIX] l10n_fr_account: show delivery date on customer invoice #4808
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
[FIX] l10n_fr_account: show delivery date on customer invoice #4808
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.
Nice job one small nitpick + task-id
def _post(self, soft=True): | ||
res = super()._post(soft) | ||
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.
you can use the show_delivery_date delivery date instead of forcing this here, and we could argue that you must use the is_company_french since some country are part of France like monaco or some island 😄
Purpose ------- Comply with new French legislation requiring the delivery date to appear on customer invoices. This aims to increase transparency for buyers and meet legal obligations. Changes ------- - Added a `delivery_date` field in the invoice form for companies based in France. - Field is editable by the user and shown in the invoice header. - If no delivery date is provided, the invoice date is used as default. - Delivery date is also printed on the invoice layout (PDF report). - Aligned implementation with similar use cases in other localisations. How to test ----------- 1. Set the company country to France. 2. Go to Accounting > Customers > Invoices. 3. Open or create a customer invoice. 4. A new "Delivery Date" field should appear in the form header. 5. Leave it empty or set a specific date. 6. Save and print the invoice. 7. The delivery date should appear in the invoice header, defaulting to the invoice date if not manually set. task-4908872
c49978e
to
b34d441
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.
Thankssss
res = super()._post(soft) | ||
for move in self: | ||
if move.show_delivery_date and not move.delivery_date: | ||
move.delivery_date = move.invoice_date or fields.Date.context_today(self) |
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.
if i'm not mistaken the invoice date is always filled so no need for the or, but i like the defensive programming though ahah
Purpose
Comply with new French legislation requiring the delivery date to appear on customer invoices. This aims to increase transparency for buyers and meet legal obligations.
Changes
delivery_date
field in the invoice form for companies based in France.How to test
task-4908872