Skip to content

Commit 0c1091a

Browse files
committed
[IMP] l10n_fr_account: Delivery Date in Invoice Header
There is a New legislation in France to add delivery date on invoice `delivery_date` appears in the header of customer invoice and in the invoice layout. task-4908888
1 parent 6819f50 commit 0c1091a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

addons/l10n_fr_account/models/account_move.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,16 @@ def _get_view(self, view_id=None, view_type='form', **options):
1919
def _compute_l10n_fr_is_company_french(self):
2020
for record in self:
2121
record.l10n_fr_is_company_french = record.country_code in record.company_id._get_france_country_codes()
22+
23+
@api.depends('delivery_date')
24+
def _compute_show_delivery_date(self):
25+
for move in self:
26+
move.show_delivery_date = True
27+
28+
@api.depends('invoice_date')
29+
def _compute_delivery_date(self):
30+
# EXTENDS 'account'
31+
super()._compute_delivery_date()
32+
for move in self:
33+
if not move.delivery_date:
34+
move.delivery_date = move.invoice_date

0 commit comments

Comments
 (0)