[12.0][ADD] attachment_category

This commit is contained in:
Denis Roussel
2019-08-06 11:15:28 +02:00
parent 493b337430
commit d7cc07cbd5
16 changed files with 744 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
# Copyright 2020 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class IrAttachment(models.Model):
_inherit = 'ir.attachment'
category_ids = fields.Many2many(
comodel_name="ir.attachment.category",
relation="ir_attachment_category_rel",
column1="attachment_id",
column2="category_id",
ondelete="restrict",
index=True,
)