summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/quotation_so_multi_update.py
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2023-09-29 02:32:56 +0000
committerIT Fixcomart <it@fixcomart.co.id>2023-09-29 02:32:56 +0000
commit78f205302c35cab2512971d64c8152aab2dcfa95 (patch)
tree72be75ad949fe9efaf7b55c8f7f5722225538b28 /indoteknik_custom/models/quotation_so_multi_update.py
parent50b5bd7bd984ef108e8bd324440050a222d8262f (diff)
parent0bb47005022b33c79ecfb5924d41f35ce794c5fb (diff)
Merged in production (pull request #126)
Production
Diffstat (limited to 'indoteknik_custom/models/quotation_so_multi_update.py')
-rw-r--r--indoteknik_custom/models/quotation_so_multi_update.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/indoteknik_custom/models/quotation_so_multi_update.py b/indoteknik_custom/models/quotation_so_multi_update.py
new file mode 100644
index 00000000..105b7963
--- /dev/null
+++ b/indoteknik_custom/models/quotation_so_multi_update.py
@@ -0,0 +1,22 @@
+from odoo import models, fields
+import logging
+
+_logger = logging.getLogger(__name__)
+
+
+class QuotationSoMultiUpdate(models.TransientModel):
+ _name = 'quotation.so.multi_update'
+
+ def save_multi_update_quotation(self):
+ quotation_ids = self._context['quotation_ids']
+ sales = self.env['sale.order'].browse(quotation_ids)
+ sales.action_multi_update_state()
+ 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