Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
4223 Zobrazení

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
Zrušit
Autor Nejlepší odpověď

The solution is to add first : @api.multi

And at the end : return res

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
4
bře 16
5914
1
bře 16
5565
4
bře 24
4236
1
říj 23
6183
1
čvn 22
7504