summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indoteknik_custom/models/sale_order_line.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/indoteknik_custom/models/sale_order_line.py b/indoteknik_custom/models/sale_order_line.py
index 29a046fa..aed95aab 100644
--- a/indoteknik_custom/models/sale_order_line.py
+++ b/indoteknik_custom/models/sale_order_line.py
@@ -38,11 +38,11 @@ class SaleOrderLine(models.Model):
md_vendor_id = fields.Many2one('res.partner', string='MD Vendor', readonly=True)
margin_md = fields.Float(string='Margin MD')
qty_free_bu = fields.Float(string='Free BU', compute='_get_qty_free_bandengan')
- desc_updatable = fields.Boolean(string='desc boolean', default=False, compute='_get_desc_updatable')
+ desc_updatable = fields.Boolean(string='desc boolean', default=True, compute='_get_desc_updatable')
def _get_desc_updatable(self):
for line in self:
- if line.product_id.id != 417724:
+ if line.product_id.id != 417724 and line.product_id.id:
line.desc_updatable = False
else:
line.desc_updatable = True
@@ -280,7 +280,7 @@ class SaleOrderLine(models.Model):
(line.product_id.short_spesification if line.product_id.short_spesification else '')
line.name = line_name
line.weight = line.product_id.weight
- if line.product_id.id != 417724:
+ if line.product_id.id != 417724 and line.product_id.id:
line.desc_updatable = False
else:
line.desc_updatable = True