Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I want to use ref on domain field
but it don't work
Uncaught Error: % undefined as prefix
How to fix it?
Reason : In your code you have not written your domain inside "double quote". Thats why you got an error " % undefined as prefix "
You can use %(xxx)d inside domain. But you need to use as like below.
1) If you are giving domain inside any field definition then you need to define domain as like below.
<field name="M2O_field" domain="[('carrier_id','=',%(fbv_vexpress.carrier_vexpress)d )]" />
2) If you inherit any view and add just domain attribute then you need to define domain as like below.
<field name "M2O_field" position="attributes">
<attribute name="domain">"[('carrier_id','=',%(fbv_vexpress.carrier_vexpress)d )]"</attribute>
I hope you are getting what exactly I want to explain. So, in your case (2) is applicable.
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 7/9/15, 12:08 AM|
|Seen: 2462 times|
|Last updated: 7/10/15, 2:14 AM|