Skip to content

[IMP] l10n_fr_account: Delivery Date in Invoice Header #4817

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

Open
wants to merge 1 commit into
base: 18.0-rd-accounting-onboarding-malb
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions addons/l10n_fr_account/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,16 @@ def _get_view(self, view_id=None, view_type='form', **options):
def _compute_l10n_fr_is_company_french(self):
for record in self:
record.l10n_fr_is_company_french = record.country_code in record.company_id._get_france_country_codes()

@api.depends('delivery_date')
def _compute_show_delivery_date(self):
for move in self:
move.show_delivery_date = True

Choose a reason for hiding this comment

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

Care that we only want that when the company selected is a french one 👀


@api.depends('invoice_date')
def _compute_delivery_date(self):
# EXTENDS 'account'
super()._compute_delivery_date()
for move in self:
if not move.delivery_date:

Choose a reason for hiding this comment

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

we only want that when the delivery date is shown on the header 👀 Use the show_delivery_date field

move.delivery_date = move.invoice_date