Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
2996 Weergaven

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
Annuleer

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

Auteur Beste antwoord

@Akshay

Your overwrite function is not working.

Avatar
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
0
aug. 25
101
1
aug. 25
255
0
jul. 25
354
2
jun. 25
1431
1
mei 25
1424