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.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 12/12/14, 9:32 AM|
|Seen: 1424 times|
|Last updated: 7/30/15, 5:12 AM|