summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2025-01-16 14:41:54 +0700
committerit-fixcomart <it@fixcomart.co.id>2025-01-16 14:41:54 +0700
commit40b0e30d359c917b6b22f6fb385a23026a7393bd (patch)
treea07c916bbd3482d2044a7fb304791d2a1bcbefc7
parent97649650cde8aa0ad7df83d053e95645a448cb02 (diff)
<iman> update code deskripsi read only efek ke note
-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