summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/account_move_multi_update.py
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2023-07-25 11:09:27 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2023-07-25 11:09:27 +0700
commit940054dbc1dffca75bfb81e478d5538f762009c6 (patch)
treedcf0d00d874e8167d83999f86499bdc1b54dd704 /indoteknik_custom/models/account_move_multi_update.py
parent4656fedaac694b5e6fe72311a49dd34bce1e50e5 (diff)
parentdd1e7158f3c5a24c4cfd67fdeedd9011f6c0655b (diff)
Merge branch 'production' of bitbucket.org:altafixco/indoteknik-addons into production
Diffstat (limited to 'indoteknik_custom/models/account_move_multi_update.py')
-rw-r--r--indoteknik_custom/models/account_move_multi_update.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/indoteknik_custom/models/account_move_multi_update.py b/indoteknik_custom/models/account_move_multi_update.py
new file mode 100644
index 00000000..4b650868
--- /dev/null
+++ b/indoteknik_custom/models/account_move_multi_update.py
@@ -0,0 +1,26 @@
+from odoo import models, fields
+import logging
+
+_logger = logging.getLogger(__name__)
+
+
+class AccountMoveMultiUpdate(models.TransientModel):
+ _name = 'account.move.multi_update'
+
+ payment_schedule = fields.Date(string="Jadwal Pembayaran")
+
+ def save_multi_update(self):
+ move_ids = self._context['move_ids']
+ moves = self.env['account.move'].browse(move_ids)
+ moves.update({
+ 'payment_schedule': self.payment_schedule
+ })
+ 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