Skip to Content
Menu
This question has been flagged

Hello Dears,

I have custom one2many field in Sale Order and another field in project

I've created a button in sale order to create project when the order confirmed,

When click on create project the project created but I need also to fill the one2many in project from sale order one2many field

Portretas
Atmesti
Best Answer
for element in first_one2many_field:
project_record.write({'second_one2many_field': [(3, element.id)]})
Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
2
spal. 25
2370
2
saus. 24
1919
1
gruod. 22
2971
0
liep. 22
4232
0
vas. 19
3528