hello,
I a field function stock_qty_avaible on quotation when I edited a line, I selected a product, I want to update the fields function stock_qty_avaible. I try update field stock_qty_avaible it not works. try with store=True, store=False. The update work when click update button on quotation.
Code :
_columns = {
'stock_qty_available': fields.function(_product_available1, multi='stock_qty_available', type='float', digits_compute=dp.get_precision('Product Unit of Measure'), }
}
def product_id_change(self, cr, uid, ids, pricelist, product, qty=0,
uom=False, qty_uos=0, uos=False, name='', partner_id=False,
lang=False, update_tax=True, date_order=False, packaging=False, fiscal_position=False, flag=False, context=None):
"""
ajout de l'affichage des stocks
"""
resultProductChange = {}
resultProductChange = super(spe_salesOrderLines,self).product_id_change(cr, uid, ids, pricelist, product, qty, uom, qty_uos, uos, name, partner_id, lang, update_tax, date_order, packaging, fiscal_position, flag, context)
resultProductChange['value']['stock_qty_avaible'] = 12
return resultProductChange
Code In the Xml
< field name="stock_qty_available" string="stock Qty" />