diff options
| author | Christophe Simonis <chs@odoo.com> | 2016-07-25 14:33:15 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2016-07-25 14:33:15 +0200 |
| commit | 1089dcf15cb09619776ffeb101b20dedee112830 (patch) | |
| tree | 70078751881ae1cfab68ffd99284120bf3d4362f /addons | |
| parent | 880df4e8b67b408c390d9a24b0dfcfcd1494632b (diff) | |
| parent | 7df4ea5b57412bd2e8623de1701c0d75175878cb (diff) | |
[MERGE] forward port branch saas-6 up to 7df4ea5
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/product/product.py | 2 | ||||
| -rw-r--r-- | addons/product/report/product_pricelist.py | 6 | ||||
| -rw-r--r-- | addons/project/project.py | 1 | ||||
| -rw-r--r-- | addons/web/controllers/main.py | 2 |
4 files changed, 7 insertions, 4 deletions
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'] |
