Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
4148 Tampilan

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
Buang
Penulis Jawaban Terbai

The solution is to add first : @api.multi

And at the end : return res

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
4
Mar 16
5809
1
Mar 16
5459
4
Mar 24
4143
1
Okt 23
6058
1
Jun 22
7359