diff --git a/attachment_category/__manifest__.py b/attachment_category/__manifest__.py index e8039ece..f9f2163b 100644 --- a/attachment_category/__manifest__.py +++ b/attachment_category/__manifest__.py @@ -5,11 +5,12 @@ 'name': 'Atachment Category', 'summary': """ Adds a document category to help classification""", - 'version': '12.0.1.0.0', + 'version': '11.0.1.0.0', 'license': 'AGPL-3', 'author': 'ACSONE SA/NV,Odoo Community Association (OCA)', 'depends': [ "base", + "knowledge", ], 'data': [ 'views/ir_attachment.xml', diff --git a/attachment_category/models/ir_attachment_category.py b/attachment_category/models/ir_attachment_category.py index b0bc8527..c5e658a4 100644 --- a/attachment_category/models/ir_attachment_category.py +++ b/attachment_category/models/ir_attachment_category.py @@ -17,8 +17,11 @@ class IrAttachmentCategory(models.Model): ) parent_id = fields.Many2one( "ir.attachment.category", + index=True, + ondelete="cascade", ) - parent_path = fields.Char(index=True) + parent_left = fields.Integer('Left Parent', index=True) + parent_right = fields.Integer('Right Parent', index=True) attachment_ids = fields.Many2many( compute="_compute_attachment_count", comodel_name="ir.attachment" diff --git a/attachment_category/views/ir_attachment_category.xml b/attachment_category/views/ir_attachment_category.xml index 4b1fc7fe..8c1f9777 100644 --- a/attachment_category/views/ir_attachment_category.xml +++ b/attachment_category/views/ir_attachment_category.xml @@ -63,7 +63,7 @@ Attachment Categories - + diff --git a/setup/attachment_category/.eggs/README.txt b/setup/attachment_category/.eggs/README.txt new file mode 100644 index 00000000..5d016688 --- /dev/null +++ b/setup/attachment_category/.eggs/README.txt @@ -0,0 +1,6 @@ +This directory contains eggs that were downloaded by setuptools to build, test, and run plug-ins. + +This directory caches those eggs to prevent repeated downloads. + +However, it is safe to delete this directory. + diff --git a/setup/attachment_category/setup.cfg b/setup/attachment_category/setup.cfg new file mode 100644 index 00000000..3c6e79cf --- /dev/null +++ b/setup/attachment_category/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1