跳至內容
選單
此問題已被標幟
1 回覆
5013 瀏覽次數

Hi everyone,

With this developpement, I just wan't to show rounded numbers in My TimeSheets.

Actually, my js file is launched but It seem's like openerp.new_module (see here under) is never called.

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;
        },

    });
};

Thanks a lot in advance,

Simon

頭像
捨棄
最佳答案

You might want to check the following link. Found it through linkedin: Inheriting javascript from OpenERP 7 web client

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
3月 15
5573
1
3月 15
5047
10
4月 23
34313
5
12月 22
29493
20
2月 21
103066