summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/purchase_order_multi_confirm.py
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2024-01-09 15:03:15 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2024-01-09 15:03:15 +0700
commitdfd4a1617d2c62b99d4bbcb6386b477874a33ebf (patch)
treecf929b7967798000910e6f8afc6156de512fc330 /indoteknik_custom/models/purchase_order_multi_confirm.py
parent3615748eafd2d2cfd81f6ddc95d50a7bc347798d (diff)
multiple confirm purchase orders
Diffstat (limited to 'indoteknik_custom/models/purchase_order_multi_confirm.py')
-rw-r--r--indoteknik_custom/models/purchase_order_multi_confirm.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/indoteknik_custom/models/purchase_order_multi_confirm.py b/indoteknik_custom/models/purchase_order_multi_confirm.py
new file mode 100644
index 00000000..ac77ca54
--- /dev/null
+++ b/indoteknik_custom/models/purchase_order_multi_confirm.py
@@ -0,0 +1,22 @@
+from odoo import models, fields
+import logging
+
+_logger = logging.getLogger(__name__)
+
+
+class PurchaseOrderMultiUpdate(models.TransientModel):
+ _name = 'purchase.order.multi_confirm'
+
+ def save_multi_confirm_po(self):
+ order_ids = self._context['order_ids']
+ purchase = self.env['purchase.order'].browse(order_ids)
+ purchase.action_multi_confirm_po()
+ return {
+ 'type': 'ir.actions.client',
+ 'tag': 'display_notification',
+ 'params': {
+ 'title': 'Notification',
+ 'message': 'PO berhasil di Confirm',
+ 'next': {'type': 'ir.actions.act_window_close'},
+ }
+ } \ No newline at end of file