Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2134 Zobrazení

@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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
3
zář 25
2766
0
srp 25
370
1
srp 25
2428
2
čvc 25
8188
2
čvc 25
4620