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

Avatar
Discard
Best Answer
for element in first_one2many_field:
project_record.write({'second_one2many_field': [(3, element.id)]})
Avatar
Discard
Related Posts Replies Views Activity
2
Jan 24
512
1
Dec 22
1265
0
Jul 22
2733
0
Feb 19
1822
0
Mar 15
2490