summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indoteknik_custom/models/sourcing_job_order.py4
-rw-r--r--indoteknik_custom/views/sourcing.xml2
2 files changed, 4 insertions, 2 deletions
diff --git a/indoteknik_custom/models/sourcing_job_order.py b/indoteknik_custom/models/sourcing_job_order.py
index a107b5ae..7c3a095f 100644
--- a/indoteknik_custom/models/sourcing_job_order.py
+++ b/indoteknik_custom/models/sourcing_job_order.py
@@ -782,7 +782,7 @@ class SourcingJobOrderLine(models.Model):
for rec in self:
job = rec.order_id
- if job.show_salesperson or job.show_salesperson.id != self.env.uid:
+ if not job.show_salesperson or job.show_salesperson.id != self.env.uid:
raise UserError("❌ Hanya Salesperson Sale Order yang bisa approve.")
rec.write({'state': 'approve'})
@@ -831,7 +831,7 @@ class SourcingJobOrderLine(models.Model):
product.default_code = sku_auto
rec.code = sku_auto
- if product.categ_id or product.categ_id.id == 34:
+ if product.categ_id and product.categ_id.id == 34:
product.unpublished = True
rec.product_id = product.id
diff --git a/indoteknik_custom/views/sourcing.xml b/indoteknik_custom/views/sourcing.xml
index 5a78bbb3..9005e5b6 100644
--- a/indoteknik_custom/views/sourcing.xml
+++ b/indoteknik_custom/views/sourcing.xml
@@ -609,6 +609,8 @@
<field name="vendor_id" attrs="{'readonly': [('state', 'in', ['sent', 'cancel', 'approve'])]}"/>
<field name="tax_id" attrs="{'readonly': [('state', 'in', ['sent', 'cancel', 'approve'])]}"/>
<field name="subtotal" readonly="1" attrs="{'readonly': [('state', 'in', ['sent', 'cancel', 'approve'])]}"/>
+ <field name="uom_id" attrs="{'readonly': [('state', 'in', ['sent', 'cancel', 'approve'])]}"/>
+ <field name="web_tax_id" attrs="{'readonly': [('state', 'in', ['sent', 'cancel', 'approve'])]}"/>
<field name="product_category" attrs="{'readonly': [('state', 'in', ['sent', 'cancel', 'approve'])]}"/>
<field name="product_type" attrs="{'readonly': [('state', 'in', ['sent', 'cancel', 'approve'])]}"/>
<field name="product_class" widget="many2many_tags" attrs="{'readonly': [('state', 'in', ['sent', 'cancel', 'approve'])]}"/>