diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2023-10-20 10:17:52 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2023-10-20 10:17:52 +0700 |
| commit | d4be2f65948da27992841f99ffe1ff04b4de0194 (patch) | |
| tree | e35365b0c47dd5646b8e0033fc2aa74fe835f4a0 /indoteknik_custom/models/account_move.py | |
| parent | 956a77b7ad29af3620ee37e66c3b13de6a562deb (diff) | |
| parent | 1e08cea66f4b4b3e4664f09986b1e41d0ba57830 (diff) | |
Merge branch 'production' of bitbucket.org:altafixco/indoteknik-addons into production
Diffstat (limited to 'indoteknik_custom/models/account_move.py')
| -rw-r--r-- | indoteknik_custom/models/account_move.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py index 207ccee1..a85e8caa 100644 --- a/indoteknik_custom/models/account_move.py +++ b/indoteknik_custom/models/account_move.py @@ -14,6 +14,7 @@ _logger = logging.getLogger(__name__) class AccountMove(models.Model): _inherit = 'account.move' invoice_day_to_due = fields.Integer(string="Day to Due", compute="_compute_invoice_day_to_due") + bill_day_to_due = fields.Date(string="Day to Due", compute="_compute_bill_day_to_due") date_send_fp = fields.Datetime(string="Tanggal Kirim Faktur Pajak") last_log_fp = fields.Char(string="Log Terakhir Faktur Pajak") # use for industry business @@ -107,6 +108,10 @@ class AccountMove(models.Model): invoice_day_to_due = invoice.new_due_date - date.today() invoice_day_to_due = invoice_day_to_due.days invoice.invoice_day_to_due = invoice_day_to_due + + def _compute_bill_day_to_due(self): + for rec in self: + rec.bill_day_to_due = rec.payment_schedule or rec.invoice_date_due @api.onchange('date_kirim_tukar_faktur') def change_date_kirim_tukar_faktur(self): |
