flectra/addons/account/models/web_planner.py

22 lines
711 B
Python
Raw Normal View History

# -*- coding: utf-8 -*-
2018-01-16 11:34:37 +01:00
from flectra 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