[FIX] incorrect date format output in hr.timesheet.analytic.profit default value

lp bug: https://launchpad.net/bugs/900647 fixed

bzr revid: xmo@openerp.com-20111206105021-pr9miyu518ayohj0
This commit is contained in:
Xavier Morel 2011-12-06 11:50:21 +01:00
parent 5a19c4ad15
commit 0606306dd2
1 changed files with 7 additions and 7 deletions

View File

@ -31,18 +31,18 @@ class account_analytic_profit(osv.osv_memory):
'date_to': fields.date('To', required=True),
'journal_ids': fields.many2many('account.analytic.journal', 'analytic_profit_journal_rel', 'analytic_id', 'journal_id', 'Journal', required=True),
'employee_ids': fields.many2many('res.users', 'analytic_profit_emp_rel', 'analytic_id', 'emp_id', 'User', required=True),
}
}
def _date_from(*a):
return datetime.datetime.today().strftime('%Y-%m-1')
return datetime.date.today().replace(day=1).strftime('%Y-%m-%d')
def _date_to(*a):
return datetime.datetime.today().strftime('%Y-%m-%d')
return datetime.date.today().strftime('%Y-%m-%d')
_defaults = {
'date_from': _date_from,
'date_to': _date_to
}
'date_from': _date_from,
'date_to': _date_to
}
def print_report(self, cr, uid, ids, context=None):
line_obj = self.pool.get('account.analytic.line')
@ -72,4 +72,4 @@ class account_analytic_profit(osv.osv_memory):
account_analytic_profit()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: