From 721246a22a70e284a372419527dcda718fbbf2df Mon Sep 17 00:00:00 2001 From: FernandoRomera Date: Tue, 13 Dec 2022 13:01:55 +0100 Subject: [PATCH] [16.0][MIG] document_page_approval: Migration to 16.0 --- document_page_approval/__manifest__.py | 2 +- document_page_approval/data/email_template.xml | 2 +- .../security/document_page_security.xml | 7 +++++-- .../tests/test_document_page_approval.py | 4 ++-- .../views/document_page_approval.xml | 18 +++++++++++------- 5 files changed, 20 insertions(+), 13 deletions(-) diff --git a/document_page_approval/__manifest__.py b/document_page_approval/__manifest__.py index 57dce431..3a785743 100644 --- a/document_page_approval/__manifest__.py +++ b/document_page_approval/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Document Page Approval", - "version": "15.0.1.0.0", + "version": "16.0.1.0.0", "author": "Savoir-faire Linux, Odoo Community Association (OCA)", "website": "https://github.com/OCA/knowledge", "license": "AGPL-3", diff --git a/document_page_approval/data/email_template.xml b/document_page_approval/data/email_template.xml index deb0ea5a..510e557e 100644 --- a/document_page_approval/data/email_template.xml +++ b/document_page_approval/data/email_template.xml @@ -1,4 +1,4 @@ - + diff --git a/document_page_approval/security/document_page_security.xml b/document_page_approval/security/document_page_security.xml index f0c34538..b8b9fb2b 100644 --- a/document_page_approval/security/document_page_security.xml +++ b/document_page_approval/security/document_page_security.xml @@ -2,7 +2,7 @@ Approver - + Change Request Global - + ['|',('state','=','approved'),('create_uid','=',user.id)] diff --git a/document_page_approval/tests/test_document_page_approval.py b/document_page_approval/tests/test_document_page_approval.py index 6d0971c3..ac0f3c62 100644 --- a/document_page_approval/tests/test_document_page_approval.py +++ b/document_page_approval/tests/test_document_page_approval.py @@ -46,7 +46,7 @@ class TestDocumentPageApproval(common.TransactionCase): self.assertEqual(chreq.state, "to approve") # Needed to compute calculated fields - page.refresh() + page.invalidate_model() self.assertNotEqual(chreq.content, page.content) # who_am_i @@ -61,7 +61,7 @@ class TestDocumentPageApproval(common.TransactionCase): # new changes should create change requests page.write({"content": "New content"}) # Needed to compute calculated fields - page.refresh() + page.invalidate_model() self.assertNotEqual(page.content, "New content") chreq = self.history_obj.search( [("page_id", "=", page.id), ("state", "!=", "approved")] diff --git a/document_page_approval/views/document_page_approval.xml b/document_page_approval/views/document_page_approval.xml index f67d97a9..5445e490 100644 --- a/document_page_approval/views/document_page_approval.xml +++ b/document_page_approval/views/document_page_approval.xml @@ -1,4 +1,4 @@ - + @@ -112,16 +112,20 @@ document.page.history.form document.page.history - - + {'readonly': False} - + {'readonly': False}