Error to render compiling AST ValueError: Expected singleton: crm.lead(1202, 1201) Template: 12215 Path: /templates/t/t/t/div[2]/div/table[16]/tr/td/t
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
The error message you are seeing is indicating that the crm.lead field you are trying to print in your QWeb template is expecting a single value, but it is receiving multiple values instead.
The issue is likely caused by the t-foreach attribute in your template, which is iterating over the o.opportunity_ids.x_oz_ld_1 field, but it should only contain one value.
There are a few things you can try to fix this issue:
Check if the o.opportunity_ids.x_oz_ld_1 field should only contain a single value, and if so, make sure that it is only storing one value in the database.
If you expect to have multiple values in this field, you should change the t-foreach attribute in your template to t-for, and use a different variable name in the t-as attribute.
You could also check if the field is a many2many field and if it's the case use the dot notation to access the fields you want to use.
If the field is a related field in the many2one relationship, you could use the related attribute to access the field you want to use.
If the issue persists, you could also try checking if the field is defined in the view, and if it is, check if it's pointing to the correct field.
It's also possible that the issue is caused by some other mistake in your template, such as a missing variable or a typo in the field name. So, it's important to double-check the code and make sure everything is correct.
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
0
Jan 25
|
44 | ||
|
0
Oct 24
|
180 | ||
|
3
Nov 24
|
1998 | ||
|
2
Nov 24
|
413 | ||
|
2
Jun 24
|
588 |