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

Hello all,

In my custom module, I'm rewriting the create_from_ui method of pos.order class.

I would want to reuse the same variables already defined in the original create_from_ui method.


Here is my code in my custom module :

def create_from_ui(self, cr, uid, orders, context=None):
        _logger.error("create_from_ui NEW BEGIN")
        res =   super(pos_order, self).create_from_ui(cr, uid, orders, context=context)           
        
        #I want to use SOME VARIABLES OF THE ORIGINAL create_from_ui METHOD HERE...
        _logger.error("create_from_ui END BEGIN")
        return res


Do you know how to manage it?


아바타
취소
작성자

So, like I thought, sometimes we have to rewrite a part of the code of the original method in the new one. To rebuild some variables.

베스트 답변

Only those returned via 'res'.

아바타
취소
관련 게시물 답글 화면 활동
2
6월 15
9788
1
8월 23
3573
2
12월 22
12808
2
10월 21
4149
0
9월 21
4295