diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2024-05-30 16:09:35 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2024-05-30 16:09:35 +0700 |
| commit | 65fe5e9cb0865293eb6d0626d2c99f35d6862b3c (patch) | |
| tree | 9b101f91df2be5e08a489991579b9edd691cbdfd /indoteknik_custom/models/account_move.py | |
| parent | c0bc0039928cdb7e2eef8e39dc5daad6e5ecfc28 (diff) | |
add invoice_date_due and terima faktur on bills
Diffstat (limited to 'indoteknik_custom/models/account_move.py')
| -rw-r--r-- | indoteknik_custom/models/account_move.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py index b306b6af..aa8b97be 100644 --- a/indoteknik_custom/models/account_move.py +++ b/indoteknik_custom/models/account_move.py @@ -246,7 +246,7 @@ class AccountMove(models.Model): due_date = tukar_date + timedelta(days=add_days) invoice.invoice_date_due = due_date - @api.onchange('date_terima_tukar_faktur') + @api.constrains('date_terima_tukar_faktur') def change_date_terima_tukar_faktur(self): for invoice in self: if not invoice.date_terima_tukar_faktur: @@ -266,6 +266,13 @@ class AccountMove(models.Model): } return action + def open_form_multi_update_bills(self): + action = self.env['ir.actions.act_window']._for_xml_id('indoteknik_custom.action_account_move_multi_update_bills') + action['context'] = { + 'move_ids': [x.id for x in self] + } + return action + @api.constrains('efaktur_id', 'ref', 'date', 'journal_id', 'name') def constrains_edit(self): for rec in self.line_ids: |
