From 2231710de5e85e74c60a11b7b36a725c3a194511 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 +++++++++++------- .../odoo/addons/document_page_approval | 1 + setup/document_page_approval/setup.py | 6 ++++++ 7 files changed, 27 insertions(+), 13 deletions(-) create mode 120000 setup/document_page_approval/odoo/addons/document_page_approval create mode 100644 setup/document_page_approval/setup.py 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} diff --git a/setup/document_page_approval/odoo/addons/document_page_approval b/setup/document_page_approval/odoo/addons/document_page_approval new file mode 120000 index 00000000..1ddb53f1 --- /dev/null +++ b/setup/document_page_approval/odoo/addons/document_page_approval @@ -0,0 +1 @@ +../../../../document_page_approval \ No newline at end of file diff --git a/setup/document_page_approval/setup.py b/setup/document_page_approval/setup.py new file mode 100644 index 00000000..28c57bb6 --- /dev/null +++ b/setup/document_page_approval/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)