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

Is there a way to call a method from super of super (the grandparent class)?

I'm writing a module to show stock in more granular ways on the webshop.
So I would like to overwrite _cart_update() in website_sale_stock.sale_order (which inherits website_sale.sale_order), but also call _cart_update() from website_sale.sale_order.

Calling super(SaleOrder, self)._cart_update() in my model will call the method of website_sale_stock.sale_order, which is unnecessary. I do however need to get the return values from _cart_update() from website_sale.sale_order.

Is this at all possible, or do I have to live with Odoo executing some unnecessary code?

아바타
취소
베스트 답변

Did you figure out how to do this?

아바타
취소
베스트 답변

Have you figured out how to do it yet? I am having the same issue. I want to find a way to call the code of the grandparent class and not that of the parent class.


아바타
취소
관련 게시물 답글 화면 활동
2
5월 25
1583
1
9월 17
5155
2
12월 22
13091
1
12월 22
4436
2
11월 24
4270