summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindoteknik_custom/models/purchase_order.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py
index b9211276..8772dea9 100755
--- a/indoteknik_custom/models/purchase_order.py
+++ b/indoteknik_custom/models/purchase_order.py
@@ -118,17 +118,17 @@ class PurchaseOrder(models.Model):
show_description = fields.Boolean(
string='Show Description',
- compute='_compute_show_description'
+ compute='_compute_show_description',
+ default=True
)
- @api.depends('show_description')
+ @api.depends('partner_id')
def _compute_show_description(self):
for order in self:
- # Show desc false for altama only
- if order.partner_id == 5571:
+ if order.partner_id.id == 5571:
order.show_description = False
else:
- order.show_description = True
+ order.show_description = order.show_description
@api.onchange('show_description')
def onchange_show_description(self):