From 03298bc537ff3e29c6925f640ca0a1106a569bd5 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Thu, 19 Jun 2025 13:39:20 +0700 Subject: remove domain bank in transit on uangmuka penjualan --- fixco_custom/models/product_product.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'fixco_custom/models/product_product.py') 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 -- cgit v1.2.3