[MERGE] forward port branch saas-6 up to 7df4ea5
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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']
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user