mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[12.0][ADD] - Add new addon: contract_forecast
This commit is contained in:
21
contract_forecast/models/contract.py
Normal file
21
contract_forecast/models/contract.py
Normal file
@@ -0,0 +1,21 @@
|
||||
# Copyright 2019 ACSONE SA/NV
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import _, api, models
|
||||
|
||||
|
||||
class AccountAnalyticAccount(models.Model):
|
||||
|
||||
_inherit = "account.analytic.account"
|
||||
|
||||
@api.multi
|
||||
def action_show_contract_forecast(self):
|
||||
self.ensure_one()
|
||||
return {
|
||||
"type": "ir.actions.act_window",
|
||||
"name": _("Contract Forecast"),
|
||||
"res_model": "contract.line.forecast.period",
|
||||
"domain": [("contract_id", "=", self.id)],
|
||||
"view_mode": "pivot,tree",
|
||||
"context": self.env.context,
|
||||
}
|
||||
Reference in New Issue
Block a user