Compare commits
merge into: njeudy:12.0
njeudy:12.0
njeudy:14.0
njeudy:14.0_project_funders
pull from: njeudy:14.0_project_funders
njeudy:12.0
njeudy:14.0
njeudy:14.0_project_funders
2 Commits
12.0
...
14.0_proje
Author | SHA1 | Message | Date |
---|---|---|---|
Valentin Lab | 2bb03004d6 |
[ADD] create `project_funders` to track funds on tasks
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org> |
2 years ago |
Valentin Lab | 9589db3048 |
[ADD] add ``project_assignees`` add-on
Add a field in ``project.task`` to assign users to task. This completes ``user_id`` field, that is then considered as the owner of the task. Assignment becomes optional and can now target multiple users. Task: JOI-13 Signed-off-by: Valentin Lab <valentin.lab@kalysto.org> |
2 years ago |
20 changed files with 646 additions and 0 deletions
-
2.gitignore
-
45project_assignees/README.rst
-
3project_assignees/__init__.py
-
92project_assignees/__manifest__.py
-
1project_assignees/i18n/README
-
41project_assignees/i18n/fr.po
-
2project_assignees/models/__init__.py
-
9project_assignees/models/project_task.py
-
26project_assignees/views/project_task.xml
-
46project_funders/README.rst
-
1project_funders/__init__.py
-
87project_funders/__manifest__.py
-
1project_funders/i18n/README
-
105project_funders/i18n/fr.po
-
105project_funders/i18n/project_funders.pot
-
2project_funders/models/__init__.py
-
16project_funders/models/project_funders.py
-
13project_funders/models/project_task.py
-
2project_funders/security/ir.model.access.csv
-
47project_funders/views/project_task_view.xml
@ -0,0 +1,2 @@ |
|||||
|
*.*~ |
||||
|
*.pyc |
@ -0,0 +1,45 @@ |
|||||
|
================= |
||||
|
project_assignees |
||||
|
================= |
||||
|
|
||||
|
Add multiple assignees field to project task |
||||
|
|
||||
|
Installation |
||||
|
============ |
||||
|
|
||||
|
Use Odoo normal procedure to install add-ons to install |
||||
|
``project_assignees``. |
||||
|
|
||||
|
Known issues / Roadmap |
||||
|
====================== |
||||
|
|
||||
|
Bug Tracker |
||||
|
=========== |
||||
|
|
||||
|
Bugs are tracked on `our issues website |
||||
|
<https://github.com/elabore-coop/project-tools/issues>`_. In case of |
||||
|
trouble, please check there if your issue has already been |
||||
|
reported. If you spotted it first, help us smashing it by providing a |
||||
|
detailed and welcomed feedback. |
||||
|
|
||||
|
Credits |
||||
|
======= |
||||
|
|
||||
|
Images |
||||
|
------ |
||||
|
* Elabore: `Icon <https://elabore.coop/web/image/res.company/1/logo?unique=f3db262>`_. |
||||
|
|
||||
|
Contributors |
||||
|
------------ |
||||
|
* Stéphan Sainléger <https://github.com/stephansainleger> |
||||
|
|
||||
|
Funders |
||||
|
------- |
||||
|
The development of this module has been financially supported by: |
||||
|
* Elabore (https://elabore.coop) |
||||
|
|
||||
|
|
||||
|
Maintainer |
||||
|
---------- |
||||
|
|
||||
|
This module is maintained by Elabore. |
@ -0,0 +1,3 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
|
||||
|
from . import models |
@ -0,0 +1,92 @@ |
|||||
|
# Copyright 2022 Stéphan Sainléger (Elabore) |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
||||
|
|
||||
|
{ |
||||
|
"name": "project_assignees", |
||||
|
"version": "14.0.0.1.0", |
||||
|
"author": "Elabore", |
||||
|
"website": "https://github.com/elabore-coop/project-tools", |
||||
|
"maintainer": "Stéphan Sainléger", |
||||
|
"license": "AGPL-3", |
||||
|
"category": "Tools", |
||||
|
"summary": "Add multiple assignees field to project task", |
||||
|
"description": """ |
||||
|
:image: https://img.shields.io/badge/licence-AGPL--3-blue.svg |
||||
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html |
||||
|
:alt: License: AGPL-3 |
||||
|
================= |
||||
|
project_assignees |
||||
|
================= |
||||
|
|
||||
|
Add multiple assignees field to project task. |
||||
|
|
||||
|
Installation |
||||
|
============ |
||||
|
|
||||
|
Install ``project_assignees``, all dependencies will be installed by default. |
||||
|
|
||||
|
Known issues / Roadmap |
||||
|
====================== |
||||
|
|
||||
|
None yet. |
||||
|
|
||||
|
Bug Tracker |
||||
|
=========== |
||||
|
|
||||
|
Bugs are tracked on `our issues website |
||||
|
<https://github.com/elabore-coop/project-tools/issues>`_. In case of |
||||
|
trouble, please check there if your issue has already been |
||||
|
reported. If you spotted it first, help us smashing it by providing a |
||||
|
detailed and welcomed feedback. |
||||
|
|
||||
|
Credits |
||||
|
======= |
||||
|
|
||||
|
Images |
||||
|
------ |
||||
|
|
||||
|
* Elabore: `Icon <https://elabore.coop/web/image/res.company/1/logo?unique=f3db262>`_. |
||||
|
|
||||
|
Contributors |
||||
|
------------ |
||||
|
|
||||
|
* Stéphan Sainléger <https://github.com/stephansainleger> |
||||
|
* Valentin Lab <valentin.lab@kalysto.org> |
||||
|
|
||||
|
Funders |
||||
|
------- |
||||
|
|
||||
|
The development of this module has been financially supported by: |
||||
|
* Elabore (https://elabore.coop) |
||||
|
|
||||
|
|
||||
|
Maintainer |
||||
|
---------- |
||||
|
This module is maintained by Elabore. |
||||
|
|
||||
|
""", |
||||
|
# any module necessary for this one to work correctly |
||||
|
"depends": [ |
||||
|
"base", |
||||
|
"project", |
||||
|
], |
||||
|
"qweb": [ |
||||
|
# "static/src/xml/*.xml", |
||||
|
], |
||||
|
"external_dependencies": { |
||||
|
"python": [], |
||||
|
}, |
||||
|
# always loaded |
||||
|
"data": [ |
||||
|
"views/project_task.xml", |
||||
|
], |
||||
|
# only loaded in demonstration mode |
||||
|
"demo": [], |
||||
|
"js": [], |
||||
|
"css": [], |
||||
|
"installable": True, |
||||
|
# Install this module automatically if all dependency have been previously |
||||
|
# and independently installed. Used for synergetic or glue modules. |
||||
|
"auto_install": False, |
||||
|
"application": False, |
||||
|
} |
@ -0,0 +1 @@ |
|||||
|
This directory should contain the *.po for Odoo translation. |
@ -0,0 +1,41 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * project_assignees |
||||
|
# |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 14.0\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2022-07-25 14:54+0000\n" |
||||
|
"PO-Revision-Date: 2022-07-25 14:54+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_assignees |
||||
|
#: model:ir.model.fields,field_description:project_assignees.field_project_task__assignee_ids |
||||
|
msgid "Assignees" |
||||
|
msgstr "Assigné à" |
||||
|
|
||||
|
#. module: project_assignees |
||||
|
#: model:ir.model.fields,field_description:project_assignees.field_project_task__display_name |
||||
|
msgid "Display Name" |
||||
|
msgstr "Nom affiché" |
||||
|
|
||||
|
#. module: project_assignees |
||||
|
#: model:ir.model.fields,field_description:project_assignees.field_project_task__id |
||||
|
msgid "ID" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: project_assignees |
||||
|
#: model:ir.model.fields,field_description:project_assignees.field_project_task____last_update |
||||
|
msgid "Last Modified on" |
||||
|
msgstr "Dernière modification le" |
||||
|
|
||||
|
#. module: project_assignees |
||||
|
#: model:ir.model,name:project_assignees.model_project_task |
||||
|
msgid "Task" |
||||
|
msgstr "Tâche" |
@ -0,0 +1,2 @@ |
|||||
|
|
||||
|
from . import project_task |
@ -0,0 +1,9 @@ |
|||||
|
|
||||
|
from odoo import models, fields |
||||
|
|
||||
|
|
||||
|
class Task(models.Model): |
||||
|
_inherit = "project.task" |
||||
|
|
||||
|
assignee_ids = fields.Many2many('res.users', 'assignee_ids_rel', string='Assignees') |
||||
|
|
@ -0,0 +1,26 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<odoo> |
||||
|
<record id="view_task_form2_assignees" model="ir.ui.view"> |
||||
|
<field name="name">project.task.form.assignees</field> |
||||
|
<field name="model">project.task</field> |
||||
|
<field name="inherit_id" ref="project.view_task_form2" /> |
||||
|
<field name="priority" eval="99" /> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//field[@name='user_id']" position="after"> |
||||
|
<field name="assignee_ids" widget="many2many_tags" /> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="view_task_search_form_assignees" model="ir.ui.view"> |
||||
|
<field name="name">project.task.search.form.assignees</field> |
||||
|
<field name="model">project.task</field> |
||||
|
<field name="inherit_id" ref="project.view_task_search_form" /> |
||||
|
<field name="priority" eval="99" /> |
||||
|
<field name="arch" type="xml"> |
||||
|
<filter name="my_tasks" position="attributes"> |
||||
|
<attribute name="domain">['|', ('user_id', '=', uid), ('assignee_ids', 'in', uid)]</attribute> |
||||
|
</filter> |
||||
|
</field> |
||||
|
</record> |
||||
|
</odoo> |
@ -0,0 +1,46 @@ |
|||||
|
:image: https://img.shields.io/badge/licence-AGPL--3-blue.svg |
||||
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html |
||||
|
:alt: License: AGPL-3 |
||||
|
=============== |
||||
|
project_funders |
||||
|
=============== |
||||
|
|
||||
|
Add list of funder and corresponding amount to project task. |
||||
|
|
||||
|
Installation |
||||
|
============ |
||||
|
|
||||
|
Use Odoo normal module installation procedure to install |
||||
|
``project_funders``. |
||||
|
|
||||
|
Known issues / Roadmap |
||||
|
====================== |
||||
|
|
||||
|
None yet. |
||||
|
|
||||
|
Bug Tracker |
||||
|
=========== |
||||
|
|
||||
|
Bugs are tracked on `our issues website <https://github.com/elabore-coop/project-tools/issues>`_. In case of |
||||
|
trouble, please check there if your issue has already been |
||||
|
reported. If you spotted it first, help us smashing it by providing a |
||||
|
detailed and welcomed feedback. |
||||
|
|
||||
|
Credits |
||||
|
======= |
||||
|
|
||||
|
Contributors |
||||
|
------------ |
||||
|
* Nicolas Jeudy <https://github.com/njeudy> |
||||
|
* Valentin Lab |
||||
|
|
||||
|
Funders |
||||
|
------- |
||||
|
|
||||
|
The development of this module has been financially supported by: |
||||
|
* Alusage (https://alusage.fr) |
||||
|
|
||||
|
|
||||
|
Maintainer |
||||
|
---------- |
||||
|
This module is maintained by Alusage and Elabore. |
@ -0,0 +1 @@ |
|||||
|
from . import models |
@ -0,0 +1,87 @@ |
|||||
|
# Copyright 2022 Nicolas Jeudy (Alusage) |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
||||
|
|
||||
|
{ |
||||
|
"name": "project_funders", |
||||
|
"version": "14.0.0.1.0", |
||||
|
"author": "Alusage", |
||||
|
"website": "https://alusage.fr", |
||||
|
"data": [ |
||||
|
# "security/security.xml", |
||||
|
# "security/ir.model.access.csv", |
||||
|
# "views/menu.xml", |
||||
|
# "data/data.xml", |
||||
|
], |
||||
|
"author": "Alusage, Elabore", |
||||
|
"maintainer": "Nicolas Jeudy", |
||||
|
"license": "AGPL-3", |
||||
|
"category": "Tools", |
||||
|
"summary": " Odoo module.", |
||||
|
"description": """ |
||||
|
:image: https://img.shields.io/badge/licence-AGPL--3-blue.svg |
||||
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html |
||||
|
:alt: License: AGPL-3 |
||||
|
=============== |
||||
|
project_funders |
||||
|
=============== |
||||
|
|
||||
|
Add list of funder and corresponding amount to project task. |
||||
|
|
||||
|
Installation |
||||
|
============ |
||||
|
|
||||
|
Use Odoo normal module installation procedure to install |
||||
|
``project_funders``. |
||||
|
|
||||
|
Known issues / Roadmap |
||||
|
====================== |
||||
|
|
||||
|
None yet. |
||||
|
|
||||
|
Bug Tracker |
||||
|
=========== |
||||
|
|
||||
|
Bugs are tracked on `our issues website <https://github.com/elabore-coop/project-tools/issues>`_. In case of |
||||
|
trouble, please check there if your issue has already been |
||||
|
reported. If you spotted it first, help us smashing it by providing a |
||||
|
detailed and welcomed feedback. |
||||
|
|
||||
|
Credits |
||||
|
======= |
||||
|
|
||||
|
Contributors |
||||
|
------------ |
||||
|
* Nicolas Jeudy <https://github.com/njeudy> |
||||
|
* Valentin Lab |
||||
|
|
||||
|
Funders |
||||
|
------- |
||||
|
The development of this module has been financially supported by: |
||||
|
* Alusage (https://alusage.fr) |
||||
|
|
||||
|
|
||||
|
Maintainer |
||||
|
---------- |
||||
|
This module is maintained by Alusage and Elabore. |
||||
|
|
||||
|
""", |
||||
|
# any module necessary for this one to work correctly |
||||
|
"depends": ["base", "project"], |
||||
|
"qweb": [ |
||||
|
# "static/src/xml/*.xml", |
||||
|
], |
||||
|
"external_dependencies": { |
||||
|
"python": [], |
||||
|
}, |
||||
|
# always loaded |
||||
|
"data": ["security/ir.model.access.csv", "views/project_task_view.xml"], |
||||
|
# only loaded in demonstration mode |
||||
|
"demo": [], |
||||
|
"js": [], |
||||
|
"css": [], |
||||
|
"installable": True, |
||||
|
# Install this module automatically if all dependency have been previously |
||||
|
# and independently installed. Used for synergetic or glue modules. |
||||
|
"auto_install": False, |
||||
|
"application": False, |
||||
|
} |
@ -0,0 +1 @@ |
|||||
|
This directory should contain the *.po for Odoo translation. |
@ -0,0 +1,105 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * project_funders |
||||
|
# |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 14.0\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2022-07-26 06:53+0000\n" |
||||
|
"PO-Revision-Date: 2022-07-26 06:53+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_funders |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_task__amount_total |
||||
|
msgid "Amount Total" |
||||
|
msgstr "Montant total" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_funder__create_uid |
||||
|
msgid "Created by" |
||||
|
msgstr "Créé par" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_funder__create_date |
||||
|
msgid "Created on" |
||||
|
msgstr "Créé le" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_funder__display_name |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_task__display_name |
||||
|
msgid "Display Name" |
||||
|
msgstr "Nom affiché" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_funder__partner_id |
||||
|
msgid "Funder" |
||||
|
msgstr "Financeur" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model:ir.model,name:project_funders.model_project_funder |
||||
|
msgid "Funder and amount for tasks" |
||||
|
msgstr "Financeur et montant sur les taches" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model_terms:ir.ui.view,arch_db:project_funders.view_task_form2_inherit_project |
||||
|
msgid "Funder(s)" |
||||
|
msgstr "Financeur(s)" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model_terms:ir.ui.view,arch_db:project_funders.view_task_kanban_inherit_project_funders |
||||
|
msgid "Funds:" |
||||
|
msgstr "Fonds :" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_funder__id |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_task__id |
||||
|
msgid "ID" |
||||
|
msgstr "ID" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_funder____last_update |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_task____last_update |
||||
|
msgid "Last Modified on" |
||||
|
msgstr "Dernière modification le" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_funder__write_uid |
||||
|
msgid "Last Updated by" |
||||
|
msgstr "Derniere modifiation par" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_funder__write_date |
||||
|
msgid "Last Updated on" |
||||
|
msgstr "Dernière mise à jour le" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_funder__name |
||||
|
msgid "Name" |
||||
|
msgstr "Nom" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model:ir.model,name:project_funders.model_project_task |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_funder__task_id |
||||
|
msgid "Task" |
||||
|
msgstr "Tâche" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model_terms:ir.ui.view,arch_db:project_funders.view_task_form2_inherit_project |
||||
|
msgid "Total" |
||||
|
msgstr "Total" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_funder__amount |
||||
|
msgid "Untaxed Amount" |
||||
|
msgstr "Montant HT" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_task__funder_ids |
||||
|
msgid "funder" |
||||
|
msgstr "Financeur" |
@ -0,0 +1,105 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * project_funders |
||||
|
# |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 14.0\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2022-07-26 07:41+0000\n" |
||||
|
"PO-Revision-Date: 2022-07-26 07:41+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_funders |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_task__amount_total |
||||
|
msgid "Amount Total" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_funder__create_uid |
||||
|
msgid "Created by" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_funder__create_date |
||||
|
msgid "Created on" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_funder__display_name |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_task__display_name |
||||
|
msgid "Display Name" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_funder__partner_id |
||||
|
msgid "Funder" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model:ir.model,name:project_funders.model_project_funder |
||||
|
msgid "Funder and amount for tasks" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model_terms:ir.ui.view,arch_db:project_funders.view_task_form2_inherit_project |
||||
|
msgid "Funder(s)" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model_terms:ir.ui.view,arch_db:project_funders.view_task_kanban_inherit_project_funders |
||||
|
msgid "Funds:" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_funder__id |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_task__id |
||||
|
msgid "ID" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_funder____last_update |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_task____last_update |
||||
|
msgid "Last Modified on" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_funder__write_uid |
||||
|
msgid "Last Updated by" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_funder__write_date |
||||
|
msgid "Last Updated on" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_funder__name |
||||
|
msgid "Name" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model:ir.model,name:project_funders.model_project_task |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_funder__task_id |
||||
|
msgid "Task" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model_terms:ir.ui.view,arch_db:project_funders.view_task_form2_inherit_project |
||||
|
msgid "Total" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_funder__amount |
||||
|
msgid "Untaxed Amount" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: project_funders |
||||
|
#: model:ir.model.fields,field_description:project_funders.field_project_task__funder_ids |
||||
|
msgid "funder" |
||||
|
msgstr "" |
@ -0,0 +1,2 @@ |
|||||
|
from . import project_funders |
||||
|
from . import project_task |
@ -0,0 +1,16 @@ |
|||||
|
from odoo import _, api, fields, models |
||||
|
|
||||
|
|
||||
|
class ProjectFunders(models.Model): |
||||
|
_name = "project.funder" |
||||
|
_description = "Funder and amount for tasks" |
||||
|
|
||||
|
name = fields.Char(compute="_compute_name", string="Name") |
||||
|
partner_id = fields.Many2one("res.partner", string="Funder", required=True) |
||||
|
amount = fields.Float("Untaxed Amount", required=True) |
||||
|
task_id = fields.Many2one("project.task", string="Task") |
||||
|
|
||||
|
@api.depends("partner_id", "amount") |
||||
|
def _compute_name(self): |
||||
|
for record in self: |
||||
|
record.name = "%s (%s)" % (record.partner_id.name, record.amount) |
@ -0,0 +1,13 @@ |
|||||
|
from odoo import _, api, fields, models |
||||
|
|
||||
|
|
||||
|
class ProjectTask(models.Model): |
||||
|
_inherit = "project.task" |
||||
|
|
||||
|
funder_ids = fields.One2many("project.funder", "task_id", string="funder") |
||||
|
amount_total = fields.Float(compute="_compute_amount_total", string="Amount Total") |
||||
|
|
||||
|
@api.depends("funder_ids") |
||||
|
def _compute_amount_total(self): |
||||
|
for record in self: |
||||
|
record.amount_total = sum(record.funder_ids.mapped("amount")) |
@ -0,0 +1,2 @@ |
|||||
|
id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink |
||||
|
access_project_funder_all,project.funder.all,model_project_funder,,1,1,1,1 |
@ -0,0 +1,47 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<odoo> |
||||
|
|
||||
|
<record id="view_task_form2_inherit_project" model="ir.ui.view"> |
||||
|
<field name="name">project.task.view.form.inherit</field> |
||||
|
<field name="model">project.task</field> |
||||
|
<field name="inherit_id" ref="project.view_task_form2"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//notebook" position="inside"> |
||||
|
<page name="funders" string="Funder(s)"> |
||||
|
<field name="funder_ids" context="{'default_task_id': active_id}"> |
||||
|
<tree editable="bottom"> |
||||
|
<field name="task_id" invisible="1"/> |
||||
|
<field name="partner_id"/> |
||||
|
<field name="amount"/> |
||||
|
</tree> |
||||
|
</field> |
||||
|
<group> |
||||
|
<group class="oe_subtotal_footer oe_right" name="project_hours"> |
||||
|
<span> |
||||
|
<label class="font-weight-bold" for="amount_total" string="Total"/> |
||||
|
</span> |
||||
|
<field name="amount_total" nolabel="1"/> |
||||
|
</group> |
||||
|
</group> |
||||
|
</page> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="view_task_kanban_inherit_project_funders" model="ir.ui.view"> |
||||
|
<field name="name">project.task.view.kanban.inherit</field> |
||||
|
<field name="model">project.task</field> |
||||
|
<field name="inherit_id" ref="project.view_task_kanban"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<field name="active" position="after"> |
||||
|
<field name="amount_total"/> |
||||
|
</field> |
||||
|
<field name="tag_ids" position="after"> |
||||
|
<span attrs="{'invisible': [('amount_total', '=', 0)]}"> |
||||
|
Funds: <field name="amount_total"/> |
||||
|
</span> |
||||
|
</field> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
</odoo> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue