diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 78980c82cf7..918cc545047 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -732,6 +732,11 @@ class purchase_order_line(osv.osv): name=False, price_unit=False, notes=False, context=None): """ onchange handler of product_id. + + :param dict context: 'uom_change' key in context override default onchange + behaviour which force product's UoM, allowing to + specify an 'uom_id' of the same category as product's + UoM (ex: set when called from product_uom's onchange). """ if context is None: context = {} diff --git a/addons/sale/sale.py b/addons/sale/sale.py index d5a8fbdd904..064ae7d2b2e 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -1189,6 +1189,15 @@ class sale_order_line(osv.osv): 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): + """ + onchange handler for product_id. + + :param dict context: 'uom_change' key in context override default onchange + behaviour which force product's UoM, allowing to + specify an 'uom_id' of the same category as product's + UoM (ex: set when called from product_uom's onchange). + + """ if context is None: context = {} lang = lang or context.get('lang',False)