-
-
Notifications
You must be signed in to change notification settings - Fork 272
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 moylop260
- Loading branch information
Showing
10 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
setup/utm_medium_multi_company/odoo/addons/utm_medium_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 @@ | ||
../../../../utm_medium_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, | ||
) |
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,18 @@ | ||
# Copyright 2019 ACSONE SA/NV | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
'name': 'Utm Medium Multi Company', | ||
'summary': """ | ||
This module add multi-company management to utm medium""", | ||
'version': '12.0.1.0.0', | ||
'license': 'AGPL-3', | ||
'author': 'ACSONE SA/NV,' | ||
'Odoo Community Association (OCA)', | ||
'website': 'https://github.com/OCA/multi-company', | ||
'depends': ['utm'], | ||
'data': [ | ||
'security/utm_medium.xml', | ||
'views/utm_medium.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 @@ | ||
from . import utm_medium |
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,18 @@ | ||
# Copyright 2019 ACSONE SA/NV | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class UtmMedium(models.Model): | ||
|
||
_inherit = 'utm.medium' | ||
|
||
company_id = fields.Many2one( | ||
'res.company', | ||
'Company', | ||
default=lambda self: self.env['res.company']._company_default_get( | ||
'utm.medium' | ||
), | ||
ondelete='cascade', | ||
) |
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 @@ | ||
* Souheil Bejaoui <souheil.bejaoui@acsone.eu> |
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 @@ | ||
This module add multi-company management to utm medium |
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,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Copyright 2019 ACSONE SA/NV | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> | ||
|
||
<odoo> | ||
<record id="utm_medium_comp_rule" model="ir.rule"> | ||
<field name="name">Utm Medium multi company rule</field> | ||
<field name="model_id" ref="utm.model_utm_medium"/> | ||
<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 2019 ACSONE SA/NV | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> | ||
|
||
<odoo> | ||
|
||
<record model="ir.ui.view" id="utm_medium_form_view"> | ||
<field name="name">utm.medium.form (in utm_medium_multi_company)</field> | ||
<field name="model">utm.medium</field> | ||
<field name="inherit_id" ref="utm.utm_medium_view_form"/> | ||
<field name="arch" type="xml"> | ||
<field name="name" position="after"> | ||
<field name="company_id" groups="base.group_multi_company"/> | ||
</field> | ||
</field> | ||
</record> | ||
|
||
|
||
<record model="ir.ui.view" id="utm_medium_tree_view"> | ||
<field name="name">utm.medium.tree (in utm_medium_multi_company)</field> | ||
<field name="model">utm.medium</field> | ||
<field name="inherit_id" ref="utm.utm_medium_view_tree"/> | ||
<field name="arch" type="xml"> | ||
<tree position="inside"> | ||
<field name="company_id" groups="base.group_multi_company"/> | ||
</tree> | ||
</field> | ||
</record> | ||
|
||
</odoo> |