Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
3 Respostas
5766 Visualizações

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
Cancelar
Autor

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.

Melhor resposta

Only those returned via 'res'.

Avatar
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
2
jun. 15
9710
1
ago. 23
3423
2
dez. 22
12702
2
out. 21
4006
0
set. 21
4186