summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/sale_order.py
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-09-28 16:25:01 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-09-28 16:25:01 +0700
commit597d6458234a14bd20e7fba8a0ceb07168423d2a (patch)
treed3af413c17daa60486fa52ed63d582e3ac66e5da /indoteknik_custom/models/sale_order.py
parent009be5919cb5835f98f5882f69b3a7652e8ec658 (diff)
Update purchase_order.py, purchase_order_line.py, and 3 more files...
Diffstat (limited to 'indoteknik_custom/models/sale_order.py')
-rwxr-xr-xindoteknik_custom/models/sale_order.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index d1200de2..1442b432 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -25,7 +25,7 @@ class SaleOrder(models.Model):
shipping_cost_covered = fields.Selection([
('indoteknik', 'Indoteknik'),
('customer', 'Customer')
- ], string='Shipping Paid by', help='Siapa yang menanggung biaya ekspedisi?', copy=False)
+ ], string='Shipping Covered by', help='Siapa yang menanggung biaya ekspedisi?', copy=False)
shipping_paid_by = fields.Selection([
('indoteknik', 'Indoteknik'),
('customer', 'Customer')
@@ -91,9 +91,9 @@ class SaleOrder(models.Model):
self.env.user.id != 6 and self.env.user.id != 7 and self.env.user.id != 377): # vita
approval1 += 1
if approval2 > 0:
- raise UserError("Harus diapprove oleh Pimpinan (Akbar / Tyas)")
+ raise UserError("Harus diapprove oleh Pimpinan")
elif approval1 > 0:
- raise UserError("Harus diapprove oleh Manager (?)")
+ raise UserError("Harus diapprove oleh Manager")
order.approval_status = 'approved'
return res
@@ -125,7 +125,6 @@ class SaleOrder(models.Model):
@api.onchange('sales_tax_id')
def onchange_sales_tax_id(self):
for line in self.order_line:
- # line.tax_id = self.sales_tax_id
line.product_id_change()
@@ -183,6 +182,6 @@ class SaleOrderLine(models.Model):
def product_id_change(self):
for line in self:
super(SaleOrderLine, self).product_id_change()
- if line.product_id:
+ if line.product_id and line.product_id.type == 'product':
line.tax_id = line.order_id.sales_tax_id