diff options
| author | aso-odoo <aso@openerp.com> | 2015-06-17 18:22:14 +0530 |
|---|---|---|
| committer | Simon Lejeune <sle@openerp.com> | 2015-08-26 15:06:29 +0200 |
| commit | 43d1bc3fda8af750d08cfa419c2745bfe4af146e (patch) | |
| tree | 0df897cedb0381306e202dcda8e4e6497a020b27 /addons/account/models | |
| parent | 5e3396d4c76667e41ea79d1f7be71270f6d88a82 (diff) | |
[ADD]account: added new planner for account.
Diffstat (limited to 'addons/account/models')
| -rw-r--r-- | addons/account/models/__init__.py | 1 | ||||
| -rw-r--r-- | addons/account/models/web_planner.py | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/addons/account/models/__init__.py b/addons/account/models/__init__.py index b4855fb482f..86220766042 100644 --- a/addons/account/models/__init__.py +++ b/addons/account/models/__init__.py @@ -12,3 +12,4 @@ import account_journal_dashboard import product import company import res_config +import web_planner diff --git a/addons/account/models/web_planner.py b/addons/account/models/web_planner.py new file mode 100644 index 00000000000..b5ecbaa7008 --- /dev/null +++ b/addons/account/models/web_planner.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +from openerp import api, models + + +class PlannerAccount(models.Model): + + _inherit = 'web.planner' + + def _get_planner_application(self): + planner = super(PlannerAccount, self)._get_planner_application() + planner.append(['planner_account', 'Account Planner']) + return planner + + def _prepare_planner_account_data(self): + values = { + 'company_id': self.env.user.company_id, + 'is_coa_installed': bool(self.env['account.account'].search_count([])), + 'payment_term': self.env['account.payment.term'].search([]), + 'supplier_menu_id': self.env.ref('account.menu_account_supplier').id + } + return values |
