forked from avanzosc/project-addons
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD] Migrate addon project_budget_characterization to v16
- Loading branch information
1 parent
048f9d2
commit c581142
Showing
7 changed files
with
166 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png | ||
:target: https://www.gnu.org/licenses/agpl | ||
:alt: License: AGPL-3 | ||
|
||
=============================== | ||
Project Budget Characterization | ||
=============================== | ||
|
||
This module gets characterization data to budget lines. | ||
|
||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/avanzosc/project-addons/issues>`_. In case of trouble, please | ||
check there if your issue has already been reported. If you spotted it first, | ||
help us smash it by providing detailed and welcomed feedback. | ||
|
||
Credits | ||
======= | ||
|
||
Contributors | ||
------------ | ||
|
||
* Oihane Crucelaegui <[email protected]> | ||
* Ana Juaristi <[email protected]> | ||
|
||
Do not contact contributors directly about support or help with technical issues. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Copyright 2018 Oihane Crucelaegui - AvanzOSC | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright 2018 Oihane Crucelaegui - AvanzOSC | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
||
{ | ||
"name": "Project Bugdet Characterization", | ||
"version": "11.0.1.0.0", | ||
"category": "Custom Module", | ||
"license": "AGPL-3", | ||
"author": "AvanzOSC", | ||
"website": "http://www.avanzosc.es", | ||
"contributors": [ | ||
"Oihane Crucelaegui <[email protected]>", | ||
"Ana Juaristi <[email protected]>", | ||
], | ||
"depends": ["project_budget", "project_characterization"], | ||
"data": ["views/crossovered_budget_view.xml"], | ||
"installable": True, | ||
"auto_install": True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * project_budget_characterization | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 11.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2018-10-01 10:20+0000\n" | ||
"PO-Revision-Date: 2018-10-01 10:20+0000\n" | ||
"Last-Translator: <>\n" | ||
"Language-Team: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: \n" | ||
|
||
#. module: project_budget_characterization | ||
#: model:ir.model.fields,field_description:project_budget_characterization.field_crossovered_budget_lines_res_area_id | ||
#: model:ir.ui.view,arch_db:project_budget_characterization.crossovered_budget_lines_search_view | ||
msgid "Area" | ||
msgstr "Área" | ||
|
||
#. module: project_budget_characterization | ||
#: model:ir.model.fields,field_description:project_budget_characterization.field_crossovered_budget_lines_res_area_type_id | ||
#: model:ir.ui.view,arch_db:project_budget_characterization.crossovered_budget_lines_search_view | ||
msgid "Area Type" | ||
msgstr "Tipo" | ||
|
||
#. module: project_budget_characterization | ||
#: model:ir.model,name:project_budget_characterization.model_crossovered_budget_lines | ||
msgid "Budget Line" | ||
msgstr "Línea de presupuesto" | ||
|
||
#. module: project_budget_characterization | ||
#: model:ir.model.fields,field_description:project_budget_characterization.field_crossovered_budget_lines_res_team_id | ||
#: model:ir.ui.view,arch_db:project_budget_characterization.crossovered_budget_lines_search_view | ||
msgid "Team" | ||
msgstr "Equipo" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Copyright 2018 Oihane Crucelaegui - AvanzOSC | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
||
from . import crossovered_budget_line |
27 changes: 27 additions & 0 deletions
27
project_budget_characterization/models/crossovered_budget_line.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Copyright 2018 Oihane Crucelaegui - AvanzOSC | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class CrossoveredBudgetLines(models.Model): | ||
_inherit = "crossovered.budget.lines" | ||
|
||
res_area_id = fields.Many2one( | ||
comodel_name="res.area", | ||
string="Area", | ||
related="analytic_account_id.res_area_id", | ||
store=True, | ||
) | ||
res_area_type_id = fields.Many2one( | ||
comodel_name="res.area.type", | ||
string="Area Type", | ||
related="analytic_account_id.res_area_type_id", | ||
store=True, | ||
) | ||
res_team_id = fields.Many2one( | ||
comodel_name="res.team", | ||
string="Team", | ||
related="analytic_account_id.res_team_id", | ||
store=True, | ||
) |
43 changes: 43 additions & 0 deletions
43
project_budget_characterization/views/crossovered_budget_view.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<odoo> | ||
<record id="crossovered_budget_form_view" model="ir.ui.view"> | ||
<field name="model">crossovered.budget</field> | ||
<field name="inherit_id" ref="project_budget.crossovered_budget_form_view" /> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//field[@name='paid_date']" position="after"> | ||
<field name="res_area_id" /> | ||
<field name="res_area_type_id" /> | ||
<field name="res_team_id" /> | ||
</xpath> | ||
</field> | ||
</record> | ||
|
||
<record id="crossovered_budget_lines_tree_view" model="ir.ui.view"> | ||
<field name="model">crossovered.budget.lines</field> | ||
<field name="inherit_id" ref="project_budget.crossovered_budget_line_tree_view" /> | ||
<field name="arch" type="xml"> | ||
<field name="paid_date" position="after"> | ||
<field name="res_area_id" /> | ||
<field name="res_area_type_id" /> | ||
<field name="res_team_id" /> | ||
</field> | ||
</field> | ||
</record> | ||
|
||
<record id="crossovered_budget_lines_search_view" model="ir.ui.view"> | ||
<field name="model">crossovered.budget.lines</field> | ||
<field name="inherit_id" ref="project_budget.crossovered_budget_line_search_view" /> | ||
<field name="arch" type="xml"> | ||
<field name="project_id" position="after"> | ||
<field name="res_area_id" /> | ||
<field name="res_area_type_id" /> | ||
<field name="res_team_id" /> | ||
</field> | ||
<filter name="group_by_project" position="after"> | ||
<filter name="group_by_area" string="Area" context="{'group_by':'res_area_id'}"/> | ||
<filter name="group_by_area_type" string="Area Type" context="{'group_by':'res_area_type_id'}"/> | ||
<filter name="group_by_team" string="Team" context="{'group_by':'res_team_id'}"/> | ||
</filter> | ||
</field> | ||
</record> | ||
</odoo> |