From dfe7e981c4764a1e2c13033572b9dc14627be455 Mon Sep 17 00:00:00 2001 From: Heliconia Solutions Date: Fri, 27 Dec 2024 11:51:14 +0530 Subject: [PATCH] [MIG] product_document_domain: Migration to 18.0 --- product_document_domain/README.rst | 12 +++++++----- product_document_domain/__manifest__.py | 2 +- product_document_domain/readme/CONTRIBUTORS.md | 1 + .../tests/test_product_document_domain.py | 15 +++++++++++++++ 4 files changed, 24 insertions(+), 6 deletions(-) diff --git a/product_document_domain/README.rst b/product_document_domain/README.rst index 1fc10729a9e..96c622b71c0 100644 --- a/product_document_domain/README.rst +++ b/product_document_domain/README.rst @@ -17,13 +17,13 @@ Product Document Domain :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github - :target: https://github.com/OCA/product-attribute/tree/17.0/product_document_domain + :target: https://github.com/OCA/product-attribute/tree/18.0/product_document_domain :alt: OCA/product-attribute .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/product-attribute-17-0/product-attribute-17-0-product_document_domain + :target: https://translation.odoo-community.org/projects/product-attribute-18-0/product-attribute-18-0-product_document_domain :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=17.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=18.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -60,7 +60,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -81,6 +81,8 @@ Contributors - Valentin Vinagre - Harald Panten +- Heliconia Solutions Pvt. Ltd. + Maintainers ----------- @@ -102,6 +104,6 @@ Current `maintainer `__: |maintainer-tisho99| -This module is part of the `OCA/product-attribute `_ project on GitHub. +This module is part of the `OCA/product-attribute `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_document_domain/__manifest__.py b/product_document_domain/__manifest__.py index 5c711ca72f3..4b2aab20d36 100644 --- a/product_document_domain/__manifest__.py +++ b/product_document_domain/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Product Document Domain", "summary": "More user friendly domain and new filters for product documents", - "version": "17.0.1.0.0", + "version": "18.0.1.0.0", "category": "Product", "website": "https://github.com/OCA/product-attribute", "author": "Sygel, Odoo Community Association (OCA)", diff --git a/product_document_domain/readme/CONTRIBUTORS.md b/product_document_domain/readme/CONTRIBUTORS.md index f566245042c..4f79f491dee 100755 --- a/product_document_domain/readme/CONTRIBUTORS.md +++ b/product_document_domain/readme/CONTRIBUTORS.md @@ -2,3 +2,4 @@ - Alberto Martínez - Valentin Vinagre - Harald Panten +- Heliconia Solutions Pvt. Ltd. \<\> diff --git a/product_document_domain/tests/test_product_document_domain.py b/product_document_domain/tests/test_product_document_domain.py index c0671a35c09..948fc329a74 100644 --- a/product_document_domain/tests/test_product_document_domain.py +++ b/product_document_domain/tests/test_product_document_domain.py @@ -38,3 +38,18 @@ def test_document_counts(self): self.assertEqual(self.product_tmpl.product_document_count, 1) self.assertEqual(self.product_var_1.product_document_count, 2) self.assertEqual(self.product_var_2.product_document_count, 1) + + def test_product_action_open_documents(self): + """Test the document action for product variants""" + action = self.product_var_1.action_open_documents() + self.assertEqual( + action["context"]["default_parent_res_id"], self.product_tmpl.id + ) + self.assertFalse(action["context"]["search_default_context_variant"]) + self.assertFalse(action["context"]["search_default_context_template"]) + self.assertTrue(action["context"]["search_default_context_variant_template"]) + + def test_template_action_open_documents(self): + """Test the document action for product template""" + action = self.product_tmpl.action_open_documents() + self.assertTrue(action["context"]["search_default_context_template"])