From 09e64ff1256b710a897f8fc6573d1a19bd31e511 Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Sun, 18 Oct 2020 15:18:15 +0200 Subject: [PATCH] [IMP] : black, isort, prettier --- .../models/ir_attachment_category.py | 16 ++++++++++++---- .../views/ir_attachment_category.xml | 8 ++------ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/attachment_category/models/ir_attachment_category.py b/attachment_category/models/ir_attachment_category.py index e2671fe0..790e276e 100644 --- a/attachment_category/models/ir_attachment_category.py +++ b/attachment_category/models/ir_attachment_category.py @@ -11,13 +11,20 @@ class IrAttachmentCategory(models.Model): _parent_store = True name = fields.Char() - display_name = fields.Char(compute="_compute_display_name", store=True,) - parent_id = fields.Many2one("ir.attachment.category",) + display_name = fields.Char( + compute="_compute_display_name", + store=True, + ) + parent_id = fields.Many2one( + "ir.attachment.category", + ) parent_path = fields.Char(index=True) attachment_ids = fields.Many2many( compute="_compute_attachment_count", comodel_name="ir.attachment" ) - attachment_count = fields.Integer(compute="_compute_attachment_count",) + attachment_count = fields.Integer( + compute="_compute_attachment_count", + ) @api.depends("name", "parent_id.display_name") def _compute_display_name(self): @@ -28,7 +35,8 @@ class IrAttachmentCategory(models.Model): for category in self: if category.parent_id.display_name: category.display_name = "{}/{}".format( - category.parent_id.display_name, category.name, + category.parent_id.display_name, + category.name, ) else: category.display_name = category.name diff --git a/attachment_category/views/ir_attachment_category.xml b/attachment_category/views/ir_attachment_category.xml index 37135529..51c358d0 100644 --- a/attachment_category/views/ir_attachment_category.xml +++ b/attachment_category/views/ir_attachment_category.xml @@ -52,12 +52,8 @@ ir.attachment.category tree,form -

- Create a new document -

-

- Also you will find here all the related document categories. -

+

Create a new document

+

Also you will find here all the related document categories.