Skip to content

Commit 1dc9bad

Browse files
committed
[IMP] accountant: add a function in l10n-FR to show delivery dates
A new legislation in france requires the delivery date to be in the header of the invoice task id: 5231299
1 parent 9ae5720 commit 1dc9bad

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
@@ -6,6 +6,14 @@ class AccountMove(models.Model):
66

77
l10n_fr_is_company_french = fields.Boolean(compute='_compute_l10n_fr_is_company_french')
88

9+
@api.depends('l10n_fr_is_company_french')
10+
def _compute_show_delivery_date(self):
11+
# EXTENDS 'account'
12+
super()._compute_show_delivery_date()
13+
for move in self:
14+
if move.l10n_fr_is_company_french:
15+
move.show_delivery_date = move.is_sale_document()
16+
917
@api.model
1018
def _get_view(self, view_id=None, view_type='form', **options):
1119
arch, view = super()._get_view(view_id, view_type, **options)

0 commit comments

Comments
 (0)