diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 85207cf5cb2..fb409b28d07 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -678,6 +678,13 @@ class account_move_line(osv.osv): def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False): if context is None: context = {} + if context and context.get('chart_of_account', False): + if context.get('periods', False): + args.append(('period_id', 'in', context['periods'])) + if context.get('state', False) and context['state'] == 'posted': + args.append(('state', '=', 'valid')) + if context.get('fiscalyear', False): + args.append(('period_id.fiscalyear_id', '=', context['fiscalyear'])) if context and context.get('next_partner_only', False): if not context.get('partner_id', False): partner = self.get_next_partner_only(cr, uid, offset, context) diff --git a/addons/account/wizard/account_chart_view.xml b/addons/account/wizard/account_chart_view.xml index f2e278b06ce..22e823cd686 100644 --- a/addons/account/wizard/account_chart_view.xml +++ b/addons/account/wizard/account_chart_view.xml @@ -31,6 +31,7 @@ tree,form new + {'chart_of_account': 1} Display your company chart of accounts per fiscal year and filter by period. Have a complete tree view of all journal items per account code by clicking on an account. diff --git a/addons/hr_holidays/security/ir_rule.xml b/addons/hr_holidays/security/ir_rule.xml index 9a56336dcdc..285fb381602 100644 --- a/addons/hr_holidays/security/ir_rule.xml +++ b/addons/hr_holidays/security/ir_rule.xml @@ -5,7 +5,7 @@ Employee Holidays - [('employee_id.user_id','=',user.id)] + ['|', ('employee_id.user_id','=',user.id), ('department_id.manager_id.user_id', '=', user.id)] diff --git a/addons/web_uservoice/web/controllers.py b/addons/web_uservoice/web/controllers.py index af3730b07b0..07376ee8fed 100644 --- a/addons/web_uservoice/web/controllers.py +++ b/addons/web_uservoice/web/controllers.py @@ -20,7 +20,7 @@ ############################################################################## from openerp.controllers import SecuredController -from openerp.utils import rpc +from openobject import rpc from openobject.tools import expose import cherrypy