تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
4514 أدوات العرض

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

الصورة الرمزية
إهمال
أفضل إجابة

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

الصورة الرمزية
إهمال
الكاتب

thanks a lot

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مارس 22
4873
0
يوليو 24
1861
1
مارس 24
2144
Out of Stock تم الحل
4
فبراير 24
5174
1
يوليو 23
2796