[NEW] Addons account_budget_forecast creation

This commit is contained in:
Stéphan Sainléger
2022-05-19 12:21:24 +02:00
parent c23f15cf98
commit 0bd839caa3
30 changed files with 2544 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