diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2024-01-10 09:18:26 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2024-01-10 09:18:26 +0700 |
| commit | e64e3a04ff6db3802779477398020738017b74b8 (patch) | |
| tree | 2b0ee4057430d4eb36d3ae4bd49d25ae3dc1ef62 /indoteknik_custom/models/purchase_order.py | |
| parent | dfd4a1617d2c62b99d4bbcb6386b477874a33ebf (diff) | |
multiple delete on purchase order line
Diffstat (limited to 'indoteknik_custom/models/purchase_order.py')
| -rwxr-xr-x | indoteknik_custom/models/purchase_order.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index 6a641aff..6d156cb6 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -52,6 +52,10 @@ class PurchaseOrder(models.Model): responsible_ids = fields.Many2many('res.users', string='Responsibles', compute='_compute_responsibles') status_paid_cbd = fields.Boolean(string='Paid Status', tracking=3, help='Field ini diisi secara manual oleh Finance AP dan hanya untuk status PO CBD') + def delete_line(self): + lines_to_delete = self.order_line.filtered(lambda line: line.delete) + lines_to_delete.unlink() + def open_form_multi_confirm_po(self): action = self.env['ir.actions.act_window']._for_xml_id('indoteknik_custom.action_purchase_order_multi_confirm') action['context'] = { |
