diff --git a/contract/__manifest__.py b/contract/__manifest__.py
index 67606ce6..7862d532 100644
--- a/contract/__manifest__.py
+++ b/contract/__manifest__.py
@@ -20,6 +20,7 @@
'depends': ['base', 'account', 'product'],
"external_dependencies": {"python": ["dateutil"]},
'data': [
+ 'security/contract_tag.xml',
'security/ir.model.access.csv',
'security/contract_security.xml',
'report/report_contract.xml',
diff --git a/contract/models/__init__.py b/contract/models/__init__.py
index 28dc9922..b7382c2d 100644
--- a/contract/models/__init__.py
+++ b/contract/models/__init__.py
@@ -9,3 +9,4 @@ from . import contract_line
from . import account_invoice
from . import account_invoice_line
from . import res_partner
+from . import contract_tag
diff --git a/contract/models/contract.py b/contract/models/contract.py
index 7dec3b29..30fe1d9a 100644
--- a/contract/models/contract.py
+++ b/contract/models/contract.py
@@ -91,6 +91,7 @@ class ContractContract(models.Model):
string='Commercial Entity',
index=True
)
+ tag_ids = fields.Many2many(comodel_name="contract.tag", string="Tags")
@api.multi
def _inverse_partner_id(self):
diff --git a/contract/models/contract_tag.py b/contract/models/contract_tag.py
new file mode 100644
index 00000000..cfe17020
--- /dev/null
+++ b/contract/models/contract_tag.py
@@ -0,0 +1,17 @@
+# Copyright 2019 ACSONE SA/NV
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+from odoo import fields, models
+
+
+class ContractTag(models.Model):
+
+ _name = 'contract.tag'
+ _description = 'Contract Tag'
+
+ name = fields.Char(requirment=True)
+ company_id = fields.Many2one(
+ 'res.company',
+ string='Company',
+ default=lambda self: self.env.user.company_id,
+ )
diff --git a/contract/security/contract_tag.xml b/contract/security/contract_tag.xml
new file mode 100644
index 00000000..8866afae
--- /dev/null
+++ b/contract/security/contract_tag.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+ contract.tag access
+
+
+
+
+
+
+
+
+
+ Contract tag multi-company
+
+ ['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]
+
+
+
diff --git a/contract/views/contract.xml b/contract/views/contract.xml
index 5145abc5..670b4040 100644
--- a/contract/views/contract.xml
+++ b/contract/views/contract.xml
@@ -55,6 +55,7 @@
+