From 6b49797aca36574497f93a06f8e1c0622e5ad009 Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Thu, 2 Nov 2023 15:40:43 +0700 Subject: add field kind of sparepart and accesories in product template --- indoteknik_custom/models/product_template.py | 4 ++++ indoteknik_custom/views/product_template.xml | 1 + 2 files changed, 5 insertions(+) diff --git a/indoteknik_custom/models/product_template.py b/indoteknik_custom/models/product_template.py index 10d109fb..d1de2221 100755 --- a/indoteknik_custom/models/product_template.py +++ b/indoteknik_custom/models/product_template.py @@ -53,6 +53,10 @@ class ProductTemplate(models.Model): seq_new_product = fields.Integer(string='Seq New Product', help='Urutan Sequence New Product') is_edited = fields.Boolean(string='Is Edited') qty_sold = fields.Float(string='Sold Quantity', compute='_get_qty_sold') + kind_of = fields.Selection([ + ('sp', 'Spare Part'), + ('acc', 'Accessories') + ], string='Kind of', copy=False) def _get_qty_sold(self): for rec in self: diff --git a/indoteknik_custom/views/product_template.xml b/indoteknik_custom/views/product_template.xml index 6fdb5e8f..92d2191e 100755 --- a/indoteknik_custom/views/product_template.xml +++ b/indoteknik_custom/views/product_template.xml @@ -10,6 +10,7 @@ + -- cgit v1.2.3