Skip to content

Commit a2112b3

Browse files
committed
[IMP] account: add delivery date on invoices for France
The new legislation in France imposes to add te deliver date on the invoice. task-5231287
1 parent 9ae5720 commit a2112b3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

addons/l10n_fr_account/models/account_move.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,11 @@ def _get_view(self, view_id=None, view_type='form', **options):
2020
def _compute_l10n_fr_is_company_french(self):
2121
for record in self:
2222
record.l10n_fr_is_company_french = record.country_code in record.company_id._get_france_country_codes()
23+
24+
@api.depends('country_code', 'move_type')
25+
def _compute_show_delivery_date(self):
26+
# EXTEND 'account'
27+
super()._compute_show_delivery_date()
28+
for move in self:
29+
if move.l10n_fr_is_company_french:
30+
move.show_delivery_date = move.is_sale_document()

0 commit comments

Comments
 (0)