-
-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by legalsylvain
- Loading branch information
Showing
14 changed files
with
184 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
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 @@ | ||
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,21 @@ | ||
# Copyright (C) 2021 - Today: GRAP (http://www.grap.coop) | ||
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
"name": "Project - Multi Company", | ||
"summary": """ | ||
This module adds support for multi company on Project Module.""", | ||
"version": "12.0.1.0.0", | ||
"license": "AGPL-3", | ||
"author": "GRAP, Odoo Community Association (OCA)", | ||
"maintainers": ["legalsylvain"], | ||
"website": "https://github.com/OCA/multi-company", | ||
"installable": True, | ||
"depends": ["project"], | ||
"data": [ | ||
"security/ir_rule.xml", | ||
"views/view_project_tags.xml", | ||
"views/view_project_task_type.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,33 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * project_multi_company | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-09-28 14:23+0000\n" | ||
"PO-Revision-Date: 2024-09-28 14:23+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_multi_company | ||
#: model:ir.model.fields,field_description:project_multi_company.field_project_tags__company_id | ||
#: model:ir.model.fields,field_description:project_multi_company.field_project_task_type__company_id | ||
msgid "Company" | ||
msgstr "Société" | ||
|
||
#. module: project_multi_company | ||
#: model:ir.model,name:project_multi_company.model_project_tags | ||
msgid "Project Tags" | ||
msgstr "Étiquettes de projet" | ||
|
||
#. module: project_multi_company | ||
#: model:ir.model,name:project_multi_company.model_project_task_type | ||
msgid "Task Stage" | ||
msgstr "Étape de tâche" | ||
|
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,2 @@ | ||
from . import project_tags | ||
from . import project_task_type |
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 (C) 2021 - Today: GRAP (http://www.grap.coop) | ||
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class ProjectTags(models.Model): | ||
_inherit = "project.tags" | ||
|
||
company_id = fields.Many2one( | ||
"res.company", | ||
string="Company", | ||
index=True, | ||
default=lambda self: self._default_company_id(), | ||
) | ||
|
||
def _default_company_id(self): | ||
return self.env.user.company_id |
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 (C) 2021 - Today: GRAP (http://www.grap.coop) | ||
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class ProjectTaskType(models.Model): | ||
_inherit = "project.task.type" | ||
|
||
company_id = fields.Many2one( | ||
"res.company", | ||
string="Company", | ||
index=True, | ||
default=lambda self: self._default_company_id(), | ||
) | ||
|
||
def _default_company_id(self): | ||
return self.env.user.company_id |
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 @@ | ||
* Sylvain LE GAL <https://twitter.com/legalsylvain> |
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 @@ | ||
This module adds support for multi company on Project module. | ||
It adds ``company_id`` on the following models : | ||
- ``project.task.type`` (Stages) | ||
- ``project.tags`` (Tags) |
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,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<odoo noupdate="1"> | ||
|
||
<record id="project_tags_company_rule" model="ir.rule"> | ||
<field name="name">Project Tags - Multi-Company</field> | ||
<field name="model_id" ref="project.model_project_tags"/> | ||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field> | ||
</record> | ||
|
||
<record id="project_task_type_company_rule" model="ir.rule"> | ||
<field name="name">Project Stages - Multi-Company</field> | ||
<field name="model_id" ref="project.model_project_task_type"/> | ||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field> | ||
</record> | ||
|
||
</odoo> |
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,30 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
Copyright (C) 2021 - Today: GRAP (http://www.grap.coop) | ||
@author: Sylvain LE GAL (https://twitter.com/legalsylvain) | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
--> | ||
|
||
<odoo> | ||
|
||
<record id="view_project_tags_tree" model="ir.ui.view"> | ||
<field name="model">project.tags</field> | ||
<field name="arch" type="xml"> | ||
<tree> | ||
<field name="name" /> | ||
<field name="company_id" groups="base.group_multi_company"/> | ||
</tree> | ||
</field> | ||
</record> | ||
|
||
<record id="view_project_tags_form" model="ir.ui.view"> | ||
<field name="model">project.tags</field> | ||
<field name="inherit_id" ref="project.project_tags_form_view"/> | ||
<field name="arch" type="xml"> | ||
<field name="name" position="after"> | ||
<field name="company_id" groups="base.group_multi_company"/> | ||
</field> | ||
</field> | ||
</record> | ||
|
||
</odoo> |
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,30 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
Copyright (C) 2021 - Today: GRAP (http://www.grap.coop) | ||
@author: Sylvain LE GAL (https://twitter.com/legalsylvain) | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
--> | ||
|
||
<odoo> | ||
|
||
<record id="view_project_task_type_tree" model="ir.ui.view"> | ||
<field name="model">project.task.type</field> | ||
<field name="inherit_id" ref="project.task_type_tree"/> | ||
<field name="arch" type="xml"> | ||
<field name="description" position="after"> | ||
<field name="company_id" groups="base.group_multi_company"/> | ||
</field> | ||
</field> | ||
</record> | ||
|
||
<record id="view_project_task_type_form" model="ir.ui.view"> | ||
<field name="model">project.task.type</field> | ||
<field name="inherit_id" ref="project.task_type_edit"/> | ||
<field name="arch" type="xml"> | ||
<field name="mail_template_id" position="after"> | ||
<field name="company_id" groups="base.group_multi_company"/> | ||
</field> | ||
</field> | ||
</record> | ||
|
||
</odoo> |
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 @@ | ||
../../../../project_multi_company |
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,6 @@ | ||
import setuptools | ||
|
||
setuptools.setup( | ||
setup_requires=['setuptools-odoo'], | ||
odoo_addon=True, | ||
) |