diff options
| -rwxr-xr-x | indoteknik_custom/models/purchase_order.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index c2b15078..b9211276 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -118,9 +118,18 @@ class PurchaseOrder(models.Model): show_description = fields.Boolean( string='Show Description', - default=True + compute='_compute_show_description' ) - + + @api.depends('show_description') + def _compute_show_description(self): + for order in self: + # Show desc false for altama only + if order.partner_id == 5571: + order.show_description = False + else: + order.show_description = True + @api.onchange('show_description') def onchange_show_description(self): if self.show_description == True: |
