Skip to Content
Menú
This question has been flagged
1 Respondre
3862 Vistes

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
Descartar
Autor Best Answer

The solution is to add first : @api.multi

And at the end : return res

Avatar
Descartar
Related Posts Respostes Vistes Activitat
4
de març 16
5396
1
de març 16
5117
4
de març 24
3663
1
d’oct. 23
5561
1
de juny 22
6859