Hello,
I have following field in sale.py
'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], change_default=True, readonly=True, states={'draft': [('readonly', False)]}, ondelete='restrict'),
Here my domain is domain=[('sale_ok', '=', True)]
Now I want to extent this domain like
<xpath expr="//field[@name='order_line']/form/group/group/field[@name='product_id']" position="attributes">
<attribute name="domain">[('sale_ok','=',True),('my_new_field','=',True)]</attribute>
</xpath>
But its not working.
I have another idea if I replace product_id with new field like
'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True),('my_new_field','=',True)], change_default=True, readonly=True, states={'draft': [('readonly', False)]}, ondelete='restrict')
I have the same issue!
did you solve this issue?