diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2024-06-05 02:29:48 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2024-06-05 02:29:48 +0000 |
| commit | ec4aefc64a9f42d1b40d03048fc384e158191218 (patch) | |
| tree | 14d1fd1358ae41d65b9412fdfc0195c8dd9f20bd /indoteknik_custom/models/account_move.py | |
| parent | abd7dd1ecc9246b1924dcf70b3ed41c964f3746f (diff) | |
| parent | 9306992db370c793e8cab494038b0de5b61b600f (diff) | |
Merged in production (pull request #144)
Production
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: |
