From 65fe5e9cb0865293eb6d0626d2c99f35d6862b3c Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Thu, 30 May 2024 16:09:35 +0700 Subject: add invoice_date_due and terima faktur on bills --- .../models/account_move_multi_update_bills.py | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 indoteknik_custom/models/account_move_multi_update_bills.py (limited to 'indoteknik_custom/models/account_move_multi_update_bills.py') diff --git a/indoteknik_custom/models/account_move_multi_update_bills.py b/indoteknik_custom/models/account_move_multi_update_bills.py new file mode 100644 index 00000000..d348beed --- /dev/null +++ b/indoteknik_custom/models/account_move_multi_update_bills.py @@ -0,0 +1,26 @@ +from odoo import models, fields +import logging + +_logger = logging.getLogger(__name__) + + +class AccountMoveMultiUpdateBills(models.TransientModel): + _name = 'account.move.multi_update_bills' + + date_terima_tukar_faktur = fields.Date(string="Terima Faktur") + + def save_multi_update_bills(self): + move_ids = self._context['move_ids'] + moves = self.env['account.move'].browse(move_ids) + moves.update({ + 'date_terima_tukar_faktur': self.date_terima_tukar_faktur + }) + return { + 'type': 'ir.actions.client', + 'tag': 'display_notification', + 'params': { + 'title': 'Notification', + 'message': 'Account Move berhasil diubah', + 'next': {'type': 'ir.actions.act_window_close'}, + } + } \ No newline at end of file -- cgit v1.2.3