[MIG] Migration account_budget_forecast addons to v14.0

This commit is contained in:
Stéphan Sainléger
2022-06-01 21:40:42 +02:00
parent 0cb6311966
commit 1883014efc
36 changed files with 3424 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
from odoo import models, _
import json
class Project(models.Model):
_inherit = "project.project"
def _plan_get_stat_button(self):
res = super(Project, self)._plan_get_stat_button()
action = self.analytic_account_id.action_budget_forecast()
res.append(
{
"name": _("Budget"),
"icon": "fa-usd",
"action": {
"data-model": action["res_model"],
"data-views": json.dumps(action["views"]),
"data-res-id": action["res_id"],
},
}
)
return res