콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
4761 화면

order_line = fields.Many2many ('purchase.order.line', string = 'Available Products')

@ api.model
def default_get (self, fields):
res = super (PurchaseUpdatePriceWizard, self) .default_get (fields)

active_product = self.env ["purchase.order"]. browse (self.env.context.get ("active_id")). search ([]) [0] 
res.update ( {
'order_line': [(6, 0, [active_product.id])]
})
return res



# I am getting blank wizard but i want to display current purchase order line in my wizard. Please help

아바타
취소
베스트 답변

Hi, you can follow following link for this:

https://youtu.be/oMnHpHH54QU

Hope it helps,

Thanks

아바타
취소
베스트 답변

Hi,

In your case, you search the records with the purchase.order models, but you need the purchase.order.line so could you please update your code with the purchase.order.line search.


try to write

res.update ( {
'order_line': [(6, 0, [active_product.order_line.ids])] }
)

Hope it helps

아바타
취소
관련 게시물 답글 화면 활동
3
8월 21
4022
1
4월 24
4673
1
6월 23
5158
0
2월 22
2640
1
6월 21
5815