
openerp.hr_timesheet_sheet = function(instance) {
    var QWeb = instance.web.qweb;
    var _t = instance.web._t;

    instance.hr_timesheet_sheet.WeeklyTimesheet = instance.web.form.FormWidget.extend({
        template: "hr_timesheet_sheet.WeeklyTimesheet",

    });

    instance.web.form.custom_widgets.add('weekly_timesheet', 'instance.hr_timesheet_sheet.WeeklyTimesheet');

};

@@ -253,16 +253,1243 @@
 sheet%22,%0A
+        init: function() %7B%0A            this._super.apply(this, arguments);%0A            this.set(%7Bsheets: %5B%5D%7D);%0A            this.field_manager.on(%22field_changed:timesheet_ids%22, this, this.query_sheets);%0A            this.on(%22change:sheets%22, this, this.update_sheets);%0A            this.res_o2m_drop = new instance.web.DropMisordered();%0A        %7D,%0A        query_sheets: function() %7B%0A            var self = this;%0A            if (self.updating)%0A                return;%0A            var commands = this.field_manager.get_field_value(%22timesheet_ids%22);%0A            this.res_o2m_drop.add(new instance.web.Model(this.view.model).call(%22resolve_2many_commands%22, %5B%22timesheet_ids%22, commands, %5B%5D%5D))%0A                .then(function(result) %7B%0A                self.querying = true;%0A                self.set(%7Bsheets: result%7D);%0A                self.querying = false;%0A            %7D);%0A        %7D,%0A        update_sheets: function() %7B%0A            var self = this;%0A            if (self.querying)%0A                return;%0A            self.updating = true;%0A            self.field_manager.set_values(%7Btimesheet_ids: self.get(%22sheets%22)%7D).then(function() %7B%0A                self.updating = false;%0A            %7D);%0A        %7D,%0A        start: function() %7B%0A%0A        %7D,
 %0A    %7D);

Synchronize with the o2m