flectra/addons/hr_expense/models/web_planner.py
flectra-admin 769eafb483 [INIT] Inception of Flectra from Odoo
Flectra is Forked from Odoo v11 commit : (6135e82d73)
2018-01-16 11:45:59 +05:30

24 lines
713 B
Python

# -*- coding: utf-8 -*-
from odoo import api, models
class PlannerHrExpense(models.Model):
_inherit = 'web.planner'
@api.model
def _get_planner_application(self):
planner = super(PlannerHrExpense, self)._get_planner_application()
planner.append(['planner_hr_expense', 'Expense Planner'])
return planner
@api.model
def _prepare_planner_hr_expense_data(self):
# sudo is needed to avoid error message when current user's company != sale_department company
alias_record = self.env.ref('hr_expense.mail_alias_expense')
return {
'alias_domain': alias_record.alias_domain,
'alias_name': alias_record.alias_name,
}