@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