summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2023-04-27 14:33:12 +0700
committerstephanchrst <stephanchrst@gmail.com>2023-04-27 14:33:12 +0700
commit3592c254ca5baf4a0a769f500f9e28a9cbc272a7 (patch)
tree40e32801ed02ed6d0b175b6a27fa801888e4d38b
parent0de73173e682928c11949fe40babeb64e1a7b2f8 (diff)
set maturity date if change date in account move
-rw-r--r--indoteknik_custom/models/account_move.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py
index db4886f4..56f3e82c 100644
--- a/indoteknik_custom/models/account_move.py
+++ b/indoteknik_custom/models/account_move.py
@@ -36,6 +36,10 @@ class AccountMove(models.Model):
res = super(AccountMove, self).action_post()
# if not self.env.user.is_accounting:
# raise UserError('Hanya Accounting yang bisa Posting')
+ if self._name == 'account.move':
+ for entry in self:
+ for line in entry.line_ids:
+ line.date_maturity = entry.date
return res
def _compute_invoice_day_to_due(self):