summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2024-06-27 15:58:33 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2024-06-27 15:58:33 +0700
commit6b83f1e5a61c2d1f97fb5c0f1c55f0730f83a498 (patch)
tree3c55e0b6c9cfcea33a518429dee740edd81c09b8
parente33f2d321ee4db6a6e6a86e35243100b9f107f22 (diff)
add flag if po has printed
-rwxr-xr-xindoteknik_custom/models/purchase_order.py4
-rwxr-xr-xindoteknik_custom/views/purchase_order.xml2
2 files changed, 6 insertions, 0 deletions
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 @@
<field name="matches_so" widget="many2many_tags" optional="hide"/>
<field name="is_create_uangmuka" optional="hide"/>
<field name="logbook_bill_id" optional="hide"/>
+ <field name="status_printed" optional="hide"/>
</field>
</field>
</record>
@@ -157,6 +158,7 @@
<field name="responsible_ids" widget="many2many_tags" optional="hide"/>
<field name="matches_so" widget="many2many_tags" optional="hide"/>
<field name="logbook_bill_id" optional="hide"/>
+ <field name="status_printed" optional="hide"/>
</field>
</field>
</record>