Hello everybody,
I have a problem in Odoo 12 that didn't exist in Odoo 11, inside the order_sale_line I have a field calling sheets of type One2Many, inside this field I have another field called sheet_finishing which is also of type One2Many.
I have an onChange routine, which should update both Sheets and Sheet_finishing. But unfortunately that doesn't happen.
Below is the code.sheets = []
finishing_sheet = []
for x in self.product_id.sheets:
finishing_sheet = []
for y in x.finishing_sheet:
finishing_sheet.append((0, 0, {
'quantity': y.quantity,
'finishing': y.finishing.id,
'finishing_area_boolean': y.finishing_area_boolean,
'sides': y.sides.id,
'width': y.width,
'height': y.height
}))
sheets.append((0, 0, {
'name': x.name.id,
'quantity': x.quantity,
'width': x.width,
'height': x.height,
'color': x.color.id,
'midia': x.midia.id,
'sheet_finishing': finishing_sheet,
'observation': x.observation,
'sheet_asset_id': x.sheet_asset_id.id,
}))
self.update({'sheets': sheets})
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- ลูกค้าสัมพันธ์
- e-Commerce
- ระบบบัญชี
- สินค้าคงคลัง
- PoS
- Project
- MRP
คำถามนี้ถูกตั้งค่าสถานะ
1705
มุมมอง
สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อRelated Posts | ตอบกลับ | มุมมอง | กิจกรรม | |
---|---|---|---|---|
|
0
เม.ย. 20
|
2310 | ||
|
2
ก.พ. 20
|
3141 | ||
|
1
ก.ย. 23
|
2753 | ||
|
1
มี.ค. 23
|
7471 | ||
|
2
ก.พ. 23
|
2721 |
for which field you are calling onchange?
Im Calling from product_id
And i want change the sheets field