Skip to Content
मेन्यू
This question has been flagged
1 Reply
3873 Views

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
Discard
Author Best Answer

The solution is to add first : @api.multi

And at the end : return res

Avatar
Discard
Related Posts Replies Views Activity
4
मार्च 16
5419
1
मार्च 16
5134
4
मार्च 24
3688
1
अक्तू॰ 23
5583
1
जून 22
6873