diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2015-12-10 10:05:06 +0100 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2015-12-10 11:37:34 +0100 |
| commit | 35a390daf1c8fa7aa0ffe548d0986e8e0a41f4e6 (patch) | |
| tree | 100ce887677438b1326ddff81348a25f5f661c26 | |
| parent | 6e945de681452d6753f58a749352bfbe099bac1d (diff) | |
[FIX] sale: change qty updates weight
The method `product_id_change` has become quite a mess with time as it
gathers a lot of onchanges. Therefore, previous commits were made in
order to prevent unwanted side effects, such as af07b2a0, 1cedcf6a and
136bd723.
This revision fixes the weight which was lost with commit af07b2a0.
opw-658712
| -rw-r--r-- | addons/sale/sale.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 49652efb234..7e1c28577a4 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -1173,10 +1173,10 @@ class sale_order_line(osv.osv): price = Product.price_get(cr, uid, [product], ptype='list_price', context=ctx_product)[product] or False price = self.pool['account.tax']._fix_tax_included_price(cr, uid, price, taxes, result['tax_id']) if context.get('uom_qty_change', False): - product_uos_qty = result.get('product_uos_qty') - result, domain = {}, {} - if product_uos_qty: - result['product_uos_qty'] = product_uos_qty + # Remove unnecessary changes + domain = {} + for key in ["name", "product_uom", "product_uos", "tax_id"]: + result.pop(key, None) result.update({'price_unit': price}) return {'value': result, 'domain': domain} |
