diff --git a/addons/account_followup/wizard/account_followup_print.py b/addons/account_followup/wizard/account_followup_print.py index 550ca753059..e72ebdc448f 100644 --- a/addons/account_followup/wizard/account_followup_print.py +++ b/addons/account_followup/wizard/account_followup_print.py @@ -168,7 +168,7 @@ class account_followup_print(osv.osv_memory): if partner.max_followup_id.send_letter: partner_ids_to_print.append(partner.id) nbprints += 1 - message = _("Follow-up letter of ") + " " + partner.partner_id.latest_followup_level_id_without_lit.name + "" + _(" will be sent") + message = "%s %s %s" % (_("Follow-up letter of "), partner.partner_id.latest_followup_level_id_without_lit.name, _(" will be sent")) partner_obj.message_post(cr, uid, [partner.partner_id.id], body=message, context=context) if nbunknownmails == 0: resulttext += str(nbmails) + _(" email(s) sent") diff --git a/addons/product/_common.py b/addons/product/_common.py index c05dcee66a2..f44f6b11a4c 100644 --- a/addons/product/_common.py +++ b/addons/product/_common.py @@ -20,9 +20,6 @@ ############################################################################## from openerp import tools -import math - - def rounding(f, r): # TODO for trunk: log deprecation warning # _logger.warning("Deprecated rounding method, please use tools.float_round to round floats.") @@ -32,4 +29,4 @@ def rounding(f, r): def ceiling(f, r): if not r: return f - return math.ceil(f / r) * r + return tools.float_round(f, precision_rounding=r, rounding_method='UP') diff --git a/addons/product/product.py b/addons/product/product.py index d284a6242fb..9f014ecca46 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -134,10 +134,10 @@ class product_uom(osv.osv): 'name': fields.char('Unit of Measure', required=True, translate=True), 'category_id': fields.many2one('product.uom.categ', 'Product Category', required=True, ondelete='cascade', help="Conversion between Units of Measure can only occur if they belong to the same category. The conversion will be made based on the ratios."), - 'factor': fields.float('Ratio', required=True,digits=(12, 12), + 'factor': fields.float('Ratio', required=True, digits=0, # force NUMERIC with unlimited precision help='How much bigger or smaller this unit is compared to the reference Unit of Measure for this category:\n'\ '1 * (reference unit) = ratio * (this unit)'), - 'factor_inv': fields.function(_factor_inv, digits=(12,12), + 'factor_inv': fields.function(_factor_inv, digits=0, # force NUMERIC with unlimited precision fnct_inv=_factor_inv_write, string='Bigger Ratio', help='How many times this Unit of Measure is bigger than the reference Unit of Measure in this category:\n'\ diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml index 88aa0d93c21..4eb42e38d3b 100644 --- a/addons/product/product_view.xml +++ b/addons/product/product_view.xml @@ -592,8 +592,14 @@