跳至內容
選單
此問題已被標幟
1 回覆
3860 瀏覽次數

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

頭像
捨棄
作者 最佳答案

The solution is to add first : @api.multi

And at the end : return res

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
4
3月 16
5395
1
3月 16
5117
4
3月 24
3663
1
10月 23
5561
1
6月 22
6859