diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py index 8e592799ca8..fc9226551e3 100644 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py +++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py @@ -76,33 +76,20 @@ class account_analytic_account(osv.osv): } _defaults = { 'pricelist_id': lambda self, cr, uid, ctx: ctx.get('pricelist_id', False), - 'state': 'draft' } def set_close(self, cr, uid, ids, context=None): - self.write(cr, uid, ids, {'state':'close'}, context=context) - return True + return self.write(cr, uid, ids, {'state':'close'}, context=context) def set_cancel(self, cr, uid, ids, context=None): - self.write(cr, uid, ids, {'state':'cancelled'}, context=context) - return True + return self.write(cr, uid, ids, {'state':'cancelled'}, context=context) def set_open(self, cr, uid, ids, context=None): - self.write(cr, uid, ids, {'state':'open'}, context=context) - return True + return self.write(cr, uid, ids, {'state':'open'}, context=context) def set_pending(self, cr, uid, ids, context=None): - self.write(cr, uid, ids, {'state':'pending'}, context=context) - return True - - def set_template(self, cr, uid, ids, context=None): - self.write(cr, uid, ids, {'state':'template'}, context=context) - return True - - def reset_account(self, cr, uid, ids, context=None): - self.write(cr, uid, ids, {'state':'open'}, context=context) - return True - + return self.write(cr, uid, ids, {'state':'pending'}, context=context) + account_analytic_account() diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml index 14519f4753c..fcadae4cf1e 100644 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml +++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml @@ -18,11 +18,9 @@