Skip to Content
Menu
This question has been flagged
1691 Views

@api.onchange("allocation_id")
def _set_order_lines(self):

order_lines = []
for line in self.allocation_id.allocation_line_ids:
order = {
'allocation_line_id': line.id
}
order_lines.append((0,0,order))

self.order_line_ids = order_lines


this is the code I currently use, it just populates the line items which it does correctly and the  values for each column in the line items are showing 


the problem is after I click save the allocation_line_id in the model becomes null in the database that us why the lines items values are blank because all the values are related to the allocation_line_id


Avatar
Discard
Related Posts Replies Views Activity
1
Nov 24
1482
1
Nov 24
1186
2
Sep 24
1046
1
Aug 24
2450
3
Aug 24
2681