I am trying to add a reference field to a form view in Odoo 10 (enterprise version). This always results in the error "The requested change caused an error in the view. It could be because a field was deleted, but still used somewhere else." disregards of the models that are referenced, and the field is not created. Adding the same field type to the list view does not give any error. Any ideas?
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
This question has been flagged
I am currently entering the data through Odoo's web interface. So what I am doing is to create a new field in my model and choose its type, which is "reference" in this case. Then I need to enter the Python expression for the list in the form of (key,Label) pairs. So to give an example lets reference to the already existing models res.partner and product.product. So my expression would be [('res.partner','Partner'),('res.product','Product')]. The field has indeed been created when entering it though the list view, as can be seen from looking up this field in the database, but adding this field to the form view gives above error. Is above expression correct? I did not find any code examples.
Can you provide us with the code?
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up
Please add your code to the question - otherwise we can only guess.
I am currently entering the data through Odoo's web interface. So what I am doing is to create a new field in my model and choose its type, which is "reference" in this case. Then I need to enter the Python expression for the list in the form of (key,Label) pairs. So to give an example lets reference to the already existing models res.partner and product.product. So my expression would be [('res.partner','Partner'),('res.product','Product')]. The field has indeed been created when entering it though the list view, as can be seen from looking up this field in the database, but adding this field to the form view gives above error. Is above expression correct? I did not find any code examples.