diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2025-08-06 09:25:09 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2025-08-06 09:25:09 +0700 |
| commit | 10d0e2bf639b31e58fd0d80a61062aa3ddc8f041 (patch) | |
| tree | fd92b9538c820e1419154a43f19bea1090d62465 /indoteknik_custom/models/update_date_planned_po_wizard.py | |
| parent | fcd98b0f038cfa1653b8b12df77750253ebd7a68 (diff) | |
| parent | c42bdba2996d85d328897e42e7a1d86001b3a14d (diff) | |
<hafid> change delivered api
Diffstat (limited to 'indoteknik_custom/models/update_date_planned_po_wizard.py')
| -rw-r--r-- | indoteknik_custom/models/update_date_planned_po_wizard.py | 14 |
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'} |
