diff options
Diffstat (limited to 'indoteknik_custom/models/purchase_order_multi_confirm.py')
| -rw-r--r-- | indoteknik_custom/models/purchase_order_multi_confirm.py | 22 |
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 |
