diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2025-06-19 13:39:20 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2025-06-19 13:39:20 +0700 |
| commit | 03298bc537ff3e29c6925f640ca0a1106a569bd5 (patch) | |
| tree | d640b5ddc4c6b604a7c1c62f752480f52fb4b36f /fixco_custom/models/product_product.py | |
| parent | 27ae2de4c1deea61dc0891379c8c294e4399b5f7 (diff) | |
remove domain bank in transit on uangmuka penjualan
Diffstat (limited to 'fixco_custom/models/product_product.py')
| -rwxr-xr-x | fixco_custom/models/product_product.py | 4 |
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 |
