← Back to team overview

openerp-dev-web team mailing list archive

[Merge] lp:~openerp-dev/openobject-addons/pso-dev-addons3 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3

 

pso (Open ERP) has proposed merging lp:~openerp-dev/openobject-addons/pso-dev-addons3 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  #617974 trunk - hr payment - rounding issue payment slip
  https://bugs.launchpad.net/bugs/617974
  #663585 [6.0rc1] suggested improvements to PO and SO form view
  https://bugs.launchpad.net/bugs/663585
  #669360 hr_timeeshet_sheet : installation fails on 1st (and probably last) date of the month.
  https://bugs.launchpad.net/bugs/669360
  #669533 [hr_timesheet] Employee timesheet reports confuse employee id and user id
  https://bugs.launchpad.net/bugs/669533


Hello,

I have used lambda with all time and datetime functions in _defaults.

Thanks,
pso.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/pso-dev-addons3/+merge/40084
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/pso-dev-addons3.
=== modified file 'account/account.py'
--- account/account.py	2010-11-03 13:27:03 +0000
+++ account/account.py	2010-11-04 13:06:30 +0000
@@ -1124,7 +1124,7 @@
         'name': '/',
         'state': 'draft',
         'period_id': _get_period,
-        'date': time.strftime('%Y-%m-%d'),
+        'date': lambda *a: time.strftime('%Y-%m-%d'),
         'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
     }
 
@@ -2157,7 +2157,7 @@
         'lines_id': fields.one2many('account.subscription.line', 'subscription_id', 'Subscription Lines')
     }
     _defaults = {
-        'date_start': time.strftime('%Y-%m-%d'),
+        'date_start': lambda *a: time.strftime('%Y-%m-%d'),
         'period_type': 'month',
         'period_total': 12,
         'period_nbr': 1,

=== modified file 'account/account_analytic_line.py'
--- account/account_analytic_line.py	2010-11-01 09:42:59 +0000
+++ account/account_analytic_line.py	2010-11-04 13:06:30 +0000
@@ -41,7 +41,7 @@
     }
 
     _defaults = {
-        'date': time.strftime('%Y-%m-%d'),
+        'date': lambda *a: time.strftime('%Y-%m-%d'),
         'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.analytic.line', context=c),
     }
     _order = 'date desc'

=== modified file 'account/account_bank_statement.py'
--- account/account_bank_statement.py	2010-11-04 04:54:38 +0000
+++ account/account_bank_statement.py	2010-11-04 13:06:30 +0000
@@ -173,7 +173,7 @@
 
     _defaults = {
         'name': "/",
-        'date': time.strftime('%Y-%m-%d'),
+        'date': lambda *a: time.strftime('%Y-%m-%d'),
         'state': 'draft',
         'balance_start': _default_balance_start,
         'journal_id': _default_journal_id,
@@ -473,7 +473,7 @@
     }
     _defaults = {
         'name': lambda self,cr,uid,context={}: self.pool.get('ir.sequence').get(cr, uid, 'account.bank.statement.line'),
-        'date': time.strftime('%Y-%m-%d'),
+        'date': lambda *a: time.strftime('%Y-%m-%d'),
         'type': 'general',
     }
 

=== modified file 'account/account_cash_statement.py'
--- account/account_cash_statement.py	2010-10-28 12:59:20 +0000
+++ account/account_cash_statement.py	2010-11-04 13:06:30 +0000
@@ -233,7 +233,7 @@
     }
     _defaults = {
         'state': 'draft',
-        'date': time.strftime("%Y-%m-%d %H:%M:%S"),
+        'date': lambda *a: time.strftime("%Y-%m-%d %H:%M:%S"),
         'user_id': lambda self, cr, uid, context=None: uid,
         'starting_details_ids': _get_cash_open_box_lines,
         'ending_details_ids': _get_default_cash_close_box_lines

=== modified file 'account/account_move_line.py'
--- account/account_move_line.py	2010-11-03 11:46:17 +0000
+++ account/account_move_line.py	2010-11-04 13:06:30 +0000
@@ -488,7 +488,7 @@
         'blocked': False,
         'centralisation': 'normal',
         'date': _get_date,
-        'date_created': time.strftime('%Y-%m-%d'),
+        'date_created': lambda *a: time.strftime('%Y-%m-%d'),
         'state': 'draft',
         'currency_id': _get_currency,
         'journal_id': lambda self, cr, uid, c: c.get('journal_id', False),

=== modified file 'account/installer.py'
--- account/installer.py	2010-11-02 07:31:48 +0000
+++ account/installer.py	2010-11-04 13:06:30 +0000
@@ -86,8 +86,8 @@
         return 'configurable'
 
     _defaults = {
-        'date_start': time.strftime('%Y-01-01'),
-        'date_stop': time.strftime('%Y-12-31'),
+        'date_start': lambda *a: time.strftime('%Y-01-01'),
+        'date_stop': lambda *a: time.strftime('%Y-12-31'),
         'period': 'month',
         'sale_tax': 0.0,
         'purchase_tax': 0.0,

=== modified file 'account/project/wizard/account_analytic_balance_report.py'
--- account/project/wizard/account_analytic_balance_report.py	2010-08-19 11:51:57 +0000
+++ account/project/wizard/account_analytic_balance_report.py	2010-11-04 13:06:30 +0000
@@ -33,8 +33,8 @@
     }
 
     _defaults = {
-        'date1':time.strftime('%Y-01-01'),
-        'date2':time.strftime('%Y-%m-%d')
+        'date1': lambda *a: time.strftime('%Y-01-01'),
+        'date2': lambda *a: time.strftime('%Y-%m-%d')
     }
 
     def check_report(self, cr, uid, ids, context=None):

=== modified file 'account/project/wizard/account_analytic_cost_ledger_for_journal_report.py'
--- account/project/wizard/account_analytic_cost_ledger_for_journal_report.py	2010-08-19 11:51:57 +0000
+++ account/project/wizard/account_analytic_cost_ledger_for_journal_report.py	2010-11-04 13:06:30 +0000
@@ -33,8 +33,8 @@
     }
 
     _defaults = {
-        'date1':time.strftime('%Y-01-01'),
-        'date2':time.strftime('%Y-%m-%d')
+        'date1': lambda *a: time.strftime('%Y-01-01'),
+        'date2': lambda *a: time.strftime('%Y-%m-%d')
     }
 
     def check_report(self, cr, uid, ids, context=None):

=== modified file 'account/project/wizard/account_analytic_cost_ledger_report.py'
--- account/project/wizard/account_analytic_cost_ledger_report.py	2010-08-19 11:51:57 +0000
+++ account/project/wizard/account_analytic_cost_ledger_report.py	2010-11-04 13:06:30 +0000
@@ -32,8 +32,8 @@
     }
 
     _defaults = {
-        'date1':time.strftime('%Y-01-01'),
-        'date2':time.strftime('%Y-%m-%d')
+        'date1': lambda *a: time.strftime('%Y-01-01'),
+        'date2': lambda *a: time.strftime('%Y-%m-%d')
     }
 
     def check_report(self, cr, uid, ids, context=None):

=== modified file 'account/project/wizard/account_analytic_inverted_balance_report.py'
--- account/project/wizard/account_analytic_inverted_balance_report.py	2010-08-19 11:51:57 +0000
+++ account/project/wizard/account_analytic_inverted_balance_report.py	2010-11-04 13:06:30 +0000
@@ -32,8 +32,8 @@
     }
 
     _defaults = {
-        'date1':time.strftime('%Y-01-01'),
-        'date2':time.strftime('%Y-%m-%d')
+        'date1': lambda *a: time.strftime('%Y-01-01'),
+        'date2': lambda *a: time.strftime('%Y-%m-%d')
     }
 
     def check_report(self, cr, uid, ids, context=None):

=== modified file 'account/project/wizard/account_analytic_journal_report.py'
--- account/project/wizard/account_analytic_journal_report.py	2010-08-19 11:51:57 +0000
+++ account/project/wizard/account_analytic_journal_report.py	2010-11-04 13:06:30 +0000
@@ -32,8 +32,8 @@
     }
 
     _defaults = {
-        'date1':time.strftime('%Y-01-01'),
-        'date2':time.strftime('%Y-%m-%d')
+        'date1': lambda *a: time.strftime('%Y-01-01'),
+        'date2': lambda *a: time.strftime('%Y-%m-%d')
     }
 
     def check_report(self, cr, uid, ids, context=None):

=== modified file 'account/wizard/account_automatic_reconcile.py'
--- account/wizard/account_automatic_reconcile.py	2010-10-15 13:35:22 +0000
+++ account/wizard/account_automatic_reconcile.py	2010-11-04 13:06:30 +0000
@@ -49,8 +49,8 @@
         return context.get('unreconciled', 0)
 
     _defaults = {
-        'date1': time.strftime('%Y-01-01'),
-        'date2': time.strftime('%Y-%m-%d'),
+        'date1': lambda *a: time.strftime('%Y-01-01'),
+        'date2': lambda *a: time.strftime('%Y-%m-%d'),
         'reconciled': _get_reconciled,
         'unreconciled': _get_unreconciled,
         'power': 2

=== modified file 'account/wizard/account_invoice_refund.py'
--- account/wizard/account_invoice_refund.py	2010-10-28 08:35:00 +0000
+++ account/wizard/account_invoice_refund.py	2010-11-04 13:06:30 +0000
@@ -50,7 +50,7 @@
         return journal and journal[0] or False
 
     _defaults = {
-        'date': time.strftime('%Y-%m-%d'),
+        'date': lambda *a: time.strftime('%Y-%m-%d'),
         'journal_id': _get_journal,
         'filter_refund': 'modify',
     }

=== modified file 'account/wizard/account_reconcile.py'
--- account/wizard/account_reconcile.py	2010-10-18 06:49:23 +0000
+++ account/wizard/account_reconcile.py	2010-11-04 13:06:30 +0000
@@ -119,7 +119,7 @@
         'analytic_id': fields.many2one('account.analytic.account', 'Analytic Account', domain=[('parent_id', '!=', False)]),
     }
     _defaults = {
-        'date_p': time.strftime('%Y-%m-%d'),
+        'date_p': lambda *a: time.strftime('%Y-%m-%d'),
         'comment': 'Write-off',
     }
 

=== modified file 'account/wizard/account_report_aged_partner_balance.py'
--- account/wizard/account_report_aged_partner_balance.py	2010-10-08 12:49:22 +0000
+++ account/wizard/account_report_aged_partner_balance.py	2010-11-04 13:06:30 +0000
@@ -40,7 +40,7 @@
     }
     _defaults = {
         'period_length': 30,
-        'date_from': time.strftime('%Y-%m-%d'),
+        'date_from': lambda *a: time.strftime('%Y-%m-%d'),
         'direction_selection': 'past',
     }
 

=== modified file 'account_analytic_plans/wizard/account_crossovered_analytic.py'
--- account_analytic_plans/wizard/account_crossovered_analytic.py	2010-10-11 11:25:50 +0000
+++ account_analytic_plans/wizard/account_crossovered_analytic.py	2010-11-04 13:06:30 +0000
@@ -35,8 +35,8 @@
         'empty_line': fields.boolean('Dont show empty lines'),
     }
     _defaults = {
-         'date1': time.strftime('%Y-01-01'),
-         'date2': time.strftime('%Y-%m-%d'),
+         'date1': lambda *a: time.strftime('%Y-01-01'),
+         'date2': lambda *a: time.strftime('%Y-%m-%d'),
     }
 
     def print_report(self, cr, uid, ids, context=None):

=== modified file 'account_budget/wizard/account_budget_analytic.py'
--- account_budget/wizard/account_budget_analytic.py	2010-09-29 12:51:08 +0000
+++ account_budget/wizard/account_budget_analytic.py	2010-11-04 13:06:30 +0000
@@ -31,8 +31,8 @@
         'date_to': fields.date('End of period', required=True),
     }
     _defaults= {
-        'date_from': time.strftime('%Y-01-01'),
-        'date_to': time.strftime('%Y-%m-%d'),
+        'date_from': lambda *a: time.strftime('%Y-01-01'),
+        'date_to': lambda *a: time.strftime('%Y-%m-%d'),
     }
 
     def check_report(self, cr, uid, ids, context=None):

=== modified file 'account_budget/wizard/account_budget_crossovered_report.py'
--- account_budget/wizard/account_budget_crossovered_report.py	2010-10-12 12:50:50 +0000
+++ account_budget/wizard/account_budget_crossovered_report.py	2010-11-04 13:06:30 +0000
@@ -31,8 +31,8 @@
         'date_to': fields.date('End of period', required=True),
     }
     _defaults = {
-        'date_from': time.strftime('%Y-01-01'),
-        'date_to': time.strftime('%Y-%m-%d'),
+        'date_from': lambda *a: time.strftime('%Y-01-01'),
+        'date_to': lambda *a: time.strftime('%Y-%m-%d'),
     }
 
     def check_report(self, cr, uid, ids, context=None):

=== modified file 'account_budget/wizard/account_budget_crossovered_summary_report.py'
--- account_budget/wizard/account_budget_crossovered_summary_report.py	2010-09-29 12:51:08 +0000
+++ account_budget/wizard/account_budget_crossovered_summary_report.py	2010-11-04 13:06:30 +0000
@@ -33,8 +33,8 @@
         'date_to': fields.date('End of period', required=True),
     }
     _defaults= {
-        'date_from': time.strftime('%Y-01-01'),
-        'date_to': time.strftime('%Y-%m-%d'),
+        'date_from': lambda *a: time.strftime('%Y-01-01'),
+        'date_to': lambda *a: time.strftime('%Y-%m-%d'),
     }
 
     def check_report(self, cr, uid, ids, context=None):

=== modified file 'account_budget/wizard/account_budget_report.py'
--- account_budget/wizard/account_budget_report.py	2010-10-13 05:36:33 +0000
+++ account_budget/wizard/account_budget_report.py	2010-11-04 13:06:30 +0000
@@ -32,8 +32,8 @@
         'date_to': fields.date('End of period', required=True),
     }
     _defaults= {
-        'date_from': time.strftime('%Y-01-01'),
-        'date_to': time.strftime('%Y-%m-%d'),
+        'date_from': lambda *a: time.strftime('%Y-01-01'),
+        'date_to': lambda *a: time.strftime('%Y-%m-%d'),
     }
 
     def check_report(self, cr, uid, ids, context=None):

=== modified file 'account_coda/account_coda.py'
--- account_coda/account_coda.py	2010-10-19 05:31:59 +0000
+++ account_coda/account_coda.py	2010-11-04 13:06:30 +0000
@@ -37,7 +37,7 @@
         'company_id': fields.many2one('res.company', 'Company', readonly=True)
     }
     _defaults = {
-        'date': time.strftime('%Y-%m-%d'),
+        'date': lambda *a: time.strftime('%Y-%m-%d'),
         'user_id': lambda self,cr,uid,context: uid,
         'company_id': lambda s,cr,uid,c: s.pool.get('res.company')._company_default_get(cr, uid, 'account.coda', context=c),
     }

=== modified file 'account_followup/wizard/account_followup_print.py'
--- account_followup/wizard/account_followup_print.py	2010-11-03 15:59:52 +0000
+++ account_followup/wizard/account_followup_print.py	2010-11-04 13:06:30 +0000
@@ -64,7 +64,7 @@
     }
 
     _defaults = {
-         'date': time.strftime('%Y-%m-%d'),
+         'date': lambda *a: time.strftime('%Y-%m-%d'),
          'followup_id': _get_followup,
     }
 account_followup_print()

=== modified file 'account_payment/account_payment.py'
--- account_payment/account_payment.py	2010-11-03 10:49:56 +0000
+++ account_payment/account_payment.py	2010-11-04 13:06:30 +0000
@@ -100,7 +100,7 @@
         'user_id': lambda self,cr,uid,context: uid,
         'state': 'draft',
         'date_prefered': 'due',
-        'date_created': time.strftime('%Y-%m-%d'),
+        'date_created': lambda *a: time.strftime('%Y-%m-%d'),
         'reference': lambda self,cr,uid,context: self.pool.get('ir.sequence').get(cr, uid, 'payment.order'),
     }
 

=== modified file 'account_payment/wizard/account_payment_order.py'
--- account_payment/wizard/account_payment_order.py	2010-10-21 05:39:17 +0000
+++ account_payment/wizard/account_payment_order.py	2010-11-04 13:06:30 +0000
@@ -42,7 +42,7 @@
         'entries': fields.many2many('account.move.line', 'line_pay_rel', 'pay_id', 'line_id', 'Entries')
     }
     _defaults = {
-         'duedate': time.strftime('%Y-%m-%d'),
+         'duedate': lambda *a: time.strftime('%Y-%m-%d'),
     }
 
     def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):

=== modified file 'account_voucher/account_voucher.py'
--- account_voucher/account_voucher.py	2010-11-01 10:55:16 +0000
+++ account_voucher/account_voucher.py	2010-11-04 13:06:30 +0000
@@ -202,7 +202,7 @@
         'state': 'draft',
         'pay_now': 'pay_later',
         'name': '',
-        'date': time.strftime('%Y-%m-%d'),
+        'date': lambda *a: time.strftime('%Y-%m-%d'),
         'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.voucher',context=c),
         'tax_id': _get_tax,
     }

=== modified file 'account_voucher/wizard/account_statement_from_invoice.py'
--- account_voucher/wizard/account_statement_from_invoice.py	2010-10-26 13:33:52 +0000
+++ account_voucher/wizard/account_statement_from_invoice.py	2010-11-04 13:06:30 +0000
@@ -130,7 +130,7 @@
         'line_ids': fields.many2many('account.move.line', 'account_move_line_relation', 'move_id', 'line_id', 'Invoices'),
     }
     _defaults = {
-        'date': time.strftime('%Y-%m-%d'),
+        'date': lambda *a: time.strftime('%Y-%m-%d'),
     }
 
     def search_invoices(self, cr, uid, ids, context=None):

=== modified file 'analytic/analytic.py'
--- analytic/analytic.py	2010-10-25 15:28:34 +0000
+++ analytic/analytic.py	2010-11-04 13:06:30 +0000
@@ -149,7 +149,7 @@
         'user_id': lambda self, cr, uid, ctx: uid,
         'partner_id': lambda self, cr, uid, ctx: ctx.get('partner_id', False),
         'contact_id': lambda self, cr, uid, ctx: ctx.get('contact_id', False),
-        'date_start': time.strftime('%Y-%m-%d')
+        'date_start': lambda *a: time.strftime('%Y-%m-%d')
     }
 
     def check_recursion(self, cr, uid, ids, parent=None):
@@ -212,7 +212,7 @@
 
     }
     _defaults = {
-        'date': time.strftime('%Y-%m-%d'),
+        'date': lambda *a: time.strftime('%Y-%m-%d'),
         'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.analytic.line', context=c),
         'amount': 0.00
     }

=== modified file 'hr_attendance/wizard/hr_attendance_bymonth.py'
--- hr_attendance/wizard/hr_attendance_bymonth.py	2010-08-13 06:44:34 +0000
+++ hr_attendance/wizard/hr_attendance_bymonth.py	2010-11-04 13:06:30 +0000
@@ -31,8 +31,8 @@
         'year': fields.integer('Year', required=True)
     }
     _defaults = {
-         'month': time.gmtime()[1],
-         'year': time.gmtime()[0],
+         'month': lambda *a: time.gmtime()[1],
+         'year': lambda *a: time.gmtime()[0],
     }
 
     def print_report(self, cr, uid, ids, context=None):

=== modified file 'hr_attendance/wizard/hr_attendance_byweek.py'
--- hr_attendance/wizard/hr_attendance_byweek.py	2010-10-29 07:24:30 +0000
+++ hr_attendance/wizard/hr_attendance_byweek.py	2010-11-04 13:06:30 +0000
@@ -30,8 +30,8 @@
         'end_date': fields.date('Ending Date', required=True)
     }
     _defaults = {
-         'init_date': time.strftime('%Y-%m-%d'),
-         'end_date': time.strftime('%Y-%m-%d'),
+         'init_date': lambda *a: time.strftime('%Y-%m-%d'),
+         'end_date': lambda *a: time.strftime('%Y-%m-%d'),
     }
 
     def print_report(self, cr, uid, ids, context=None):

=== modified file 'hr_attendance/wizard/hr_attendance_error.py'
--- hr_attendance/wizard/hr_attendance_error.py	2010-08-26 04:52:04 +0000
+++ hr_attendance/wizard/hr_attendance_error.py	2010-11-04 13:06:30 +0000
@@ -33,8 +33,8 @@
         'max_delay': fields.integer('Max. Delay (Min)', required=True)
     }
     _defaults = {
-         'init_date': time.strftime('%Y-%m-%d'),
-         'end_date': time.strftime('%Y-%m-%d'),
+         'init_date': lambda *a: time.strftime('%Y-%m-%d'),
+         'end_date': lambda *a: time.strftime('%Y-%m-%d'),
          'max_delay': 120,
     }
 

=== modified file 'hr_contract/hr_contract.py'
--- hr_contract/hr_contract.py	2010-09-15 13:50:27 +0000
+++ hr_contract/hr_contract.py	2010-11-04 13:06:30 +0000
@@ -111,7 +111,7 @@
         'notes': fields.text('Notes'),
     }
     _defaults = {
-        'date_start': time.strftime("%Y-%m-%d"),
+        'date_start': lambda *a: time.strftime("%Y-%m-%d"),
     }
 
 hr_contract()

=== modified file 'hr_expense/hr_expense.py'
--- hr_expense/hr_expense.py	2010-11-04 07:23:19 +0000
+++ hr_expense/hr_expense.py	2010-11-04 13:06:30 +0000
@@ -90,7 +90,7 @@
             \nIf the admin accepts it, the state is \'Accepted\'.\n If an invoice is made for the expense request, the state is \'Invoiced\'.\n If the expense is paid to user, the state is \'Reimbursed\'.'),
     }
     _defaults = {
-        'date': time.strftime('%Y-%m-%d'),
+        'date': lambda *a: time.strftime('%Y-%m-%d'),
         'state': 'draft',
         'employee_id': _employee_get,
         'user_id': lambda cr, uid, id, c={}: id,
@@ -241,7 +241,7 @@
         }
     _defaults = {
         'unit_quantity': 1,
-        'date_value': time.strftime('%Y-%m-%d'),
+        'date_value': lambda *a: time.strftime('%Y-%m-%d'),
     }
     _order = "sequence, date_value desc"
 

=== modified file 'hr_holidays/wizard/hr_holidays_summary_department.py'
--- hr_holidays/wizard/hr_holidays_summary_department.py	2010-10-09 05:27:04 +0000
+++ hr_holidays/wizard/hr_holidays_summary_department.py	2010-11-04 13:06:30 +0000
@@ -34,7 +34,7 @@
     }
 
     _defaults = {
-         'date_from': time.strftime('%Y-%m-01'),
+         'date_from': lambda *a: time.strftime('%Y-%m-01'),
          'holiday_type': 'Validated'
     }
 

=== modified file 'hr_holidays/wizard/hr_holidays_summary_employees.py'
--- hr_holidays/wizard/hr_holidays_summary_employees.py	2010-08-27 05:38:46 +0000
+++ hr_holidays/wizard/hr_holidays_summary_employees.py	2010-11-04 13:06:30 +0000
@@ -33,7 +33,7 @@
     }
 
     _defaults = {
-         'date_from': time.strftime('%Y-%m-01'),
+         'date_from': lambda *a: time.strftime('%Y-%m-01'),
          'holiday_type': 'Validated',
     }
 

=== modified file 'hr_payroll/wizard/hr_payroll_employees_detail.py'
--- hr_payroll/wizard/hr_payroll_employees_detail.py	2010-10-27 12:49:59 +0000
+++ hr_payroll/wizard/hr_payroll_employees_detail.py	2010-11-04 13:06:30 +0000
@@ -43,8 +43,8 @@
 
    _defaults = {
 #        'fiscalyear_id':_get_fiscalyear,
-        'date_from':time.strftime('%Y-01-01'),
-        'date_to':time.strftime('%Y-%m-%d'),
+        'date_from': lambda *a: time.strftime('%Y-01-01'),
+        'date_to': lambda *a: time.strftime('%Y-%m-%d'),
 
     }
 

=== modified file 'hr_payroll/wizard/hr_payroll_year_salary.py'
--- hr_payroll/wizard/hr_payroll_year_salary.py	2010-10-27 12:49:59 +0000
+++ hr_payroll/wizard/hr_payroll_year_salary.py	2010-11-04 13:06:30 +0000
@@ -44,8 +44,8 @@
 
    _defaults = {
        # 'fiscalyear_id':_get_fiscalyear,
-        'date_from':time.strftime('%Y-01-01'),
-        'date_to':time.strftime('%Y-%m-%d'),
+        'date_from': lambda *a: time.strftime('%Y-01-01'),
+        'date_to': lambda *a: time.strftime('%Y-%m-%d'),
         'salary_on': 'current_month'
     }
 

=== modified file 'hr_timesheet/wizard/hr_timesheet_print_employee.py'
--- hr_timesheet/wizard/hr_timesheet_print_employee.py	2010-10-09 05:27:04 +0000
+++ hr_timesheet/wizard/hr_timesheet_print_employee.py	2010-11-04 13:06:30 +0000
@@ -45,8 +45,8 @@
         return emp_id and emp_id[0] or False
 
     _defaults = {
-         'month': datetime.date.today().month,
-         'year': datetime.date.today().year,
+         'month': lambda *a: datetime.date.today().month,
+         'year': lambda *a: datetime.date.today().year,
          'employee_id': _get_user
              }
 

=== modified file 'hr_timesheet/wizard/hr_timesheet_print_users.py'
--- hr_timesheet/wizard/hr_timesheet_print_users.py	2010-10-09 05:27:04 +0000
+++ hr_timesheet/wizard/hr_timesheet_print_users.py	2010-11-04 13:06:30 +0000
@@ -34,8 +34,8 @@
                 }
 
     _defaults = {
-         'month': datetime.date.today().month,
-         'year': datetime.date.today().year,
+         'month': lambda *a: datetime.date.today().month,
+         'year': lambda *a: datetime.date.today().year,
              }
 
     def print_report(self, cr, uid, ids, context=None):


Follow ups