Skip to Content
मेन्यू
This question has been flagged
2 Replies
2990 Views

I want to disable following stock.inventory default function using my custom module:

@api.onchange('product_id', 'location_id', 'product_uom_id', 'prod_lot_id', 'partner_id', 'package_id')
def onchange_quantity_context(self):
if self.product_id and self.location_id and self.product_id.uom_id.category_id == self.product_uom_id.category_id: # TDE FIXME: last part added because crash
self._compute_theoretical_qty()
self.product_qty = self.theoretical_qty

Anyone can help?


Avatar
Discard

Hope this customization tips will helps: https://goo.gl/8HgnCF

Author Best Answer

@Akshay

Your overwrite function is not working.

Avatar
Discard
Best Answer

Inherit the model, then overwrite the function.

@api.onchange('product_id', 'location_id', 'product_uom_id', 'prod_lot_id', 'partner_id', 'package_id')
def onchange_quantity_context(self):
pass




Avatar
Discard
Related Posts Replies Views Activity
0
अग॰ 25
1
1
अग॰ 25
234
0
जुल॰ 25
354
2
जून 25
1428
1
मई 25
1421