[IMP] sale/purchase: add explaination for context 'uom_change' key
authorXavier ALT <xal@openerp.com>
Tue, 9 Oct 2012 10:18:10 +0000 (12:18 +0200)
committerXavier ALT <xal@openerp.com>
Tue, 9 Oct 2012 10:18:10 +0000 (12:18 +0200)
bzr revid: xal@openerp.com-20121009101810-yzb8so96ln14t6ri

addons/purchase/purchase.py
addons/sale/sale.py

index 78980c8..918cc54 100644 (file)
@@ -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 = {}
index d5a8fbd..064ae7d 100644 (file)
@@ -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)