From ec5c761b7d8d28310200cbc02b77640da0ff10ff Mon Sep 17 00:00:00 2001 From: Tejas Tank Date: Thu, 29 Nov 2012 19:15:29 +0500 Subject: [PATCH] [IMP] Avoid to set to_invoice 100% when 'use timesheet' set. bzr revid: tta@openerp.com-20121129141529-avzooa3gxgtpv32d --- addons/hr_timesheet_invoice/hr_timesheet_invoice.py | 7 ------- addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py index a24208d6ce0..e8b90690fdc 100644 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py +++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py @@ -77,13 +77,6 @@ class account_analytic_account(osv.osv): 'pricelist_id': lambda self, cr, uid, ctx: ctx.get('pricelist_id', False), } - def on_change_use_timesheets(self, cr, uid, ids, use_timesheets, context=None): - res = {'value': {}} - if use_timesheets: - ir_model_obj = self.pool.get('ir.model.data') - res['value']['to_invoice'] = ir_model_obj.get_object_reference(cr, uid, 'hr_timesheet_invoice', 'timesheet_invoice_factor1')[1] - return res - def on_change_partner_id(self, cr, uid, ids, partner_id, name, context=None): res = super(account_analytic_account, self).on_change_partner_id(cr, uid, ids, partner_id, name, context=context) part = self.pool.get('res.partner').browse(cr, uid, partner_id, context=context) diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml index 58dca6bd2d5..4b1751abc50 100644 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml +++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml @@ -14,7 +14,7 @@ - +