diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2024-02-07 10:45:51 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2024-02-07 10:45:51 +0700 |
| commit | f6be42d37a363b86f4a9ec71ccb38c78cbe2d887 (patch) | |
| tree | 9c297e776f67e35671012e94d3c64007bd5090d7 /indoteknik_custom/models/purchase_order_multi_update.py | |
| parent | edb3c1c80931078d40a8f56149aeca9efdcdc07d (diff) | |
| parent | 29a9ec94f1ad131f398cf119a03a7b927a4c6cba (diff) | |
Merge branch 'production' into purchasing-job
# Conflicts:
# indoteknik_custom/__manifest__.py
# indoteknik_custom/models/__init__.py
# indoteknik_custom/models/automatic_purchase.py
# indoteknik_custom/models/purchase_order_line.py
# indoteknik_custom/security/ir.model.access.csv
# indoteknik_custom/views/automatic_purchase.xml
# indoteknik_custom/views/purchase_order.xml
Diffstat (limited to 'indoteknik_custom/models/purchase_order_multi_update.py')
| -rw-r--r-- | indoteknik_custom/models/purchase_order_multi_update.py | 22 |
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 |
