How to fetch one2many values in excel report ?
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
Hi,
If you have a record set, lets say object, then you can access one2many field value using object.field_name, as it is one2many field, iterate the result over a for loop, to get the value from each lines.
UPDT:
row = col = 0
for line in obj.moce_raw_ids
sheet.write(row, col, line.name, bold)
row += 1
Thanks & Regards
sheet.write(0, 0, obj.move_raw_ids.product_id.name, bold)
i add it like that and i think it works, but i get this error
ValueError: Expected singleton: product.product(2, 3, 4)
i this the error raised because i did't iterate using for loop,
but i'm wondering how to do it in excel report
see the updated answer
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 | |
---|---|---|---|---|
|
1
Jul 22
|
1561 | ||
|
0
Jul 21
|
1218 | ||
Creating Excel Reports
Solved
|
|
1
Apr 23
|
10225 | |
|
0
Nov 22
|
1731 | ||
|
0
Sep 21
|
1463 |