I want partner field to be mandatory if the account selected in lines is of type payable. i have added type field in the move line related to account type
type_account = fields.Many2one(string='type',related ='account_id.user_type_id')
and i have put a condition on the partner field which is like below.
<field name="partner_id" attrs="{'required':[('type_account','=','Payable')]}"/>
I have tried this with both "payable" and "payable" no error but doesnt work .
Hope this idea will help; https://goo.gl/BCxCpk