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

I want to disable following stock.inventory default function using my custom module:

@api.onchange('product_id', 'location_id', 'product_uom_id', 'prod_lot_id', 'partner_id', 'package_id')
def onchange_quantity_context(self):
if self.product_id and self.location_id and self.product_id.uom_id.category_id == self.product_uom_id.category_id: # TDE FIXME: last part added because crash
self._compute_theoretical_qty()
self.product_qty = self.theoretical_qty

Anyone can help?


아바타
취소

Hope this customization tips will helps: https://goo.gl/8HgnCF

작성자 베스트 답변

@Akshay

Your overwrite function is not working.

아바타
취소
베스트 답변

Inherit the model, then overwrite the function.

@api.onchange('product_id', 'location_id', 'product_uom_id', 'prod_lot_id', 'partner_id', 'package_id')
def onchange_quantity_context(self):
pass




아바타
취소
관련 게시물 답글 화면 활동
1
8월 25
141
1
8월 25
267
0
7월 25
354
2
6월 25
1437
1
5월 25
1427