I want to make the "Pricelist" and "Payment Term" readonly if pricelist and payment term is set for the customer in sale order form.
It should be done on onchange of the customer field how can I do this in odoo9?
Is it possible to call a function on readonly attribute like following?
field_name = fields.Many2one('related_model', 'label', readonly="function_name")
def function_name(self):
if condition:
return True
else:
return False