I have a many2one field : 'Numeros_bl': fields.many2one('stock.picking', 'Numeros Bls', readonly=True),
On xml I made :
<field name="Numeros_bl" widget="selection" domain="[('state','=','done'),('invoice_state','=','2binvoiced'),('partner_id','=',partner_id)]"/>
Invalid XML architecture as error. Nothing else in the traceback.
Why it's not accepting the widget ?
widget="selection" doesn't support dynamic domains. If you need dynamic domain you have to remove the widget.
But the static domain like <field name="Numeros_bl" widget="selection" domain="[('state','=','done')]"/> will work.
Selection widgets are pre-filtered server-side, and are not meant for dynamic domains, so this will not work and is not a bug.
This is a limitation of all OpenERP version so far (including 6.0), due to semantics of the fields.selection column type.
About This Community
|Asked: 12/12/14, 9:32 AM|
|Seen: 1486 times|
|Last updated: 7/30/15, 5:12 AM|