diff --git a/addons/product/product.py b/addons/product/product.py index 3c2f1de74e6..cf6c28b5c9f 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -1167,7 +1167,7 @@ class product_product(osv.osv): # if we copy a variant or create one, we keep the same template default['product_tmpl_id'] = product.product_tmpl_id.id elif 'name' not in default: - default['name'] = _("%s (copy)") % (product.name,) + default['name'] = product.name return super(product_product, self).copy(cr, uid, id, default=default, context=context) diff --git a/addons/product/report/product_pricelist.py b/addons/product/report/product_pricelist.py index 9d622816d53..28003d84bf9 100644 --- a/addons/product/report/product_pricelist.py +++ b/addons/product/report/product_pricelist.py @@ -4,6 +4,7 @@ import time from openerp.osv import osv from openerp.report import report_sxw +from openerp.tools import float_round class product_pricelist(report_sxw.rml_parse): @@ -88,10 +89,11 @@ class product_pricelist(report_sxw.rml_parse): pricelist = self.pool.get('product.pricelist').browse(self.cr, self.uid, [pricelist_id], context=self.localcontext)[0] price_dict = self.pool.get('product.pricelist').price_get(self.cr, self.uid, [pricelist_id], product_id, qty, context=self.localcontext) if price_dict[pricelist_id]: - price = self.formatLang(price_dict[pricelist_id], digits=sale_price_digits, currency_obj=pricelist.currency_id) + price = float_round(price_dict[pricelist_id], precision_digits=sale_price_digits) else: res = self.pool.get('product.product').read(self.cr, self.uid, [product_id], ['list_price']) - price = self.formatLang(res[0]['list_price'], digits=sale_price_digits, currency_obj=pricelist.currency_id) + price = float_round(res[0]['list_price'], precision_digits=sale_price_digits) + price = self.formatLang(price, digits=sale_price_digits, currency_obj=pricelist.currency_id) return price diff --git a/addons/project/project.py b/addons/project/project.py index f3b4c4c7f28..07e22984245 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -394,6 +394,7 @@ class task(osv.osv): def onchange_planned(self, cr, uid, ids, planned=0.0, effective=0.0): return {'value': {'remaining_hours': planned - effective}} + @api.cr_uid_ids_context def onchange_project(self, cr, uid, id, project_id, context=None): if project_id: project = self.pool.get('project.project').browse(cr, uid, project_id, context=context) diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index f9bc7999256..e864ccb5d5d 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -1330,7 +1330,7 @@ class ExportFormat(object): Model = request.session.model(model) context = dict(request.context or {}, **params.get('context', {})) - ids = ids or Model.search(domain, 0, False, False, context=context) + ids = ids or Model.search(domain, offset=0, limit=False, order=False, context=context) if not request.env[model]._is_an_ordinary_table(): fields = [field for field in fields if field['name'] != 'id'] diff --git a/doc/cla/corporate/acsone.md b/doc/cla/corporate/acsone.md index 8e41f328f83..1e64c996e74 100644 --- a/doc/cla/corporate/acsone.md +++ b/doc/cla/corporate/acsone.md @@ -23,3 +23,4 @@ Laurent Mignon laurent.mignon@acsone.eu https://github.com/lmignon Olivier Laurent olivier.laurent@acsone.eu https://github.com/Olivier-LAURENT Philippe Schmidt philippe.schmidt@acsone.eu https://github.com/phschmidt Stéphane Bidoul stephane.bidoul@acsone.eu https://github.com/sbidoul +Thomas Binsfeld thomas.binsfeld@acsone.eu https://github.com/ThomasBinsfeld