summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-09-24 11:39:41 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-09-24 11:39:41 +0700
commit01b658ddbb6ed4e5c493da2c9cae92ce80a7e135 (patch)
tree39cb84daf300c3c82145b2ac7aeeb254b1717f06
parent248fd7cb0c93e60bdfccaf095cdb601a3319b65e (diff)
fix error column sale order
-rwxr-xr-xindoteknik_custom/models/sale_order.py2
-rwxr-xr-xindoteknik_custom/views/sale_order.xml2
2 files changed, 2 insertions, 2 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index 30ac2058..08e7281e 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -137,7 +137,7 @@ class SaleOrderLine(models.Model):
change_default=True, index=True, tracking=1,
domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]", )
purchase_price = fields.Float('Purchase', required=True, digits='Product Price', default=0.0)
- tax_id = fields.Many2one('account.tax', string='Tax',
+ purchase_tax_id = fields.Many2one('account.tax', string='Tax',
domain=['|', ('active', '=', False), ('active', '=', True)])
def compute_item_margin(self):
diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml
index c101fe1b..03a6b45c 100755
--- a/indoteknik_custom/views/sale_order.xml
+++ b/indoteknik_custom/views/sale_order.xml
@@ -21,7 +21,7 @@
<xpath expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='price_total']" position="after">
<field name="vendor" attrs="{'readonly': [('parent.state', 'not in', ['draft', 'sent', 'sale'])]}"/>
<field name="purchase_price" attrs="{'readonly': [('parent.state', 'not in', ['draft', 'sent', 'sale'])]}"/>
- <field name="tax_id" attrs="{'readonly': [('parent.state', 'not in', ['draft', 'sent', 'sale'])]}"/>
+ <field name="purchase_tax_id" attrs="{'readonly': [('parent.state', 'not in', ['draft', 'sent', 'sale'])]}"/>
<field name="item_margin" groups="sales_team.group_sale_manager"/>
<field name="item_percent_margin" groups="sales_team.group_sale_manager"/>
</xpath>