diff options
| author | Miqdad <ahmadmiqdad27@gmail.com> | 2025-08-06 08:55:23 +0700 |
|---|---|---|
| committer | Miqdad <ahmadmiqdad27@gmail.com> | 2025-08-06 08:55:23 +0700 |
| commit | 71dd0102df8cc3831a3c13d4bc0f430b061d1094 (patch) | |
| tree | 9a563ec9bee53866da98cc30de358d1210248fc3 /indoteknik_custom/models/update_date_planned_po_wizard.py | |
| parent | 9f9081714356e87500ab05bc5a294e9ca9e526fe (diff) | |
| parent | c42bdba2996d85d328897e42e7a1d86001b3a14d (diff) | |
Merge branch 'odoo-backup' of https://bitbucket.org/altafixco/indoteknik-addons into 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.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'} |
