diff --git a/addons/hr_payroll/hr_payroll.py b/addons/hr_payroll/hr_payroll.py
index 397938f3442..5fad62a0b03 100644
--- a/addons/hr_payroll/hr_payroll.py
+++ b/addons/hr_payroll/hr_payroll.py
@@ -846,18 +846,20 @@ result = rules.NET > categories.NET * 0.10''',
rule = self.browse(cr, uid, rule_id, context=context)
if rule.amount_select == 'fix':
try:
- return rule.amount_fix, eval(rule.quantity, localdict), 100.0
+ return rule.amount_fix, float(eval(rule.quantity, localdict)), 100.0
except:
raise osv.except_osv(_('Error!'), _('Wrong quantity defined for salary rule %s (%s).')% (rule.name, rule.code))
elif rule.amount_select == 'percentage':
try:
- return eval(rule.amount_percentage_base, localdict), eval(rule.quantity, localdict), rule.amount_percentage
+ return (float(eval(rule.amount_percentage_base, localdict)),
+ float(eval(rule.quantity, localdict)),
+ rule.amount_percentage)
except:
raise osv.except_osv(_('Error!'), _('Wrong percentage base or quantity defined for salary rule %s (%s).')% (rule.name, rule.code))
else:
try:
eval(rule.amount_python_compute, localdict, mode='exec', nocopy=True)
- return localdict['result'], 'result_qty' in localdict and localdict['result_qty'] or 1.0, 'result_rate' in localdict and localdict['result_rate'] or 100.0
+ return float(localdict['result']), 'result_qty' in localdict and localdict['result_qty'] or 1.0, 'result_rate' in localdict and localdict['result_rate'] or 100.0
except:
raise osv.except_osv(_('Error!'), _('Wrong python code defined for salary rule %s (%s).')% (rule.name, rule.code))
diff --git a/addons/hr_timesheet_sheet/static/src/xml/timesheet.xml b/addons/hr_timesheet_sheet/static/src/xml/timesheet.xml
index 7ac7330f2d3..c9911e60518 100644
--- a/addons/hr_timesheet_sheet/static/src/xml/timesheet.xml
+++ b/addons/hr_timesheet_sheet/static/src/xml/timesheet.xml
@@ -36,7 +36,7 @@
-
+
Total
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index abca85df6ef..363fdc620bd 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -1095,10 +1095,12 @@ class purchase_order_line(osv.osv):
context_partner.update( {'lang': lang, 'partner_id': partner_id} )
product = product_product.browse(cr, uid, product_id, context=context_partner)
#call name_get() with partner in the context to eventually match name and description in the seller_ids field
- dummy, name = product_product.name_get(cr, uid, product_id, context=context_partner)[0]
- if product.description_purchase:
- name += '\n' + product.description_purchase
- res['value'].update({'name': name})
+ if not name or not uom_id:
+ # The 'or not uom_id' part of the above condition can be removed in master. See commit message of the rev. introducing this line.
+ dummy, name = product_product.name_get(cr, uid, product_id, context=context_partner)[0]
+ if product.description_purchase:
+ name += '\n' + product.description_purchase
+ res['value'].update({'name': name})
# - set a domain on product_uom
res['domain'] = {'product_uom': [('category_id','=',product.uom_id.category_id.id)]}
diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml
index dead323d2d2..994c83e4fbe 100644
--- a/addons/purchase/purchase_view.xml
+++ b/addons/purchase/purchase_view.xml
@@ -237,7 +237,7 @@
-
+
@@ -419,7 +419,7 @@
-
+
diff --git a/addons/warning/warning.py b/addons/warning/warning.py
index 1834ef9f2cc..8387f49c585 100644
--- a/addons/warning/warning.py
+++ b/addons/warning/warning.py
@@ -237,10 +237,10 @@ class purchase_order_line(osv.osv):
_inherit = 'purchase.order.line'
def onchange_product_id(self,cr, uid, ids, pricelist, product, qty, uom,
partner_id, date_order=False, fiscal_position_id=False, date_planned=False,
- name=False, price_unit=False, state='draft', notes=False, context=None):
+ name=False, price_unit=False, state='draft', context=None):
warning = {}
if not product:
- return {'value': {'price_unit': price_unit or 0.0, 'name': name or '', 'notes': notes or '', 'product_uom' : uom or False}, 'domain':{'product_uom':[]}}
+ return {'value': {'price_unit': price_unit or 0.0, 'name': name or '', 'product_uom' : uom or False}, 'domain':{'product_uom':[]}}
product_obj = self.pool.get('product.product')
product_info = product_obj.browse(cr, uid, product)
title = False
diff --git a/addons/web/static/src/js/view_list_editable.js b/addons/web/static/src/js/view_list_editable.js
index 888ff4c0559..13188ff3764 100644
--- a/addons/web/static/src/js/view_list_editable.js
+++ b/addons/web/static/src/js/view_list_editable.js
@@ -226,6 +226,7 @@
var item = false;
if (record) {
item = record.attributes;
+ this.dataset.select_id(record.get('id'));
} else {
record = this.make_empty_record(false);
this.records.add(record, {