summaryrefslogtreecommitdiff
path: root/fixco_custom/models/product_product.py
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2025-06-19 13:39:20 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2025-06-19 13:39:20 +0700
commit03298bc537ff3e29c6925f640ca0a1106a569bd5 (patch)
treed640b5ddc4c6b604a7c1c62f752480f52fb4b36f /fixco_custom/models/product_product.py
parent27ae2de4c1deea61dc0891379c8c294e4399b5f7 (diff)
remove domain bank in transit on uangmuka penjualan
Diffstat (limited to 'fixco_custom/models/product_product.py')
-rwxr-xr-xfixco_custom/models/product_product.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/fixco_custom/models/product_product.py b/fixco_custom/models/product_product.py
index bb3ba17..a6bec4d 100755
--- a/fixco_custom/models/product_product.py
+++ b/fixco_custom/models/product_product.py
@@ -18,6 +18,10 @@ class ProductProduct(models.Model):
barcode_box = fields.Char("Barcode Box")
qr_code_variant = fields.Binary("QR Code Variant", compute='_compute_qr_code_variant')
+ @api.constrains('name', 'default_code')
+ def constrains_product_type(self):
+ self.type = 'product'
+
def _compute_qr_code_variant(self):
for rec in self:
# Skip inactive variants