diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-12-09 15:05:00 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-12-09 15:05:00 +0700 |
| commit | 31374ed669121ba6c8ec401f82ad0bfedf07a6d6 (patch) | |
| tree | 0aa9bf91134ad7fe07142c37873ddeed3b6f3c71 /indoteknik_custom/models/product_template.py | |
| parent | 02eacd54387953f42a884a22544e2f7c94081536 (diff) | |
| parent | 2123dbaab7b4ff49d90336d34e2be76e8eb07f8e (diff) | |
Merge branch 'production' into iman/pengajuan-tempo
Diffstat (limited to 'indoteknik_custom/models/product_template.py')
| -rwxr-xr-x | indoteknik_custom/models/product_template.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indoteknik_custom/models/product_template.py b/indoteknik_custom/models/product_template.py index 4d186568..6fb8c7a0 100755 --- a/indoteknik_custom/models/product_template.py +++ b/indoteknik_custom/models/product_template.py @@ -66,7 +66,7 @@ class ProductTemplate(models.Model): @api.constrains('name', 'internal_reference', 'x_manufacture') def required_public_categ_ids(self): for rec in self: - if not rec.public_categ_ids: + if not rec.public_categ_ids and rec.type == 'product': raise UserError('Field Categories harus diisi') def _get_qty_sold(self): @@ -388,7 +388,7 @@ class ProductProduct(models.Model): @api.constrains('name', 'internal_reference', 'x_manufacture') def required_public_categ_ids(self): for rec in self: - if not rec.public_categ_ids: + if not rec.public_categ_ids and rec.type == 'product': raise UserError('Field Categories harus diisi') @api.constrains('active') |
