[FIX] account* modules: added 'account_period_prefer_normal':True in context when...
authorQuentin (OpenERP) <qdp-launchpad@openerp.com>
Thu, 18 Apr 2013 10:24:33 +0000 (12:24 +0200)
committerQuentin (OpenERP) <qdp-launchpad@openerp.com>
Thu, 18 Apr 2013 10:24:33 +0000 (12:24 +0200)
commitc46929268d4f94374fcb64430d92cc138e1864f3
tree2d716ac6503186ee44ee228d7e80dbd40ba5fe25
parent56b54464312ef4e5de05c948883079f9361efc87
[FIX] account* modules: added 'account_period_prefer_normal':True in context when trying to find the period related to a date.

This patch will be forward ported in trunk by changing the behaviour of account_period.find() in order to fetch the normal periods by default (account_period_prefer_normal will be True by default) because there are no business case i could think of where you'd like to get the opening period (except in the closure but it's held in a different way there). On the other hand, it's pretty easy to forget to put that key in the context and introduce a new bug that will select the opening period instead of the wanted one

bzr revid: qdp-launchpad@openerp.com-20130418102433-t52uj23trkpr8vnb
addons/account/account.py
addons/account/account_bank_statement.py
addons/account/account_move_line.py
addons/account/report/account_entries_report.py
addons/account/wizard/account_reconcile.py
addons/account/wizard/account_tax_chart.py
addons/account_asset/account_asset.py
addons/account_asset/wizard/wizard_asset_compute.py
addons/account_voucher/account_voucher.py
addons/hr_payroll_account/hr_payroll_account.py
addons/point_of_sale/point_of_sale.py