[MERGE] forward port branch 8.0 up to a6c2210770

This commit is contained in:
Christophe Simonis
2017-02-23 13:36:19 +01:00
2 changed files with 4 additions and 8 deletions
+3 -1
View File
@@ -475,7 +475,9 @@ class hr_payslip(osv.osv):
def _sum_salary_rule_category(localdict, category, amount): def _sum_salary_rule_category(localdict, category, amount):
if category.parent_id: if category.parent_id:
localdict = _sum_salary_rule_category(localdict, category.parent_id, amount) localdict = _sum_salary_rule_category(localdict, category.parent_id, amount)
localdict['categories'].dict[category.code] = category.code in localdict['categories'].dict and localdict['categories'].dict[category.code] + amount or amount if category.code in localdict['categories'].dict:
amount += localdict['categories'].dict[category.code]
localdict['categories'].dict[category.code] = amount
return localdict return localdict
class BrowsableObject(object): class BrowsableObject(object):
@@ -961,13 +961,7 @@ openerp.web_calendar = function(instance) {
this.$input = $(); this.$input = $();
}, },
get_title: function () { get_title: function () {
var parent = this.getParent(); var title = (this.options.action)? this.options.action.name : '';
if (_.isUndefined(parent)) {
return _t("Create");
}
var title = (_.isUndefined(parent.field_widget)) ?
(parent.string || parent.name) :
parent.field_widget.string || parent.field_widget.name || '';
return _t("Create: ") + title; return _t("Create: ") + title;
}, },
start: function () { start: function () {