通过这个开发,我只想在My TimeSheets中显示舍入的数字。
实际上,我的JS文件已经启动,但似乎永远不会调用openerp.new_module
(见下文)。
openerp.new_module = function(instance){
var module = instance.hr_timesheet_sheet // loading the namespace of the 'sample' module
var _super_ = module.WeeklyTimesheet.prototype.sum_box;
module.WeeklyTimesheet.include({
sum_box : function(){
//_super_.call(this); // calling the original Foo.bar() method
var line_total = 0;
_.each(account.days[day_count].lines, function(line) {
line_total += line.unit_amount;
});
return Math.round(line_total*100)/100;
},
});
};
提前多多感谢。