Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
3 Replies
5771 Tampilan

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?


Avatar
Buang
Penulis

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.

Jawaban Terbai

Only those returned via 'res'.

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
2
Jun 15
9724
1
Agu 23
3425
2
Des 22
12705
2
Okt 21
4014
0
Sep 21
4188