summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2023-11-02 15:40:43 +0700
committerstephanchrst <stephanchrst@gmail.com>2023-11-02 15:40:43 +0700
commit6b49797aca36574497f93a06f8e1c0622e5ad009 (patch)
treeee729e6f9feda2a0f5d46cf70608666e241cbbc2
parentf8fc4ac3557bf5a74f49ea79b178b29ff5684815 (diff)
add field kind of sparepart and accesories in product template
-rwxr-xr-xindoteknik_custom/models/product_template.py4
-rwxr-xr-xindoteknik_custom/views/product_template.xml1
2 files changed, 5 insertions, 0 deletions
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 @@
<field name="web_tax_id"/>
<field name="x_manufacture"/>
<field name="x_model_product"/>
+ <field name="kind_of"/>
<field name="x_studio_field_tGhJR" widget="many2many_tags"/>
</field>
<field name="uom_po_id" position="after">