diff --git a/document_page_project/__manifest__.py b/document_page_project/__manifest__.py index 43148709..a98ea9a9 100644 --- a/document_page_project/__manifest__.py +++ b/document_page_project/__manifest__.py @@ -3,22 +3,15 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { - 'name': 'Document Page Project', - 'summary': 'This module links document pages to projects', - 'version': '12.0.1.0.0', + "name": "Document Page Project", + "summary": "This module links document pages to projects", + "version": "12.0.1.0.0", "development_status": "Beta", - 'category': 'Project', - 'author': 'Eficent, ' - 'Odoo Community Association (OCA)', - 'website': 'https://github.com/OCA/knowledge', - 'license': 'AGPL-3', - 'depends': [ - 'project', - 'document_page', - ], - 'data': [ - 'views/document_page_views.xml', - 'views/project_project_views.xml', - ], - 'installable': True, + "category": "Project", + "author": "Eficent, " "Odoo Community Association (OCA)", + "website": "https://github.com/OCA/knowledge", + "license": "AGPL-3", + "depends": ["project", "document_page"], + "data": ["views/document_page_views.xml", "views/project_project_views.xml"], + "installable": True, } diff --git a/document_page_project/models/document_page.py b/document_page_project/models/document_page.py index dd55e43d..0509b1a7 100644 --- a/document_page_project/models/document_page.py +++ b/document_page_project/models/document_page.py @@ -6,9 +6,6 @@ from odoo import fields, models class DocumentPage(models.Model): - _inherit = 'document.page' + _inherit = "document.page" - project_id = fields.Many2one( - string='Project', - comodel_name='project.project', - ) + project_id = fields.Many2one(string="Project", comodel_name="project.project") diff --git a/document_page_project/models/project_project.py b/document_page_project/models/project_project.py index 955f748c..a5d3a53b 100644 --- a/document_page_project/models/project_project.py +++ b/document_page_project/models/project_project.py @@ -6,16 +6,12 @@ from odoo import api, fields, models class ProjectProject(models.Model): - _inherit = 'project.project' + _inherit = "project.project" document_page_ids = fields.One2many( - string='Wiki', - comodel_name='document.page', - inverse_name='project_id', - ) - document_page_count = fields.Integer( - compute='_compute_document_page_count', + string="Wiki", comodel_name="document.page", inverse_name="project_id" ) + document_page_count = fields.Integer(compute="_compute_document_page_count") @api.multi def _compute_document_page_count(self):