summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/purchase_order_multi_update.py
diff options
context:
space:
mode:
Diffstat (limited to 'indoteknik_custom/models/purchase_order_multi_update.py')
-rw-r--r--indoteknik_custom/models/purchase_order_multi_update.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/indoteknik_custom/models/purchase_order_multi_update.py b/indoteknik_custom/models/purchase_order_multi_update.py
new file mode 100644
index 00000000..aab46de8
--- /dev/null
+++ b/indoteknik_custom/models/purchase_order_multi_update.py
@@ -0,0 +1,22 @@
+from odoo import models, fields
+import logging
+
+_logger = logging.getLogger(__name__)
+
+
+class PurchaseOrderMultiUpdate(models.TransientModel):
+ _name = 'purchase.order.multi_update'
+
+ def save_multi_update_paid_status(self):
+ purchase_ids = self._context['purchase_ids']
+ purchase = self.env['purchase.order'].browse(purchase_ids)
+ purchase.action_multi_update_paid_status()
+ return {
+ 'type': 'ir.actions.client',
+ 'tag': 'display_notification',
+ 'params': {
+ 'title': 'Notification',
+ 'message': 'Paid Status berhasil diubah',
+ 'next': {'type': 'ir.actions.act_window_close'},
+ }
+ } \ No newline at end of file