diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2024-01-09 15:03:15 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2024-01-09 15:03:15 +0700 |
| commit | dfd4a1617d2c62b99d4bbcb6386b477874a33ebf (patch) | |
| tree | cf929b7967798000910e6f8afc6156de512fc330 /indoteknik_custom/models/purchase_order_multi_confirm.py | |
| parent | 3615748eafd2d2cfd81f6ddc95d50a7bc347798d (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.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 |
