跳至內容
選單
此問題已被標幟
2132 瀏覽次數

@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


頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
3
9月 25
2756
0
8月 25
353
1
8月 25
2418
2
7月 25
8184
2
7月 25
4617