Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
3861 Weergaven

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
Annuleer
Auteur Beste antwoord

The solution is to add first : @api.multi

And at the end : return res

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
4
mrt. 16
5395
1
mrt. 16
5117
4
mrt. 24
3663
1
okt. 23
5561
1
jun. 22
6859