Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
3858 Visualizações

Hi, I inherit of my make_po method to do its core functionalities and in addition the call of my new method "transitAccountAnalytic"

But "make_po" is runned 3 times and I don't know why.


This is my class from procurement.py :

class procurement_order(models.Model):

_inherit = 'procurement.order'

def make_po(self):

print "=== make_po ==="

self.transitAccountAnalytic()

def transitAccountAnalytic(self):

print "=== transitAccountAnalytic ==="

procurement_order()

Thanks

Avatar
Cancelar
Autor Melhor resposta

The solution is to add first : @api.multi

And at the end : return res

Avatar
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
4
mar. 16
5394
1
mar. 16
5116
4
mar. 24
3663
1
out. 23
5560
1
jun. 22
6859