diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2024-02-02 14:07:43 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2024-02-02 14:07:43 +0700 |
| commit | c26ea43e1d8c3c5bfffb94bc1432589a9f2815c9 (patch) | |
| tree | 86b02e1b4d362617b168f4cb0a5777be483d07fb /indoteknik_custom/models/po_multi_cancel.py | |
| parent | 8bc43445f1d0b70d54d0a45830e04d0fcc406fbe (diff) | |
| parent | f5edc62d22c9a3973261ad289a11e189f0866f52 (diff) | |
Merge branch 'production' of bitbucket.org:altafixco/indoteknik-addons into production
Diffstat (limited to 'indoteknik_custom/models/po_multi_cancel.py')
| -rw-r--r-- | indoteknik_custom/models/po_multi_cancel.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/indoteknik_custom/models/po_multi_cancel.py b/indoteknik_custom/models/po_multi_cancel.py new file mode 100644 index 00000000..52c156b5 --- /dev/null +++ b/indoteknik_custom/models/po_multi_cancel.py @@ -0,0 +1,22 @@ +from odoo import models, fields +import logging + +_logger = logging.getLogger(__name__) + + +class PoMultiCancel(models.TransientModel): + _name = 'po.multi.cancel' + + def save_multi_cancel_po(self): + purchase_ids = self._context['purchase_ids'] + purchase = self.env['purchase.order'].browse(purchase_ids) + purchase.button_cancel() + return { + 'type': 'ir.actions.client', + 'tag': 'display_notification', + 'params': { + 'title': 'Notification', + 'message': 'Status berhasil diubah', + 'next': {'type': 'ir.actions.act_window_close'}, + } + }
\ No newline at end of file |
