From 6b83f1e5a61c2d1f97fb5c0f1c55f0730f83a498 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Thu, 27 Jun 2024 15:58:33 +0700 Subject: add flag if po has printed --- indoteknik_custom/models/purchase_order.py | 4 ++++ indoteknik_custom/views/purchase_order.xml | 2 ++ 2 files changed, 6 insertions(+) diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index 6aec4074..4a029441 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -61,6 +61,10 @@ class PurchaseOrder(models.Model): is_create_uangmuka = fields.Boolean(string='Uang Muka?') move_id = fields.Many2one('account.move', string='Account Move') logbook_bill_id = fields.Many2one('report.logbook.bill', string='Logbook Bill') + status_printed = fields.Selection([ + ('not_printed', 'Belum Print'), + ('printed', 'Printed') + ], string='Printed?', copy=False, tracking=True) def _prepare_invoice(self): """Prepare the dict of values to create the new invoice for a purchase order. diff --git a/indoteknik_custom/views/purchase_order.xml b/indoteknik_custom/views/purchase_order.xml index 2ae96d7e..08ab8691 100755 --- a/indoteknik_custom/views/purchase_order.xml +++ b/indoteknik_custom/views/purchase_order.xml @@ -138,6 +138,7 @@ + @@ -157,6 +158,7 @@ + -- cgit v1.2.3