summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/update_date_planned_po_wizard.py
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2025-08-13 09:48:41 +0700
committerit-fixcomart <it@fixcomart.co.id>2025-08-13 09:48:41 +0700
commit7644260c8b660c71aa1f9232cb50acea551798c2 (patch)
treebdbad5e360bd7d638b340c6d96d19dc8c7912d00 /indoteknik_custom/models/update_date_planned_po_wizard.py
parentd1e55b12466b6c93cc4a3e23dab59d3ce3795d45 (diff)
parenta2d087032e5b14901f4128c81b58143bcff4286f (diff)
<hafid> merging odoo-backup
Diffstat (limited to 'indoteknik_custom/models/update_date_planned_po_wizard.py')
-rw-r--r--indoteknik_custom/models/update_date_planned_po_wizard.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/indoteknik_custom/models/update_date_planned_po_wizard.py b/indoteknik_custom/models/update_date_planned_po_wizard.py
new file mode 100644
index 00000000..a0d241c8
--- /dev/null
+++ b/indoteknik_custom/models/update_date_planned_po_wizard.py
@@ -0,0 +1,14 @@
+from odoo import models, fields, api
+
+class PurchaseOrderUpdateDateWizard(models.TransientModel):
+ _name = 'purchase.order.update.date.wizard'
+ _description = 'Wizard to Update Receipt Date on Purchase Order Lines'
+
+ date_planned = fields.Datetime(string="New Receipt Date", required=True)
+
+ def action_update_date(self):
+ active_ids = self.env.context.get('active_ids', [])
+ orders = self.env['purchase.order'].browse(active_ids)
+ for order in orders:
+ order.write({'date_planned': self.date_planned})
+ return {'type': 'ir.actions.act_window_close'}