Merge lp:~openerp-dev/openobject-addons/7.0-opw-607150-acl into lp:openobject-addons/7.0

Proposed by Martin Trigaux (OpenERP)
Status: Merged
Merged at revision: 10045
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-opw-607150-acl
Merge into: lp:openobject-addons/7.0
Diff against target: 22 lines (+5/-5)
1 file modified
sale_stock/sale_stock.py (+5/-5)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-opw-607150-acl
Reviewer Review Type Date Requested Status
Martin Trigaux (OpenERP) (community) Approve
Review via email: mp+219342@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Martin Trigaux (OpenERP) (mat-openerp) wrote :

Merged in 7.0, thanks

revno: 10045 [merge]
revision-id: <email address hidden>

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sale_stock/sale_stock.py'
2--- sale_stock/sale_stock.py 2014-04-24 15:51:41 +0000
3+++ sale_stock/sale_stock.py 2014-05-13 12:20:44 +0000
4@@ -618,13 +618,13 @@
5 res_packing = self.product_packaging_change(cr, uid, ids, pricelist, product, qty, uom, partner_id, packaging, context=context)
6 res['value'].update(res_packing.get('value', {}))
7 warning_msgs = res_packing.get('warning') and res_packing['warning']['message'] or ''
8- compare_qty = float_compare(product_obj.virtual_available * uom2.factor, qty * product_obj.uom_id.factor, precision_rounding=product_obj.uom_id.rounding)
9+ compare_qty = float_compare(product_obj.virtual_available, qty, precision_rounding=uom2.rounding)
10 if (product_obj.type=='product') and int(compare_qty) == -1 \
11- and (product_obj.procure_method=='make_to_stock'):
12+ and (product_obj.procure_method=='make_to_stock'):
13 warn_msg = _('You plan to sell %.2f %s but you only have %.2f %s available !\nThe real stock is %.2f %s. (without reservations)') % \
14- (qty, uom2 and uom2.name or product_obj.uom_id.name,
15- max(0,product_obj.virtual_available), product_obj.uom_id.name,
16- max(0,product_obj.qty_available), product_obj.uom_id.name)
17+ (qty, uom2.name,
18+ max(0,product_obj.virtual_available), uom2.name,
19+ max(0,product_obj.qty_available), uom2.name)
20 warning_msgs += _("Not enough stock ! : ") + warn_msg + "\n\n"
21
22 #update of warning messages