diff options
| author | mtr <mtr@mtr> | 2011-02-02 10:55:31 +0530 |
|---|---|---|
| committer | mtr <mtr@mtr> | 2011-02-02 10:55:31 +0530 |
| commit | 8af73b2885ee994ca4aae67a447e2f548e3cb7b8 (patch) | |
| tree | 583f610edf17ea12be026865d801b90be098b33f | |
| parent | e2afe7b13aae0281eeaf4464ba04cf6233b6116a (diff) | |
| parent | 9259b22c59e6563999df944a6bf967faaa67e349 (diff) | |
[MERGE] branch merged with lp:~openerp-dev/openobject-addons/trunk-dev-addons3
bzr revid: mtr@mtr-20110202052531-jzi9gqaa7uf3xhbw
| -rw-r--r-- | addons/account/project/project_view.xml | 6 | ||||
| -rw-r--r-- | addons/analytic/analytic.py | 5 |
2 files changed, 4 insertions, 7 deletions
diff --git a/addons/account/project/project_view.xml b/addons/account/project/project_view.xml index 495efbede08..ce3496e3e30 100644 --- a/addons/account/project/project_view.xml +++ b/addons/account/project/project_view.xml @@ -136,7 +136,7 @@ <field name="help">The normal chart of accounts has a structure defined by the legal requirement of the country. The analytic chart of account structure should reflect your own business needs in term of costs/revenues reporting. They are usually structured by contracts, projects, products or departements. Most of the OpenERP operations (invoices, timesheets, expenses, etc) generate analytic entries on the related account.</field> </record> - <menuitem groups="analytic.group_analytic_accounting" id="next_id_40" + <menuitem groups="analytic.group_analytic_accounting" id="next_id_40" name="Analytic" parent="account.menu_finance_generic_reporting" sequence="4"/> @@ -373,7 +373,7 @@ <field name="help">To print an analytics (or costs) journal for a given period. The report give code, move name, account number, general amount and analytic amount.</field> </record> <menuitem groups="analytic.group_analytic_accounting" - action="action_account_analytic_journal_tree" + action="action_account_analytic_journal_tree" id="account_analytic_journal_print" parent="account.next_id_40"/> # @@ -445,7 +445,7 @@ </record> <act_window - context="{'search_default_account_id': [active_id], 'search_default_user_id': False, 'analytic_act_window': True}" + context="{'search_default_account_id': [active_id], 'search_default_user_id': False}" id="act_acc_analytic_acc_5_report_hr_timesheet_invoice_journal" name="All Analytic Entries" res_model="account.analytic.line" diff --git a/addons/analytic/analytic.py b/addons/analytic/analytic.py index a5b52b0ff10..50a73b3f7d4 100644 --- a/addons/analytic/analytic.py +++ b/addons/analytic/analytic.py @@ -226,10 +226,7 @@ class account_analytic_account(osv.osv): return self.name_get(cr, uid, project_ids, context=context) account = self.search(cr, uid, [('code', '=', name)] + args, limit=limit, context=context) if not account: - if context.get('analytic_act_window', False) and context.get('active_id', False): - account = self.search(cr, uid, [('id', '=', context['active_id'])] + args, limit=limit, context=context) - else: - account = self.search(cr, uid, [('name', 'ilike', '%%%s%%' % name)] + args, limit=limit, context=context) + account = self.search(cr, uid, [('name', 'ilike', '%%%s%%' % name)] + args, limit=limit, context=context) newacc = account while newacc: newacc = self.search(cr, uid, [('parent_id', 'in', newacc)]+args, limit=limit, context=context) |
