跳至內容
選單
此問題已被標幟
3 回覆
5784 瀏覽次數

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
9731
1
8月 23
3440
2
12月 22
12732
2
10月 21
4024
0
9月 21
4194