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

I want to do some stuff before validating a delivery order in the inventory module. How can I override the validate method?

Avatar
Buang
Jawaban Terbai

Hi,

You can over ride the validate button in the inventory transfers(stock.picking) like this, Inherit the corresponding model, then call super like this,

class Picking(models.Model):
_inherit = "stock.picking"

def button_validate(self):
# do your necessary actions here
res = super(Picking, self).button_validate()
return res

Thanks

Avatar
Buang
Penulis

thanks a lot

Post Terkait Replies Tampilan Aktivitas
1
Mar 22
4817
0
Jul 24
1643
1
Mar 24
1700
Out of Stock Diselesaikan
4
Feb 24
4639
1
Jul 23
2370