├── test-requirements.txt ├── attachment_zipped_download ├── tests │ ├── models │ │ ├── __init__.py │ │ └── res_partner.py │ ├── __init__.py │ └── test_attachment_zipped_download.py ├── controllers │ ├── __init__.py │ └── main.py ├── __init__.py ├── pyproject.toml ├── models │ ├── __init__.py │ ├── ir_attachment.py │ └── ir_attachment_action_download.py ├── static │ └── description │ │ └── icon.png ├── readme │ ├── DESCRIPTION.md │ └── CONTRIBUTORS.md ├── __manifest__.py ├── views │ └── ir_attachment_view.xml └── i18n │ ├── attachment_zipped_download.pot │ ├── pt_BR.po │ ├── fr.po │ ├── hr.po │ ├── pt.po │ ├── it.po │ └── es.po ├── document_page_group ├── __init__.py ├── models │ ├── __init__.py │ └── document_page.py ├── tests │ ├── __init__.py │ └── test_document_page_group.py ├── readme │ ├── DESCRIPTION.md │ └── CONTRIBUTORS.md ├── pyproject.toml ├── static │ └── description │ │ └── icon.png ├── __manifest__.py ├── security │ └── document_page_security.xml ├── views │ └── document_page.xml └── i18n │ ├── document_page_group.pot │ ├── es.po │ ├── it.po │ ├── pt.po │ ├── ca.po │ ├── sl.po │ └── hr.po ├── document_page_reference ├── __init__.py ├── models │ └── __init__.py ├── tests │ └── __init__.py ├── readme │ ├── CONTRIBUTORS.md │ ├── DESCRIPTION.md │ └── USAGE.md ├── pyproject.toml ├── static │ ├── description │ │ └── icon.png │ └── src │ │ └── js │ │ └── editor.esm.js ├── migrations │ └── 18.0.1.1.0 │ │ └── post-migration.py ├── views │ └── report_document_page.xml ├── __manifest__.py └── i18n │ ├── document_page_reference.pot │ ├── it.po │ ├── pt.po │ └── es.po ├── document_page ├── readme │ ├── CONFIGURE.md │ ├── DESCRIPTION.md │ ├── INSTALL.md │ ├── CREDITS.md │ ├── USAGE.md │ └── CONTRIBUTORS.md ├── pyproject.toml ├── images │ ├── page_list.png │ ├── create_page.png │ ├── page_history.png │ ├── category_list.png │ └── create_category.png ├── static │ ├── src │ │ ├── img │ │ │ ├── POS.png │ │ │ ├── dashboard.png │ │ │ └── add_to_dashboard.png │ │ ├── scss │ │ │ ├── document_page_variables.scss │ │ │ └── document_page.scss │ │ └── js │ │ │ ├── document_page_kanban_view.esm.js │ │ │ └── document_page_kanban_controller.esm.js │ └── description │ │ └── icon.png ├── __init__.py ├── wizard │ ├── __init__.py │ ├── document_page_show_diff.xml │ ├── document_page_show_diff.py │ ├── document_page_create_menu.xml │ └── document_page_create_menu.py ├── models │ ├── __init__.py │ ├── ir_ui_menu.py │ └── document_page_history.py ├── tests │ ├── __init__.py │ ├── test_document_page_history.py │ ├── test_document_page_show_diff.py │ ├── test_document_page_create_menu.py │ └── test_document_page.py ├── security │ ├── ir.model.access.csv │ └── document_page_security.xml ├── views │ └── report_document_page.xml └── __manifest__.py ├── document_page_tag ├── readme │ ├── CONFIGURE.md │ ├── INSTALL.md │ ├── DESCRIPTION.md │ ├── USAGE.md │ └── CONTRIBUTORS.md ├── pyproject.toml ├── static │ └── description │ │ └── icon.png ├── __init__.py ├── tests │ ├── __init__.py │ └── test_document_page_tag.py ├── models │ ├── __init__.py │ ├── document_page.py │ └── document_page_tag.py ├── security │ └── ir.model.access.csv ├── __manifest__.py └── views │ ├── document_page.xml │ └── document_page_tag.xml ├── document_page_access_group_user_role ├── __init__.py ├── readme │ ├── DESCRIPTION.md │ ├── CONTRIBUTORS.md │ └── USAGE.md ├── pyproject.toml ├── models │ ├── __init__.py │ └── document_page.py ├── static │ └── description │ │ └── icon.png ├── tests │ ├── __init__.py │ └── test_document_page_access_group_user_role.py ├── __manifest__.py ├── views │ └── document_page_views.xml └── i18n │ ├── document_page_access_group_user_role.pot │ ├── es.po │ ├── it.po │ └── pt.po ├── document_page_partner ├── readme │ ├── CONTRIBUTORS.md │ ├── DESCRIPTION.md │ └── USAGE.md ├── pyproject.toml ├── static │ └── description │ │ └── icon.png ├── models │ ├── __init__.py │ └── document_page.py ├── __manifest__.py ├── i18n │ ├── document_page_partner.pot │ ├── document_page_partner_id.pot │ ├── it.po │ ├── de.po │ ├── pt.po │ └── es.po ├── __init__.py └── views │ └── document_page.xml ├── document_page_approval ├── tests │ └── __init__.py ├── models │ └── __init__.py ├── pyproject.toml ├── images │ ├── category.png │ ├── page_history.png │ └── page_history_list.png ├── readme │ ├── DESCRIPTION.md │ ├── CONFIGURE.md │ ├── USAGE.md │ └── CONTRIBUTORS.md ├── static │ └── description │ │ └── icon.png ├── __init__.py ├── hooks.py ├── __manifest__.py ├── data │ └── email_template.xml └── security │ └── document_page_security.xml ├── checklog-odoo.cfg ├── document_url ├── readme │ ├── DESCRIPTION.md │ ├── CONTRIBUTORS.md │ └── USAGE.md ├── pyproject.toml ├── static │ ├── description │ │ └── icon.png │ └── src │ │ ├── scss │ │ └── document_url.scss │ │ └── xml │ │ └── url.xml ├── models │ ├── __init__.py │ └── ir_attachment.py ├── tests │ ├── __init__.py │ └── test_document_url.py ├── security │ └── ir.model.access.csv ├── wizard │ ├── __init__.py │ └── document_url.py ├── __init__.py ├── __manifest__.py ├── view │ └── document_url_view.xml └── i18n │ └── document_url.pot ├── document_page_project ├── readme │ ├── DESCRIPTION.md │ ├── USAGE.md │ └── CONTRIBUTORS.md ├── pyproject.toml ├── __init__.py ├── static │ └── description │ │ └── icon.png ├── tests │ ├── __init__.py │ └── test_project_project.py ├── models │ ├── __init__.py │ ├── document_page.py │ └── project_project.py ├── __manifest__.py ├── views │ ├── document_page_views.xml │ └── project_project_views.xml └── i18n │ ├── document_page_project.pot │ ├── it.po │ ├── es.po │ ├── pt.po │ ├── he_IL.po │ └── hr.po ├── document_knowledge ├── pyproject.toml ├── readme │ ├── DESCRIPTION.md │ ├── CREDITS.md │ ├── USAGE.md │ ├── CONTRIBUTORS.md │ └── CONFIGURE.md ├── static │ └── description │ │ └── icon.png ├── __init__.py ├── models │ ├── __init__.py │ ├── ir_attachment.py │ └── res_config.py ├── data │ ├── res_users.xml │ └── ir_module_category.xml ├── demo │ └── document_knowledge.xml ├── security │ └── document_knowledge_security.xml ├── __manifest__.py └── views │ ├── document_knowledge.xml │ └── res_config.xml ├── document_page_access_group ├── pyproject.toml ├── readme │ ├── DESCRIPTION.md │ ├── CONTRIBUTORS.md │ └── USAGE.md ├── static │ └── description │ │ └── icon.png ├── tests │ ├── __init__.py │ ├── test_document_page_access_group.py │ └── common.py ├── __init__.py ├── models │ ├── __init__.py │ └── document_page.py ├── __manifest__.py ├── security │ └── security.xml ├── views │ └── document_page.xml └── i18n │ ├── document_page_access_group.pot │ ├── pt_BR.po │ ├── ca.po │ ├── es.po │ └── it.po ├── prettier.config.cjs ├── .editorconfig ├── .ruff.toml ├── setup └── _metapackage │ └── pyproject.toml ├── .copier-answers.yml ├── .gitignore └── .github └── workflows ├── pre-commit.yml └── test.yml /test-requirements.txt: -------------------------------------------------------------------------------- 1 | odoo_test_helper 2 | -------------------------------------------------------------------------------- /attachment_zipped_download/tests/models/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /document_page_group/__init__.py: -------------------------------------------------------------------------------- 1 | from . import models 2 | -------------------------------------------------------------------------------- /document_page_reference/__init__.py: -------------------------------------------------------------------------------- 1 | from . import models 2 | -------------------------------------------------------------------------------- /document_page/readme/CONFIGURE.md: -------------------------------------------------------------------------------- 1 | No configuration required. 2 | -------------------------------------------------------------------------------- /document_page_tag/readme/CONFIGURE.md: -------------------------------------------------------------------------------- 1 | No configuration required. 2 | -------------------------------------------------------------------------------- /attachment_zipped_download/controllers/__init__.py: -------------------------------------------------------------------------------- 1 | from . import main 2 | -------------------------------------------------------------------------------- /document_page_access_group_user_role/__init__.py: -------------------------------------------------------------------------------- 1 | from . import models 2 | -------------------------------------------------------------------------------- /document_page_group/models/__init__.py: -------------------------------------------------------------------------------- 1 | from . import document_page 2 | -------------------------------------------------------------------------------- /document_page_reference/models/__init__.py: -------------------------------------------------------------------------------- 1 | from . import document_page 2 | -------------------------------------------------------------------------------- /document_page_group/tests/__init__.py: -------------------------------------------------------------------------------- 1 | from . import test_document_page_group 2 | -------------------------------------------------------------------------------- /document_page_partner/readme/CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | - Holger Brunn \ 2 | -------------------------------------------------------------------------------- /document_page_reference/tests/__init__.py: -------------------------------------------------------------------------------- 1 | from . import test_document_reference 2 | -------------------------------------------------------------------------------- /document_page_approval/tests/__init__.py: -------------------------------------------------------------------------------- 1 | from . import test_document_page_approval 2 | -------------------------------------------------------------------------------- /attachment_zipped_download/__init__.py: -------------------------------------------------------------------------------- 1 | from . import controllers 2 | from . import models 3 | -------------------------------------------------------------------------------- /checklog-odoo.cfg: -------------------------------------------------------------------------------- 1 | [checklog-odoo] 2 | ignore= 3 | WARNING.* 0 failed, 0 error\(s\).* 4 | -------------------------------------------------------------------------------- /document_page_reference/readme/CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | - Enric Tobella \ 2 | -------------------------------------------------------------------------------- /document_url/readme/DESCRIPTION.md: -------------------------------------------------------------------------------- 1 | Module that allows to attach an URL as a document. 2 | -------------------------------------------------------------------------------- /document_page_approval/models/__init__.py: -------------------------------------------------------------------------------- 1 | from . import document_page, document_page_history 2 | -------------------------------------------------------------------------------- /document_page_group/readme/DESCRIPTION.md: -------------------------------------------------------------------------------- 1 | This module allows to define groups on a category. 2 | -------------------------------------------------------------------------------- /document_page_project/readme/DESCRIPTION.md: -------------------------------------------------------------------------------- 1 | This module allow to link document pages to projects. 2 | -------------------------------------------------------------------------------- /document_url/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["whool"] 3 | build-backend = "whool.buildapi" 4 | -------------------------------------------------------------------------------- /document_page/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["whool"] 3 | build-backend = "whool.buildapi" 4 | -------------------------------------------------------------------------------- /document_page/readme/DESCRIPTION.md: -------------------------------------------------------------------------------- 1 | This module allows you to write web pages for internal documentation. 2 | -------------------------------------------------------------------------------- /document_page_partner/readme/DESCRIPTION.md: -------------------------------------------------------------------------------- 1 | This module allows you to organize your knowledgebase by partner. 2 | -------------------------------------------------------------------------------- /document_page_tag/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["whool"] 3 | build-backend = "whool.buildapi" 4 | -------------------------------------------------------------------------------- /document_knowledge/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["whool"] 3 | build-backend = "whool.buildapi" 4 | -------------------------------------------------------------------------------- /document_page/images/page_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OCA/knowledge/HEAD/document_page/images/page_list.png -------------------------------------------------------------------------------- /document_page_access_group_user_role/readme/DESCRIPTION.md: -------------------------------------------------------------------------------- 1 | Use of roles (module base_user_role) in Document Pages. 2 | -------------------------------------------------------------------------------- /document_page_approval/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["whool"] 3 | build-backend = "whool.buildapi" 4 | -------------------------------------------------------------------------------- /document_page_group/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["whool"] 3 | build-backend = "whool.buildapi" 4 | -------------------------------------------------------------------------------- /document_page_partner/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["whool"] 3 | build-backend = "whool.buildapi" 4 | -------------------------------------------------------------------------------- /document_page_project/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["whool"] 3 | build-backend = "whool.buildapi" 4 | -------------------------------------------------------------------------------- /attachment_zipped_download/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["whool"] 3 | build-backend = "whool.buildapi" 4 | -------------------------------------------------------------------------------- /document_page/images/create_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OCA/knowledge/HEAD/document_page/images/create_page.png -------------------------------------------------------------------------------- /document_page/images/page_history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OCA/knowledge/HEAD/document_page/images/page_history.png -------------------------------------------------------------------------------- /document_page/static/src/img/POS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OCA/knowledge/HEAD/document_page/static/src/img/POS.png -------------------------------------------------------------------------------- /document_page_access_group/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["whool"] 3 | build-backend = "whool.buildapi" 4 | -------------------------------------------------------------------------------- /document_page_reference/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["whool"] 3 | build-backend = "whool.buildapi" 4 | -------------------------------------------------------------------------------- /attachment_zipped_download/models/__init__.py: -------------------------------------------------------------------------------- 1 | from . import ir_attachment 2 | from . import ir_attachment_action_download 3 | -------------------------------------------------------------------------------- /document_knowledge/readme/DESCRIPTION.md: -------------------------------------------------------------------------------- 1 | This module is the base for any knowledge and document management 2 | application. 3 | -------------------------------------------------------------------------------- /document_page/images/category_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OCA/knowledge/HEAD/document_page/images/category_list.png -------------------------------------------------------------------------------- /document_page/readme/INSTALL.md: -------------------------------------------------------------------------------- 1 | This module depends on module knowledge. So make sure to have it in your 2 | addons list. 3 | -------------------------------------------------------------------------------- /document_page/images/create_category.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OCA/knowledge/HEAD/document_page/images/create_category.png -------------------------------------------------------------------------------- /document_page/static/description/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OCA/knowledge/HEAD/document_page/static/description/icon.png -------------------------------------------------------------------------------- /document_page/static/src/img/dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OCA/knowledge/HEAD/document_page/static/src/img/dashboard.png -------------------------------------------------------------------------------- /document_page_access_group_user_role/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["whool"] 3 | build-backend = "whool.buildapi" 4 | -------------------------------------------------------------------------------- /document_page_approval/images/category.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OCA/knowledge/HEAD/document_page_approval/images/category.png -------------------------------------------------------------------------------- /document_page_project/__init__.py: -------------------------------------------------------------------------------- 1 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 2 | from . import models 3 | -------------------------------------------------------------------------------- /document_page_tag/readme/INSTALL.md: -------------------------------------------------------------------------------- 1 | This module depends on module knowledge. So make sure to have it in your 2 | addons list. 3 | -------------------------------------------------------------------------------- /document_url/static/description/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OCA/knowledge/HEAD/document_url/static/description/icon.png -------------------------------------------------------------------------------- /document_url/models/__init__.py: -------------------------------------------------------------------------------- 1 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 2 | 3 | from . import ir_attachment 4 | -------------------------------------------------------------------------------- /document_knowledge/readme/CREDITS.md: -------------------------------------------------------------------------------- 1 | The migration of this module from 17.0 to 18.0 was financially supported by: 2 | 3 | - Camptocamp 4 | -------------------------------------------------------------------------------- /document_knowledge/static/description/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OCA/knowledge/HEAD/document_knowledge/static/description/icon.png -------------------------------------------------------------------------------- /document_page_access_group/readme/DESCRIPTION.md: -------------------------------------------------------------------------------- 1 | This module allows to select which users groups have access to the 2 | document pages. 3 | -------------------------------------------------------------------------------- /document_page_approval/images/page_history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OCA/knowledge/HEAD/document_page_approval/images/page_history.png -------------------------------------------------------------------------------- /document_page_group/static/description/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OCA/knowledge/HEAD/document_page_group/static/description/icon.png -------------------------------------------------------------------------------- /document_page_project/readme/USAGE.md: -------------------------------------------------------------------------------- 1 | - Go to to a project and click on "Wiki Pages" to see linked documents 2 | or to create new ones. 3 | -------------------------------------------------------------------------------- /document_page_tag/readme/DESCRIPTION.md: -------------------------------------------------------------------------------- 1 | This module allows you to fill in keywords on your pages to simplify 2 | finding them afterwards. 3 | -------------------------------------------------------------------------------- /document_page_tag/static/description/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OCA/knowledge/HEAD/document_page_tag/static/description/icon.png -------------------------------------------------------------------------------- /document_page/__init__.py: -------------------------------------------------------------------------------- 1 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 2 | 3 | from . import models 4 | from . import wizard 5 | -------------------------------------------------------------------------------- /document_page/static/src/img/add_to_dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OCA/knowledge/HEAD/document_page/static/src/img/add_to_dashboard.png -------------------------------------------------------------------------------- /document_page_partner/static/description/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OCA/knowledge/HEAD/document_page_partner/static/description/icon.png -------------------------------------------------------------------------------- /document_page_project/static/description/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OCA/knowledge/HEAD/document_page_project/static/description/icon.png -------------------------------------------------------------------------------- /document_url/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). 2 | 3 | from . import test_document_url 4 | -------------------------------------------------------------------------------- /document_page_access_group_user_role/readme/CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | - [Tecnativa](https://www.tecnativa.com): 2 | - Víctor Martínez 3 | - Pedro M. Baeza 4 | -------------------------------------------------------------------------------- /document_page_approval/images/page_history_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OCA/knowledge/HEAD/document_page_approval/images/page_history_list.png -------------------------------------------------------------------------------- /document_page_approval/readme/DESCRIPTION.md: -------------------------------------------------------------------------------- 1 | This module adds a workflow to approve page modifications and show the 2 | approved version by default. 3 | -------------------------------------------------------------------------------- /document_page_approval/static/description/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OCA/knowledge/HEAD/document_page_approval/static/description/icon.png -------------------------------------------------------------------------------- /document_page_project/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 2 | from . import test_project_project 3 | -------------------------------------------------------------------------------- /document_page_reference/static/description/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OCA/knowledge/HEAD/document_page_reference/static/description/icon.png -------------------------------------------------------------------------------- /document_page_tag/readme/USAGE.md: -------------------------------------------------------------------------------- 1 | Fill in your keywords, and search for them by typing (part of) the 2 | keyword and choose searching for keywords. 3 | -------------------------------------------------------------------------------- /attachment_zipped_download/static/description/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OCA/knowledge/HEAD/attachment_zipped_download/static/description/icon.png -------------------------------------------------------------------------------- /document_page_access_group/static/description/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OCA/knowledge/HEAD/document_page_access_group/static/description/icon.png -------------------------------------------------------------------------------- /document_page_partner/readme/USAGE.md: -------------------------------------------------------------------------------- 1 | To use this module, simply fill in a partner for some pages, then you 2 | can search by partner or group by partner. 3 | -------------------------------------------------------------------------------- /document_page_reference/readme/DESCRIPTION.md: -------------------------------------------------------------------------------- 1 | This module allows to add a reference name on documents and simplifies 2 | the link between document pages. 3 | -------------------------------------------------------------------------------- /document_page_access_group_user_role/models/__init__.py: -------------------------------------------------------------------------------- 1 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 2 | 3 | from . import document_page 4 | -------------------------------------------------------------------------------- /document_page_access_group/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 2 | 3 | from . import test_document_page_access_group 4 | -------------------------------------------------------------------------------- /document_page_access_group_user_role/static/description/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OCA/knowledge/HEAD/document_page_access_group_user_role/static/description/icon.png -------------------------------------------------------------------------------- /document_page_project/models/__init__.py: -------------------------------------------------------------------------------- 1 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 2 | from . import document_page 3 | from . import project_project 4 | -------------------------------------------------------------------------------- /document_page_tag/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015-2018 Therp BV 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 3 | from . import models 4 | -------------------------------------------------------------------------------- /document_knowledge/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2004-2009 Tiny SPRL (). 2 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 3 | 4 | from . import models 5 | -------------------------------------------------------------------------------- /document_page_access_group_user_role/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl) 2 | 3 | from . import test_document_page_access_group_user_role 4 | -------------------------------------------------------------------------------- /document_page/wizard/__init__.py: -------------------------------------------------------------------------------- 1 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 2 | 3 | from . import document_page_create_menu 4 | from . import document_page_show_diff 5 | -------------------------------------------------------------------------------- /document_page_partner/models/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015-24 Therp BV 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 3 | from . import document_page 4 | -------------------------------------------------------------------------------- /document_page_access_group/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2022 Manuel Regidor 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). 3 | 4 | from . import models 5 | -------------------------------------------------------------------------------- /document_page/models/__init__.py: -------------------------------------------------------------------------------- 1 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 2 | 3 | from . import document_page 4 | from . import document_page_history 5 | from . import ir_ui_menu 6 | -------------------------------------------------------------------------------- /document_page_tag/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015-2018 Therp BV 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 3 | from . import test_document_page_tag 4 | -------------------------------------------------------------------------------- /document_page_access_group/models/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2022 Manuel Regidor 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). 3 | 4 | from . import document_page 5 | -------------------------------------------------------------------------------- /attachment_zipped_download/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl) 2 | 3 | from . import test_attachment_zipped_download 4 | from . import test_ir_attachment_action_download 5 | -------------------------------------------------------------------------------- /document_page/readme/CREDITS.md: -------------------------------------------------------------------------------- 1 | The development of this module has been financially supported by: 2 | 3 | - Odoo SA \<\> 4 | - Savoir-faire Linux \<\> 5 | - Camptocamp 6 | -------------------------------------------------------------------------------- /document_page_project/readme/CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | - [Forgeflow](https://www.forgeflow.com): 2 | - Lois Rilo \<\> 3 | - [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io) 4 | - Bhavesh Heliconia 5 | -------------------------------------------------------------------------------- /document_knowledge/models/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2004-2009 Tiny SPRL (). 2 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 3 | 4 | from . import ir_attachment 5 | from . import res_config 6 | -------------------------------------------------------------------------------- /document_page_tag/models/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015-2018 Therp BV 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 3 | from . import document_page 4 | from . import document_page_tag 5 | -------------------------------------------------------------------------------- /document_url/security/ir.model.access.csv: -------------------------------------------------------------------------------- 1 | id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink 2 | access_ir_attachment_add_url,access.ir.attachment.add.url,model_ir_attachment_add_url,base.group_user,1,1,1,1 3 | -------------------------------------------------------------------------------- /document_url/static/src/scss/document_url.scss: -------------------------------------------------------------------------------- 1 | .o_image.o_Attachment_url_ico { 2 | background-image: none; 3 | i { 4 | display: block; 5 | text-align: center; 6 | line-height: revert; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /document_url/wizard/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) 2 | # Copyright 2014 Tecnativa - Pedro M. Baeza 3 | # Copyright 2016 ACSONE SA/NV () 4 | from . import document_url 5 | -------------------------------------------------------------------------------- /attachment_zipped_download/readme/DESCRIPTION.md: -------------------------------------------------------------------------------- 1 | This module allows downloading multiple attachments as a zip file. 2 | 3 | This also provide a helper class IrAttachmentActionDownloadMixin to be 4 | used by developer to add action method on models. 5 | -------------------------------------------------------------------------------- /attachment_zipped_download/readme/CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | - César Fernández Domínguez \<\> 2 | - [Tecnativa](https://www.tecnativa.com): 3 | - Víctor Martínez 4 | - Pedro M. Baeza 5 | - Pierre Verkest \<\> 6 | -------------------------------------------------------------------------------- /document_url/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) 2 | # Copyright 2014 Tecnativa - Pedro M. Baeza 3 | # Copyright 2016 ACSONE SA/NV () 4 | from . import models 5 | from . import wizard 6 | -------------------------------------------------------------------------------- /document_page_approval/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2013 Savoir-faire Linux (). 2 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 3 | 4 | from . import models 5 | from .hooks import post_init_hook, uninstall_hook 6 | -------------------------------------------------------------------------------- /document_page_reference/readme/USAGE.md: -------------------------------------------------------------------------------- 1 | When editing a document page add elements like {{XXX}} where XXX is the 2 | reference of another page. Now, when viewing the document, it will link 3 | directly to the page. Also, the name will be parsed as the display name. 4 | -------------------------------------------------------------------------------- /document_page_group/readme/CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | - Enric Tobella \<\> 2 | - \[APSL-Nagarro\](): 3 | - Antoni Marroig \<\> 4 | - [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io) 5 | - Bhavesh Heliconia 6 | -------------------------------------------------------------------------------- /document_page/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 2 | 3 | from . import test_document_page 4 | from . import test_document_page_create_menu 5 | from . import test_document_page_history 6 | from . import test_document_page_show_diff 7 | -------------------------------------------------------------------------------- /document_knowledge/readme/USAGE.md: -------------------------------------------------------------------------------- 1 | This module adds a new top level menu *Knowledge* 2 | 3 | Users with permission *Central access to Documents* can access in 4 | *Knowledge/Documents* to all the documents attached to records of any 5 | model for which they have read permission. 6 | -------------------------------------------------------------------------------- /document_page/static/src/scss/document_page_variables.scss: -------------------------------------------------------------------------------- 1 | $o_document_page_diff_header_background: #e0e0e0; 2 | $o_document_page_diff_next_background: #c0c0c0; 3 | $o_document_page_diff_add_background: #aaffaa; 4 | $o_document_page_diff_change_background: #ffff77; 5 | $o_document_page_diff_subtract_background: #ffaaaa; 6 | -------------------------------------------------------------------------------- /document_page_approval/readme/CONFIGURE.md: -------------------------------------------------------------------------------- 1 | To configure this module, you need to: 2 | 3 | 1. Set a valid email address on the company settings. 4 | 2. Go to Knowledge \> Categories. 5 | 3. Create a new page category and set an approver group. Make sure 6 | users belonging to that group have valid email addresses. 7 | -------------------------------------------------------------------------------- /document_knowledge/data/res_users.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /document_knowledge/demo/document_knowledge.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /document_url/readme/CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | - Jonathan Nemry \<\> 2 | - [Tecnativa](https://www.tecnativa.com): 3 | - Pedro M. Baeza 4 | - Ernesto Tejeda 5 | - Manuel Calero 6 | - Víctor Martínez 7 | - Matias Peralta - Adhoc SA 8 | - [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io) 9 | - Bhavesh Heliconia 10 | -------------------------------------------------------------------------------- /document_page_access_group_user_role/readme/USAGE.md: -------------------------------------------------------------------------------- 1 | 1. Go to Settings / Users & Companies / Roles and create a new one. 2 | 2. Go to Knowledge / Pages and create or edit one. 3 | 3. Set in the "Roles" tab the one we have just created. 4 | 4. Go back to the role, edit it and add any group(s). 5 | 5. The role users will have been added in the "Security" tab. 6 | -------------------------------------------------------------------------------- /document_page_tag/models/document_page.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015-2018 Therp BV 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 3 | from odoo import fields, models 4 | 5 | 6 | class DocumentPage(models.Model): 7 | _inherit = "document.page" 8 | 9 | tag_ids = fields.Many2many("document.page.tag", string="Keywords") 10 | -------------------------------------------------------------------------------- /document_page_partner/models/document_page.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015-24 Therp BV 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 3 | from odoo import fields, models 4 | 5 | 6 | class DocumentPage(models.Model): 7 | _inherit = "document.page" 8 | 9 | partner_id = fields.Many2one("res.partner", "Partner", index=True) 10 | -------------------------------------------------------------------------------- /document_page_access_group/readme/CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | - Manuel Regidor \<\> 2 | - Alberto Martínez \<\> 3 | * `Tecnativa `_: 4 | 5 | * Víctor Martínez 6 | - [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io) 7 | - Bhavesh Heliconia 8 | 9 | - [Dixmit](https://www.dixmit.com): 10 | - Enric Tobella 11 | -------------------------------------------------------------------------------- /document_page_project/models/document_page.py: -------------------------------------------------------------------------------- 1 | # Copyright 2019 ForgeFlow S.L. (https://www.forgeflow.com) 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 3 | 4 | from odoo import fields, models 5 | 6 | 7 | class DocumentPage(models.Model): 8 | _inherit = "document.page" 9 | 10 | project_id = fields.Many2one(string="Project", comodel_name="project.project") 11 | -------------------------------------------------------------------------------- /document_page_tag/readme/CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | - Holger Brunn \<\> 2 | - Marcel Savegnago \<\> 3 | - Manuel Regidor \<\> 4 | - Angel Garcia de la Chica Herrera \<\> 5 | - Alberto Martínez Rodríguez \<\> 6 | - [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io) 7 | - Bhavesh Heliconia 8 | -------------------------------------------------------------------------------- /attachment_zipped_download/tests/models/res_partner.py: -------------------------------------------------------------------------------- 1 | # Copyright 2023 Foodles (https://www.foodles.com/) 2 | # @author Pierre Verkest 3 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). 4 | from odoo import models 5 | 6 | 7 | class ResPartner(models.Model): 8 | _name = "res.partner" 9 | _inherit = ["res.partner", "ir.attachment.action_download"] 10 | -------------------------------------------------------------------------------- /document_page_access_group/readme/USAGE.md: -------------------------------------------------------------------------------- 1 | To select the users that have access to a given document page 2 | you need to open a document, go to the 'Security' tab and you have 3 options: 3 | - Select a group: Only users with those groups will be able to see the page. 4 | - Select any user: Only the selected users will be able to see the page. 5 | - Do not select group or user: All users will be able to see the page. 6 | -------------------------------------------------------------------------------- /document_page_approval/readme/USAGE.md: -------------------------------------------------------------------------------- 1 | To use this module, you need to: 2 | 3 | 1. Go to Knowledge \> Pages 4 | 2. Create a new page and choose the previously created category. 5 | 3. A notification is sent to the approvers group with a link to the 6 | page history to review. 7 | 4. Depending on the review, the page history is approved or not. 8 | 5. Users reading the page see the last approved version. 9 | -------------------------------------------------------------------------------- /document_url/readme/USAGE.md: -------------------------------------------------------------------------------- 1 | To use this module, you need to: 2 | 3 | 1. Open the form view of an object (Example: Customer Invoice 4 | INV/2019/0007). 5 | 2. Go to the chatter and click on the attached icon. 6 | 3. Click **Add URL** link. 7 | 4. Fill the wizard fields and click on Add button. 8 | 5. You will see a new **URL attachment** in the set of attachments 9 | related to the object. 10 | -------------------------------------------------------------------------------- /document_knowledge/models/ir_attachment.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2004-2009 Tiny SPRL (). 2 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 3 | 4 | from odoo import fields, models 5 | 6 | 7 | class IrAttachment(models.Model): 8 | _inherit = "ir.attachment" 9 | 10 | # Add index to res_model because filtering on it is a common use case 11 | res_model = fields.Char(index=True) 12 | -------------------------------------------------------------------------------- /document_knowledge/data/ir_module_category.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Documents Knowledge 5 | Manage documents and knowledge-related 6 | applications 7 | 8 | 30 9 | 10 | 11 | -------------------------------------------------------------------------------- /prettier.config.cjs: -------------------------------------------------------------------------------- 1 | /** @type {import('prettier').Config} */ 2 | 3 | const config = { 4 | // https://github.com/prettier/prettier/issues/15388#issuecomment-1717746872 5 | plugins: [require.resolve("@prettier/plugin-xml")], 6 | bracketSpacing: false, 7 | printWidth: 88, 8 | proseWrap: "always", 9 | semi: true, 10 | trailingComma: "es5", 11 | xmlWhitespaceSensitivity: "preserve", 12 | }; 13 | 14 | module.exports = config; 15 | -------------------------------------------------------------------------------- /document_page_tag/security/ir.model.access.csv: -------------------------------------------------------------------------------- 1 | id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink 2 | document_page_user,document.page user,model_document_page_tag,document_knowledge.group_document_user,1,0,0,0 3 | document_page_editor,document.page editor,model_document_page_tag,document_page.group_document_editor,1,1,1,0 4 | document_page_manager,document.page manager,model_document_page_tag,document_page.group_document_manager,1,1,1,1 5 | -------------------------------------------------------------------------------- /document_page/readme/USAGE.md: -------------------------------------------------------------------------------- 1 | To use this module, you need to: 2 | 3 | - Go to Knowledge menu 4 | - Click on Categories to create the document's category you need with 5 | the template 6 | - Click on Pages to create pages and select the previous category to use 7 | the template 8 | 9 | ## Improve diff of history 10 | 11 | If you want to improve how history is shown, you can install html_diff python library. 12 | A new comparison method will be installed. 13 | -------------------------------------------------------------------------------- /document_page_reference/migrations/18.0.1.1.0/post-migration.py: -------------------------------------------------------------------------------- 1 | # Copyright 2025 Tecnativa - Víctor Martínez 2 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). 3 | 4 | import re 5 | 6 | from openupgradelib import openupgrade 7 | 8 | 9 | @openupgrade.migrate() 10 | def migrate(env, version): 11 | for item in env["document.page"].search([("content", "ilike", "${")]): 12 | item.content = re.sub(r"\${(.+)}", r"{{\1}}", item.content) 13 | -------------------------------------------------------------------------------- /document_page/static/src/js/document_page_kanban_view.esm.js: -------------------------------------------------------------------------------- 1 | import {DocumentPageKanbanController} from "./document_page_kanban_controller.esm"; 2 | import {kanbanView} from "@web/views/kanban/kanban_view"; 3 | import {registry} from "@web/core/registry"; 4 | 5 | export const documentPageKanbanView = { 6 | ...kanbanView, 7 | Controller: DocumentPageKanbanController, 8 | }; 9 | 10 | registry.category("views").add("document_page_kanban_view", documentPageKanbanView); 11 | -------------------------------------------------------------------------------- /document_url/models/ir_attachment.py: -------------------------------------------------------------------------------- 1 | # Copyright 2021 Tecnativa - Víctor Martínez 2 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 3 | 4 | from odoo import models 5 | 6 | 7 | class IrAttachment(models.Model): 8 | _inherit = "ir.attachment" 9 | 10 | def _compute_mimetype(self, values): 11 | if values.get("url") and values.get("type", "url") == "url": 12 | return "application/link" 13 | return super()._compute_mimetype(values) 14 | -------------------------------------------------------------------------------- /document_knowledge/models/res_config.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2004-2009 Tiny SPRL (). 2 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 3 | 4 | from odoo import fields, models 5 | 6 | 7 | class DocumentKnowledgeConfigSettings(models.TransientModel): 8 | _inherit = "res.config.settings" 9 | 10 | group_ir_attachment_user = fields.Boolean( 11 | string="Central access to Documents", 12 | implied_group="document_knowledge.group_ir_attachment_user", 13 | ) 14 | -------------------------------------------------------------------------------- /attachment_zipped_download/__manifest__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2022 Tecnativa - Víctor Martínez 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). 3 | { 4 | "name": "Attachment Zipped Download", 5 | "version": "18.0.1.0.0", 6 | "category": "Tools", 7 | "website": "https://github.com/OCA/knowledge", 8 | "author": "Tecnativa, Odoo Community Association (OCA)", 9 | "license": "AGPL-3", 10 | "depends": ["base"], 11 | "data": [ 12 | "views/ir_attachment_view.xml", 13 | ], 14 | "installable": True, 15 | } 16 | -------------------------------------------------------------------------------- /document_page_group/__manifest__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2019 Creu Blanca 2 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 3 | 4 | { 5 | "name": "Document Page Group", 6 | "summary": """ 7 | Define access groups on documents""", 8 | "version": "18.0.1.0.0", 9 | "license": "AGPL-3", 10 | "author": "Creu Blanca,Odoo Community Association (OCA)", 11 | "website": "https://github.com/OCA/knowledge", 12 | "depends": ["document_page"], 13 | "data": ["security/document_page_security.xml", "views/document_page.xml"], 14 | } 15 | -------------------------------------------------------------------------------- /document_page_reference/views/report_document_page.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | 15 | -------------------------------------------------------------------------------- /attachment_zipped_download/views/ir_attachment_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Download 5 | 6 | 7 | code 8 | 9 | if records: 10 | action = records.action_attachments_download() 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # Configuration for known file extensions 2 | [*.{css,js,json,less,md,py,rst,sass,scss,xml,yaml,yml}] 3 | charset = utf-8 4 | end_of_line = lf 5 | indent_size = 4 6 | indent_style = space 7 | insert_final_newline = true 8 | trim_trailing_whitespace = true 9 | 10 | [*.{json,yml,yaml,rst,md}] 11 | indent_size = 2 12 | 13 | # Do not configure editor for libs and autogenerated content 14 | [{*/static/{lib,src/lib}/**,*/static/description/index.html,*/readme/../README.rst}] 15 | charset = unset 16 | end_of_line = unset 17 | indent_size = unset 18 | indent_style = unset 19 | insert_final_newline = false 20 | trim_trailing_whitespace = false 21 | -------------------------------------------------------------------------------- /document_page/readme/CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | - Gervais Naoussi \<\> 2 | - Maxime Chambreuil \<\> 3 | - Iván Todorovich \<\> 4 | - Jose Maria Alzaga \<\> 5 | - Lois Rilo \<\> 6 | - Simone Orsi \<\> 7 | - [Tecnativa](https://www.tecnativa.com): 8 | - Ernesto Tejeda 9 | - Víctor Martínez 10 | 11 | - Trobz 12 | - Dung Tran \<\> 13 | 14 | - [Sygel](https://www.sygel.es): 15 | - Ángel García de la Chica Herrera 16 | 17 | - [Dixmit](https://www.dixmit.com): 18 | - Enric Tobella 19 | -------------------------------------------------------------------------------- /document_page_approval/readme/CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | - Odoo SA \<\> 2 | 3 | - Savoir-faire Linux \<\> 4 | 5 | - Gervais Naoussi \<\> 6 | 7 | - Maxime Chambreuil \<\> 8 | 9 | - Iván Todorovich \<\> 10 | 11 | - [Tecnativa](https://www.tecnativa.com): 12 | 13 | > - Victor M.M. Torres 14 | > - Víctor Martínez 15 | 16 | - [Guadaltech](https://www.guadaltech.es): 17 | 18 | - Fernando La Chica \<\> 19 | - [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io) 20 | - Bhavesh Heliconia 21 | -------------------------------------------------------------------------------- /document_page_access_group_user_role/__manifest__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2024 Tecnativa - Víctor Martínez 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). 3 | { 4 | "name": "Document Page Access Group User Role", 5 | "author": "Tecnativa, Odoo Community Association (OCA)", 6 | "website": "https://github.com/OCA/knowledge", 7 | "version": "18.0.1.0.0", 8 | "depends": ["document_page_access_group", "base_user_role"], 9 | "license": "AGPL-3", 10 | "category": "Knowledge", 11 | "data": [ 12 | "views/document_page_views.xml", 13 | ], 14 | "installable": True, 15 | "maintainers": ["victoralmau"], 16 | } 17 | -------------------------------------------------------------------------------- /document_page_partner/__manifest__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015-24 Therp BV 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 3 | { 4 | "name": "Link to a partner in document pages", 5 | "version": "18.0.1.0.0", 6 | "website": "https://github.com/OCA/knowledge", 7 | "author": "Therp BV,Odoo Community Association (OCA)", 8 | "license": "AGPL-3", 9 | "category": "Knowledge Management", 10 | "summary": "Allows to link doucment pages to a partner", 11 | "depends": [ 12 | "document_page", 13 | ], 14 | "data": [ 15 | "views/document_page.xml", 16 | ], 17 | "installable": True, 18 | } 19 | -------------------------------------------------------------------------------- /document_knowledge/readme/CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | - Odoo SA \<\> 2 | - Savoir-faire Linux \<\> 3 | - Gervais Naoussi \<\> 4 | - Leonardo Donelli \<\> 5 | - Maxime Chambreuil \<\> 6 | - Fayez Qandeel 7 | - Iván Todorovich \<\> 8 | - Jordi Ballester \<\> 9 | - Marie Lejeune \<\> 10 | - [Tecnativa](https://www.tecnativa.com): 11 | - Vicent Cubells 12 | - Ernesto Tejeda 13 | 14 | Trobz 15 | 16 | - Dung Tran \<\> 17 | - Khoi (Kien Kim) 18 | -------------------------------------------------------------------------------- /document_page_project/models/project_project.py: -------------------------------------------------------------------------------- 1 | # Copyright 2019 ForgeFlow S.L. (https://www.forgeflow.com) 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 3 | 4 | from odoo import fields, models 5 | 6 | 7 | class ProjectProject(models.Model): 8 | _inherit = "project.project" 9 | 10 | document_page_ids = fields.One2many( 11 | string="Wiki", comodel_name="document.page", inverse_name="project_id" 12 | ) 13 | document_page_count = fields.Integer(compute="_compute_document_page_count") 14 | 15 | def _compute_document_page_count(self): 16 | for rec in self: 17 | rec.document_page_count = len(rec.document_page_ids) 18 | -------------------------------------------------------------------------------- /document_page_group/security/document_page_security.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | document_page groups 5 | 6 | 7 | ['|','&',('type', '=', 'content'),'|','|',('parent_id', '=', False), ('parent_id.group_ids','=',False),('parent_id.group_ids.users','=',user.id), '&', ('type', '=', 'category'), '|', ('group_ids', '=', False), ('group_ids.users', '=', user.id)] 10 | 11 | 12 | -------------------------------------------------------------------------------- /document_page/static/src/js/document_page_kanban_controller.esm.js: -------------------------------------------------------------------------------- 1 | import {KanbanController} from "@web/views/kanban/kanban_controller"; 2 | 3 | export class DocumentPageKanbanController extends KanbanController { 4 | /** 5 | * @param {Object} record 6 | */ 7 | async openRecord(record) { 8 | // eslint-disable-next-line no-undef 9 | const element = document.querySelector( 10 | `.o_kanban_record[data-id="${record.id}"] .o_document_page_kanban_boxes a` 11 | ); 12 | 13 | if (this.props.resModel === "document.page" && element) { 14 | element.click(); 15 | } else { 16 | await super.openRecord(record); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /document_page_project/__manifest__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2019 ForgeFlow S.L. (https://www.forgeflow.com) - Lois Rilo 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 3 | 4 | { 5 | "name": "Document Page Project", 6 | "summary": "This module links document pages to projects", 7 | "version": "18.0.1.0.0", 8 | "category": "Project", 9 | "author": "ForgeFlow, Odoo Community Association (OCA)", 10 | "website": "https://github.com/OCA/knowledge", 11 | "license": "AGPL-3", 12 | "depends": ["project", "document_page"], 13 | "maintainers": ["LoisRForgeFlow"], 14 | "data": ["views/document_page_views.xml", "views/project_project_views.xml"], 15 | "installable": True, 16 | } 17 | -------------------------------------------------------------------------------- /document_page_group/views/document_page.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | document.page.form (in document_page_group) 7 | document.page 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /document_page_access_group/__manifest__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2022 Manuel Regidor 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). 3 | 4 | { 5 | "name": "Document Page Access Group", 6 | "summary": "Choose groups to access document pages", 7 | "version": "18.0.1.0.1", 8 | "category": "document_knowledge", 9 | "website": "https://github.com/OCA/knowledge", 10 | "author": "Sygel, Creu Blanca, Odoo Community Association (OCA)", 11 | "license": "AGPL-3", 12 | "application": False, 13 | "installable": True, 14 | "depends": [ 15 | "document_page", 16 | "document_knowledge", 17 | ], 18 | "data": ["views/document_page.xml", "security/security.xml"], 19 | } 20 | -------------------------------------------------------------------------------- /document_page_tag/__manifest__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015-2018 Therp BV 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 3 | { 4 | "name": "Document Page Tag", 5 | "version": "18.0.1.0.0", 6 | "author": "Therp BV,Odoo Community Association (OCA)", 7 | "website": "https://github.com/OCA/knowledge", 8 | "license": "AGPL-3", 9 | "category": "Knowledge Management", 10 | "summary": "Allows you to assign tags or keywords to pages and search for " 11 | "them afterwards", 12 | "depends": ["document_page"], 13 | "data": [ 14 | "views/document_page_tag.xml", 15 | "views/document_page.xml", 16 | "security/ir.model.access.csv", 17 | ], 18 | "installable": True, 19 | } 20 | -------------------------------------------------------------------------------- /document_knowledge/security/document_knowledge_security.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Document Knowledge user 5 | 6 | 7 | 8 | 9 | 10 | Central access to Documents 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.ruff.toml: -------------------------------------------------------------------------------- 1 | 2 | target-version = "py310" 3 | fix = true 4 | 5 | [lint] 6 | extend-select = [ 7 | "B", 8 | "C90", 9 | "E501", # line too long (default 88) 10 | "I", # isort 11 | "UP", # pyupgrade 12 | ] 13 | extend-safe-fixes = ["UP008"] 14 | exclude = ["setup/*"] 15 | 16 | [format] 17 | exclude = ["setup/*"] 18 | 19 | [lint.per-file-ignores] 20 | "__init__.py" = ["F401", "I001"] # ignore unused and unsorted imports in __init__.py 21 | "__manifest__.py" = ["B018"] # useless expression 22 | 23 | [lint.isort] 24 | section-order = ["future", "standard-library", "third-party", "odoo", "odoo-addons", "first-party", "local-folder"] 25 | 26 | [lint.isort.sections] 27 | "odoo" = ["odoo"] 28 | "odoo-addons" = ["odoo.addons"] 29 | 30 | [lint.mccabe] 31 | max-complexity = 16 32 | -------------------------------------------------------------------------------- /document_page_reference/__manifest__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2019 Creu Blanca 2 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 3 | 4 | { 5 | "name": "Document Page Reference", 6 | "summary": """ 7 | Include references on document pages""", 8 | "version": "18.0.2.1.0", 9 | "license": "AGPL-3", 10 | "author": "Creu Blanca,Odoo Community Association (OCA)", 11 | "website": "https://github.com/OCA/knowledge", 12 | "depends": ["document_page"], 13 | "data": [ 14 | "views/document_page.xml", 15 | "views/report_document_page.xml", 16 | ], 17 | "assets": { 18 | "web.assets_backend": [ 19 | "document_page_reference/static/src/js/editor.esm.js", 20 | ], 21 | }, 22 | "maintainers": ["etobella"], 23 | } 24 | -------------------------------------------------------------------------------- /document_url/__manifest__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2014 Tecnativa - Pedro M. Baeza 2 | # Copyright 2020 Tecnativa - Manuel Calero 3 | { 4 | "name": "URL attachment", 5 | "version": "18.0.1.0.0", 6 | "category": "Tools", 7 | "author": "Tecnativa, Odoo Community Association (OCA)", 8 | "website": "https://github.com/OCA/knowledge", 9 | "license": "AGPL-3", 10 | "depends": ["mail"], 11 | "data": [ 12 | "security/ir.model.access.csv", 13 | "view/document_url_view.xml", 14 | ], 15 | "assets": { 16 | "web.assets_backend": [ 17 | "document_url/static/src/js/url.esm.js", 18 | "document_url/static/src/xml/url.xml", 19 | "document_url/static/src/scss/document_url.scss", 20 | ], 21 | }, 22 | "installable": True, 23 | } 24 | -------------------------------------------------------------------------------- /document_page_partner/i18n/document_page_partner.pot: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_partner 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 18.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "Last-Translator: \n" 10 | "Language-Team: \n" 11 | "MIME-Version: 1.0\n" 12 | "Content-Type: text/plain; charset=UTF-8\n" 13 | "Content-Transfer-Encoding: \n" 14 | "Plural-Forms: \n" 15 | 16 | #. module: document_page_partner 17 | #: model:ir.model,name:document_page_partner.model_document_page 18 | msgid "Document Page" 19 | msgstr "" 20 | 21 | #. module: document_page_partner 22 | #: model:ir.model.fields,field_description:document_page_partner.field_document_page__partner_id 23 | #: model_terms:ir.ui.view,arch_db:document_page_partner.view_wiki_filter 24 | msgid "Partner" 25 | msgstr "" 26 | -------------------------------------------------------------------------------- /document_knowledge/__manifest__.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2004-2009 Tiny SPRL (). 2 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 3 | { 4 | "name": "Documents Knowledge", 5 | "version": "18.0.1.0.2", 6 | "author": "OpenERP SA," 7 | "MONK Software, " 8 | "Tecnativa, " 9 | "ForgeFlow, " 10 | "Odoo Community Association (OCA)", 11 | "category": "Knowledge", 12 | "license": "AGPL-3", 13 | "website": "https://github.com/OCA/knowledge", 14 | "depends": ["base"], 15 | "data": [ 16 | "data/ir_module_category.xml", 17 | "security/document_knowledge_security.xml", 18 | "data/res_users.xml", 19 | "views/document_knowledge.xml", 20 | "views/res_config.xml", 21 | ], 22 | "demo": ["demo/document_knowledge.xml"], 23 | "installable": True, 24 | "application": True, 25 | } 26 | -------------------------------------------------------------------------------- /document_page/tests/test_document_page_history.py: -------------------------------------------------------------------------------- 1 | from odoo.tests import common 2 | 3 | 4 | class TestDocumentPageHistory(common.TransactionCase): 5 | """document_page_history test class.""" 6 | 7 | def test_page_history_demo_page1(self): 8 | """Test page history demo page1.""" 9 | page = self.env["document.page"].create( 10 | { 11 | "name": "Test Page", 12 | "content": "
Initial content
", 13 | } 14 | ) 15 | page.content = "
Test content updated
" 16 | history_document = self.env["document.page.history"] 17 | history_pages = history_document.search([("page_id", "=", page.id)]) 18 | active_ids = [i.id for i in history_pages] 19 | result = history_document._get_diff(active_ids[0], active_ids[0]) 20 | self.assertEqual(result, page.content) 21 | -------------------------------------------------------------------------------- /document_page_access_group_user_role/models/document_page.py: -------------------------------------------------------------------------------- 1 | # Copyright 2024 Tecnativa - Víctor Martínez 2 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 3 | 4 | from odoo import api, fields, models 5 | 6 | 7 | class DocumentPage(models.Model): 8 | _inherit = "document.page" 9 | 10 | user_ids = fields.Many2many(compute="_compute_user_ids", store=True, readonly=False) 11 | role_ids = fields.Many2many( 12 | comodel_name="res.users.role", 13 | relation="document_page_user_roles_rel", 14 | column1="page_id", 15 | column2="role_id", 16 | string="Roles", 17 | ) 18 | 19 | @api.depends("role_ids", "role_ids.users") 20 | def _compute_user_ids(self): 21 | """compute to auto-set all the users of the related roles.""" 22 | for item in self: 23 | item.user_ids += item.mapped("role_ids.users") 24 | -------------------------------------------------------------------------------- /document_page_partner/i18n/document_page_partner_id.pot: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_partner_id 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 10.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "Last-Translator: <>\n" 10 | "Language-Team: \n" 11 | "MIME-Version: 1.0\n" 12 | "Content-Type: text/plain; charset=UTF-8\n" 13 | "Content-Transfer-Encoding: \n" 14 | "Plural-Forms: \n" 15 | 16 | #. module: document_page_partner_id 17 | #: model:ir.model,name:document_page_partner_id.model_document_page 18 | msgid "Document Page" 19 | msgstr "" 20 | 21 | #. module: document_page_partner_id 22 | #: model:ir.model.fields,field_description:document_page_partner_id.field_document_page_partner_id 23 | #: model:ir.ui.view,arch_db:document_page_partner_id.view_wiki_filter 24 | msgid "Partner" 25 | msgstr "" 26 | 27 | -------------------------------------------------------------------------------- /setup/_metapackage/pyproject.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "odoo-addons-oca-knowledge" 3 | version = "18.0.20251010.0" 4 | dependencies = [ 5 | "odoo-addon-attachment_zipped_download==18.0.*", 6 | "odoo-addon-document_knowledge==18.0.*", 7 | "odoo-addon-document_page==18.0.*", 8 | "odoo-addon-document_page_access_group==18.0.*", 9 | "odoo-addon-document_page_access_group_user_role==18.0.*", 10 | "odoo-addon-document_page_approval==18.0.*", 11 | "odoo-addon-document_page_group==18.0.*", 12 | "odoo-addon-document_page_partner==18.0.*", 13 | "odoo-addon-document_page_project==18.0.*", 14 | "odoo-addon-document_page_reference==18.0.*", 15 | "odoo-addon-document_page_tag==18.0.*", 16 | "odoo-addon-document_url==18.0.*", 17 | ] 18 | classifiers=[ 19 | "Programming Language :: Python", 20 | "Framework :: Odoo", 21 | "Framework :: Odoo :: 18.0", 22 | ] 23 | -------------------------------------------------------------------------------- /document_page_access_group/models/document_page.py: -------------------------------------------------------------------------------- 1 | # Copyright 2022 Manuel Regidor 2 | # Copyright 2024 Tecnativa - Víctor Martínez 3 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). 4 | 5 | from odoo import api, fields, models 6 | from odoo.exceptions import UserError 7 | 8 | 9 | class DocumentPage(models.Model): 10 | _inherit = "document.page" 11 | 12 | groups_id = fields.Many2many(comodel_name="res.groups", string="Groups") 13 | user_ids = fields.Many2many(comodel_name="res.users", string="Users") 14 | 15 | @api.constrains("groups_id", "user_ids") 16 | def check_document_page_groups_users(self): 17 | for _item in self.filtered(lambda x: x.groups_id and x.user_ids): 18 | raise UserError( 19 | self.env._("You cannot set groups and users at the same time.") 20 | ) 21 | return True 22 | -------------------------------------------------------------------------------- /.copier-answers.yml: -------------------------------------------------------------------------------- 1 | # Do NOT update manually; changes here will be overwritten by Copier 2 | _commit: v1.29 3 | _src_path: git+https://github.com/OCA/oca-addons-repo-template 4 | additional_ruff_rules: [] 5 | ci: GitHub 6 | convert_readme_fragments_to_markdown: true 7 | enable_checklog_odoo: true 8 | generate_requirements_txt: true 9 | github_check_license: true 10 | github_ci_extra_env: {} 11 | github_enable_codecov: true 12 | github_enable_makepot: true 13 | github_enable_stale_action: true 14 | github_enforce_dev_status_compatibility: true 15 | include_wkhtmltopdf: false 16 | odoo_test_flavor: Both 17 | odoo_version: 18.0 18 | org_name: Odoo Community Association (OCA) 19 | org_slug: OCA 20 | rebel_module_groups: [] 21 | repo_description: knowledge 22 | repo_name: knowledge 23 | repo_slug: knowledge 24 | repo_website: https://github.com/OCA/knowledge 25 | use_pyproject_toml: true 26 | use_ruff: true 27 | 28 | -------------------------------------------------------------------------------- /document_page_approval/hooks.py: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Ivan Todorovich () 2 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). 3 | import logging 4 | 5 | _logger = logging.getLogger(__name__) 6 | 7 | 8 | def post_init_hook(env): # pragma: no cover 9 | # Set all pre-existing pages history to approved 10 | _logger.info("Setting history to approved.") 11 | env.cr.execute( 12 | """ 13 | UPDATE document_page_history 14 | SET state='approved', 15 | approved_uid=create_uid, 16 | approved_date=create_date 17 | WHERE state IS NULL OR state = 'draft' 18 | """ 19 | ) 20 | 21 | 22 | def uninstall_hook(env): # pragma: no cover 23 | # Remove unapproved pages 24 | _logger.info("Deleting unapproved Change Requests.") 25 | env.cr.execute("DELETE FROM document_page_history WHERE state != 'approved'") 26 | -------------------------------------------------------------------------------- /document_knowledge/readme/CONFIGURE.md: -------------------------------------------------------------------------------- 1 | To set up this module, you need to go to: 2 | 3 | - Knowledge / Configuration / Settings 4 | 5 | From this menu you'll have a central access to install the apps that 6 | belong to Knowledge. 7 | 8 | - Check *Attachments List and Document Indexation* if you want to 9 | install the module that allows users to attach documents to any model. 10 | - Check *Manage attachments centrally* if you want all users to be able 11 | to access to the all attachments to which they have read permissions, 12 | from the menu *Knowledge / Documents* 13 | 14 | If you want to grant Central Access to Documents only to some users: 15 | 16 | 1. Go to *Settings/Activate the developer mode*. Only a user with 17 | *Administration / Settings* permissions can do that. 18 | 2. Go to *Settings / Users & Companies / Users* and set the checkbox 19 | *Central access to Documents* to the selected users. 20 | -------------------------------------------------------------------------------- /document_page_approval/__manifest__.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2013 Savoir-faire Linux (). 2 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 3 | 4 | { 5 | "name": "Document Page Approval", 6 | "version": "18.0.1.1.0", 7 | "author": "Savoir-faire Linux, Odoo Community Association (OCA)", 8 | "website": "https://github.com/OCA/knowledge", 9 | "license": "AGPL-3", 10 | "category": "Knowledge Management", 11 | "depends": ["document_page", "mail"], 12 | "data": [ 13 | "data/email_template.xml", 14 | "views/document_page_approval.xml", 15 | "security/document_page_security.xml", 16 | ], 17 | "images": [ 18 | "images/category.png", 19 | "images/page_history_list.png", 20 | "images/page_history.png", 21 | ], 22 | "post_init_hook": "post_init_hook", 23 | "uninstall_hook": "uninstall_hook", 24 | "installable": True, 25 | } 26 | -------------------------------------------------------------------------------- /document_page_tag/tests/test_document_page_tag.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015-2018 Therp BV 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 3 | from psycopg2 import IntegrityError 4 | 5 | from odoo.tests.common import TransactionCase 6 | from odoo.tools.misc import mute_logger 7 | 8 | 9 | class TestDocumentPageTag(TransactionCase): 10 | def test_document_page_tag(self): 11 | testtag = self.env["document.page.tag"].name_create("test") 12 | # check we're charitable on duplicates 13 | self.assertEqual( 14 | testtag, 15 | self.env["document.page.tag"].name_create("Test"), 16 | ) 17 | # check we can't create nonunique tags 18 | with self.assertRaises(IntegrityError): 19 | with mute_logger("odoo.sql_db"): 20 | testtag2 = self.env["document.page.tag"].create({"name": "test2"}) 21 | testtag2.write({"name": "test"}) 22 | testtag2.flush_model() 23 | -------------------------------------------------------------------------------- /attachment_zipped_download/controllers/main.py: -------------------------------------------------------------------------------- 1 | # Copyright 2019 César Fernández Domínguez 2 | # Copyright 2022 Tecnativa - Víctor Martínez 3 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl) 4 | from odoo import _, http 5 | from odoo.http import request 6 | 7 | 8 | class AttachmentZippedDownloadController(http.Controller): 9 | @http.route("/web/attachment/download_zip", type="http", auth="user") 10 | def download_zip(self, ids=None, debug=0): 11 | ids = [] if not ids else ids 12 | if len(ids) == 0: 13 | return 14 | list_ids = map(int, ids.split(",")) 15 | out_file = request.env["ir.attachment"].browse(list_ids)._create_temp_zip() 16 | stream = http.Stream( 17 | type="data", 18 | data=out_file.getvalue(), 19 | mimetype="application/zip", 20 | as_attachment=True, 21 | download_name=_("attachments.zip"), 22 | ) 23 | return stream.get_response() 24 | -------------------------------------------------------------------------------- /document_page_partner/__init__.py: -------------------------------------------------------------------------------- 1 | ############################################################################## 2 | # 3 | # This module copyright (C) 2015 Therp BV . 4 | # 5 | # This program is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as 7 | # published by the Free Software Foundation, either version 3 of the 8 | # License, or (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ############################################################################## 19 | from . import models 20 | -------------------------------------------------------------------------------- /document_page_partner/i18n/it.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_partner 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 16.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "PO-Revision-Date: 2024-04-02 11:04+0000\n" 10 | "Last-Translator: mymage \n" 11 | "Language-Team: none\n" 12 | "Language: it\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: \n" 16 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 17 | "X-Generator: Weblate 4.17\n" 18 | 19 | #. module: document_page_partner 20 | #: model:ir.model,name:document_page_partner.model_document_page 21 | msgid "Document Page" 22 | msgstr "Pagina documento" 23 | 24 | #. module: document_page_partner 25 | #: model:ir.model.fields,field_description:document_page_partner.field_document_page__partner_id 26 | #: model_terms:ir.ui.view,arch_db:document_page_partner.view_wiki_filter 27 | msgid "Partner" 28 | msgstr "Partner" 29 | -------------------------------------------------------------------------------- /document_page_partner/i18n/de.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_partner 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 16.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "PO-Revision-Date: 2025-03-17 14:06+0000\n" 10 | "Last-Translator: davidbeckercbl \n" 11 | "Language-Team: none\n" 12 | "Language: de\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: \n" 16 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 17 | "X-Generator: Weblate 5.10.2\n" 18 | 19 | #. module: document_page_partner 20 | #: model:ir.model,name:document_page_partner.model_document_page 21 | msgid "Document Page" 22 | msgstr "Dokumentenseite" 23 | 24 | #. module: document_page_partner 25 | #: model:ir.model.fields,field_description:document_page_partner.field_document_page__partner_id 26 | #: model_terms:ir.ui.view,arch_db:document_page_partner.view_wiki_filter 27 | msgid "Partner" 28 | msgstr "Parnter" 29 | -------------------------------------------------------------------------------- /document_page_partner/i18n/pt.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_partner 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 16.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "PO-Revision-Date: 2024-07-27 04:58+0000\n" 10 | "Last-Translator: Peter Romão \n" 11 | "Language-Team: none\n" 12 | "Language: pt\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: \n" 16 | "Plural-Forms: nplurals=2; plural=n > 1;\n" 17 | "X-Generator: Weblate 5.6.2\n" 18 | 19 | #. module: document_page_partner 20 | #: model:ir.model,name:document_page_partner.model_document_page 21 | msgid "Document Page" 22 | msgstr "Página do documento" 23 | 24 | #. module: document_page_partner 25 | #: model:ir.model.fields,field_description:document_page_partner.field_document_page__partner_id 26 | #: model_terms:ir.ui.view,arch_db:document_page_partner.view_wiki_filter 27 | msgid "Partner" 28 | msgstr "Parceiro" 29 | -------------------------------------------------------------------------------- /document_page_partner/i18n/es.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_partner 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 16.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "PO-Revision-Date: 2024-05-15 21:34+0000\n" 10 | "Last-Translator: Sergio Ariel Ameghino \n" 11 | "Language-Team: none\n" 12 | "Language: es\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: \n" 16 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 17 | "X-Generator: Weblate 4.17\n" 18 | 19 | #. module: document_page_partner 20 | #: model:ir.model,name:document_page_partner.model_document_page 21 | msgid "Document Page" 22 | msgstr "Página del documento" 23 | 24 | #. module: document_page_partner 25 | #: model:ir.model.fields,field_description:document_page_partner.field_document_page__partner_id 26 | #: model_terms:ir.ui.view,arch_db:document_page_partner.view_wiki_filter 27 | msgid "Partner" 28 | msgstr "Empresa" 29 | -------------------------------------------------------------------------------- /document_page/security/ir.model.access.csv: -------------------------------------------------------------------------------- 1 | id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink 2 | document_page_user,document.page user,model_document_page,document_knowledge.group_document_user,1,0,0,0 3 | document_page_history_user,document.page.history user,model_document_page_history,document_knowledge.group_document_user,1,0,0,0 4 | document_page_editor,document.page editor,model_document_page,group_document_editor,1,1,1,0 5 | document_page_history_editor,document.page.history editor,model_document_page_history,group_document_editor,1,1,1,0 6 | document_page_manager,document.page manager,model_document_page,group_document_manager,1,1,1,1 7 | document_page_history_manager,document.page.history manager,model_document_page_history,group_document_manager,1,1,1,0 8 | document_page_create_menu_wizard,document.page.create.menu wizard,model_document_page_create_menu,document_knowledge.group_document_user,1,1,1,0 9 | document_page_history_show_diff_wizard,document.page.history.show_diff wizard,model_wizard_document_page_history_show_diff,document_knowledge.group_document_user,1,1,1,0 10 | -------------------------------------------------------------------------------- /document_page_tag/models/document_page_tag.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015-2018 Therp BV 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 3 | from odoo import api, fields, models 4 | 5 | 6 | class DocumentPageTag(models.Model): 7 | _name = "document.page.tag" 8 | _description = "A keyword for document pages" 9 | 10 | name = fields.Char(required=True, translate=True) 11 | color = fields.Integer(string="Color Index") 12 | active = fields.Boolean(default=True) 13 | 14 | _sql_constraints = [ 15 | ("unique_name", "unique(name)", "Tags must be unique"), 16 | ] 17 | 18 | @api.model_create_multi 19 | def create(self, vals_list): 20 | """Be nice when trying to create duplicates""" 21 | records = self.env["document.page.tag"] 22 | for vals in vals_list: 23 | existing = self.search([("name", "=ilike", vals.get("name"))], limit=1) 24 | if existing: 25 | records |= existing 26 | else: 27 | records |= super().create([vals]) 28 | return records 29 | -------------------------------------------------------------------------------- /document_page_access_group/tests/test_document_page_access_group.py: -------------------------------------------------------------------------------- 1 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 2 | from odoo import Command 3 | from odoo.exceptions import UserError 4 | from odoo.tests.common import users 5 | 6 | from .common import TestDocumentPageAccessGroupBase 7 | 8 | 9 | class TestDocumentPageAccessGroup(TestDocumentPageAccessGroupBase): 10 | def test_page_access_constrains(self): 11 | with self.assertRaises(UserError): 12 | self.knowledge_page.write({"user_ids": [Command.set([self.user.id])]}) 13 | 14 | @users("test-user") 15 | def test_page_access_01(self): 16 | pages = self.env["document.page"].search([]) 17 | self.assertIn(self.public_page, pages) 18 | self.assertNotIn(self.knowledge_page, pages) 19 | self.assertIn(self.user_page, pages) 20 | 21 | @users("test-manager-user") 22 | def test_page_access_02(self): 23 | pages = self.env["document.page"].search([]) 24 | self.assertIn(self.public_page, pages) 25 | self.assertIn(self.knowledge_page, pages) 26 | self.assertNotIn(self.user_page, pages) 27 | -------------------------------------------------------------------------------- /document_page/static/src/scss/document_page.scss: -------------------------------------------------------------------------------- 1 | .o_document_page_diff { 2 | table.diff { 3 | font-family: Courier; 4 | border: medium; 5 | 6 | .diff_header { 7 | background-color: $o_document_page_diff_header_background; 8 | } 9 | 10 | td.diff_header { 11 | text-align: right; 12 | } 13 | 14 | .diff_next { 15 | background-color: $o_document_page_diff_next_background; 16 | } 17 | 18 | .diff_add { 19 | background-color: $o_document_page_diff_add_background; 20 | } 21 | 22 | .diff_chg { 23 | background-color: $o_document_page_diff_change_background; 24 | } 25 | 26 | .diff_sub { 27 | background-color: $o_document_page_diff_subtract_background; 28 | } 29 | } 30 | removed { 31 | display: inline; 32 | text-decoration: line-through; 33 | opacity: 0.5; 34 | background-color: $o_document_page_diff_subtract_background; 35 | } 36 | added { 37 | display: inline; 38 | background-color: $o_document_page_diff_add_background; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /document_page_access_group_user_role/views/document_page_views.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | document.page.form 5 | document.page 6 | 10 | 11 | 12 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /document_page_group/i18n/document_page_group.pot: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_group 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 18.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "Last-Translator: \n" 10 | "Language-Team: \n" 11 | "MIME-Version: 1.0\n" 12 | "Content-Type: text/plain; charset=UTF-8\n" 13 | "Content-Transfer-Encoding: \n" 14 | "Plural-Forms: \n" 15 | 16 | #. module: document_page_group 17 | #: model:ir.model,name:document_page_group.model_document_page 18 | msgid "Document Page" 19 | msgstr "" 20 | 21 | #. module: document_page_group 22 | #: model:ir.model.fields,field_description:document_page_group.field_document_page__group_ids 23 | msgid "Group" 24 | msgstr "" 25 | 26 | #. module: document_page_group 27 | #: model:ir.model.fields,help:document_page_group.field_document_page__direct_group_ids 28 | msgid "Set the groups that can view this category and its childs" 29 | msgstr "" 30 | 31 | #. module: document_page_group 32 | #: model:ir.model.fields,field_description:document_page_group.field_document_page__direct_group_ids 33 | msgid "Visible to" 34 | msgstr "" 35 | -------------------------------------------------------------------------------- /document_page/wizard/document_page_show_diff.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Show Difference 6 | wizard.document.page.history.show_diff 7 | 8 |
9 | 10 |
11 |
13 | 14 |
15 |
16 | 17 | 18 | Difference 19 | wizard.document.page.history.show_diff 20 | form 21 | new 22 | 26 | 27 |
28 | -------------------------------------------------------------------------------- /document_page/views/report_document_page.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 19 | 20 | 21 | Document Page 22 | document.page 23 | qweb-pdf 24 | document_page.report_documentpage 25 | document_page.report_documentpage 26 | report 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /document_page/models/ir_ui_menu.py: -------------------------------------------------------------------------------- 1 | # Copyright 2024 Alberto Martínez 2 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 3 | 4 | from odoo import models 5 | 6 | 7 | class IrUiMenu(models.Model): 8 | _inherit = "ir.ui.menu" 9 | 10 | def _visible_menu_ids(self, debug=False): 11 | visible_ids = super()._visible_menu_ids(debug) 12 | if self._context.get("ir.ui.menu.authorized_list"): 13 | # Add the authorized by groups menus that does not have an action 14 | menus = ( 15 | self.with_context(**{"ir.ui.menu.full_list": True}).search([]).sudo() 16 | ) 17 | groups = ( 18 | self.env.user.groups_id 19 | if not debug 20 | else self.env.user.groups_id - self.env.ref("base.group_no_one") 21 | ) 22 | authorized_menus = menus.filtered( 23 | lambda m: not m.groups_id or m.groups_id and groups 24 | ) 25 | authorized_folder_menus = authorized_menus.filtered(lambda m: not m.action) 26 | visible_ids = visible_ids.union(authorized_folder_menus.ids) 27 | return visible_ids 28 | -------------------------------------------------------------------------------- /document_page_group/models/document_page.py: -------------------------------------------------------------------------------- 1 | # Copyright 2019 Creu Blanca 2 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 3 | 4 | from odoo import api, fields, models 5 | 6 | 7 | class DocumentPage(models.Model): 8 | _inherit = "document.page" 9 | 10 | group_ids = fields.Many2many( 11 | "res.groups", 12 | store=True, 13 | recursive=True, 14 | relation="document_page_direct_group", 15 | column1="document_page_id", 16 | column2="group_id", 17 | compute="_compute_group_ids", 18 | ) 19 | direct_group_ids = fields.Many2many( 20 | "res.groups", 21 | string="Visible to", 22 | help="Set the groups that can view this category and its childs", 23 | relation="document_page_group", 24 | column1="document_page_id", 25 | column2="group_id", 26 | ) 27 | 28 | @api.depends("direct_group_ids", "parent_id", "parent_id.group_ids") 29 | def _compute_group_ids(self): 30 | for record in self: 31 | groups = record.direct_group_ids 32 | if record.parent_id: 33 | groups |= record.parent_id.group_ids 34 | record.group_ids = groups 35 | -------------------------------------------------------------------------------- /document_page_access_group_user_role/i18n/document_page_access_group_user_role.pot: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_access_group_user_role 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 18.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "Last-Translator: \n" 10 | "Language-Team: \n" 11 | "MIME-Version: 1.0\n" 12 | "Content-Type: text/plain; charset=UTF-8\n" 13 | "Content-Transfer-Encoding: \n" 14 | "Plural-Forms: \n" 15 | 16 | #. module: document_page_access_group_user_role 17 | #: model:ir.model,name:document_page_access_group_user_role.model_document_page 18 | msgid "Document Page" 19 | msgstr "" 20 | 21 | #. module: document_page_access_group_user_role 22 | #: model:ir.model.fields,field_description:document_page_access_group_user_role.field_document_page__role_ids 23 | #: model_terms:ir.ui.view,arch_db:document_page_access_group_user_role.document_page_access_group_view_wiki_form 24 | msgid "Roles" 25 | msgstr "" 26 | 27 | #. module: document_page_access_group_user_role 28 | #: model:ir.model.fields,field_description:document_page_access_group_user_role.field_document_page__user_ids 29 | msgid "Users" 30 | msgstr "" 31 | -------------------------------------------------------------------------------- /document_page/wizard/document_page_show_diff.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2004-2010 Tiny SPRL (). 2 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 3 | 4 | from odoo import fields, models 5 | from odoo.exceptions import UserError 6 | 7 | 8 | class DocumentPageShowDiff(models.TransientModel): 9 | """Display Difference for History.""" 10 | 11 | _name = "wizard.document.page.history.show_diff" 12 | _description = "Document Page Show Diff" 13 | 14 | def _get_diff(self): 15 | """Return the Difference between two documents""" 16 | history = self.env["document.page.history"] 17 | ids = self.env.context.get("active_ids", []) 18 | diff = False 19 | if len(ids) == 2: 20 | if ids[0] > ids[1]: 21 | diff = history._get_diff(ids[1], ids[0]) 22 | else: 23 | diff = history._get_diff(ids[0], ids[1]) 24 | elif len(ids) == 1: 25 | diff = history.browse(ids[0]).diff 26 | else: 27 | raise UserError(self.env._("Select one or maximum two history revisions!")) 28 | return diff 29 | 30 | diff = fields.Html(readonly=True, default=_get_diff, sanitize_tags=False) 31 | -------------------------------------------------------------------------------- /document_page_project/tests/test_project_project.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2021 TREVI Software 2 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 3 | 4 | from odoo.tests import common 5 | 6 | 7 | class TestProjectProject(common.TransactionCase): 8 | @classmethod 9 | def setUpClass(cls): 10 | super().setUpClass() 11 | 12 | cls.Page = cls.env["document.page"] 13 | cls.Project = cls.env["project.project"] 14 | cls.default_page = cls.Page.create({"name": "My page"}) 15 | 16 | def test_page_count(self): 17 | proj = self.Project.create({"name": "Proj A"}) 18 | 19 | self.assertEqual( 20 | proj.document_page_count, 0, "Initial page count should be zero" 21 | ) 22 | 23 | self.default_page.project_id = proj 24 | proj._compute_document_page_count() 25 | 26 | self.assertEqual( 27 | proj.document_page_count, 28 | 1, 29 | "After attaching project to document the page count should be one", 30 | ) 31 | self.assertIn( 32 | self.default_page, 33 | proj.document_page_ids, 34 | "The page should be in the list of document pages for project", 35 | ) 36 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | /.venv 5 | /.pytest_cache 6 | /.ruff_cache 7 | 8 | # C extensions 9 | *.so 10 | 11 | # Distribution / packaging 12 | .Python 13 | env/ 14 | bin/ 15 | build/ 16 | develop-eggs/ 17 | dist/ 18 | eggs/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | *.eggs 27 | 28 | # Windows installers 29 | *.msi 30 | 31 | # Debian packages 32 | *.deb 33 | 34 | # Redhat packages 35 | *.rpm 36 | 37 | # MacOS packages 38 | *.dmg 39 | *.pkg 40 | 41 | # Installer logs 42 | pip-log.txt 43 | pip-delete-this-directory.txt 44 | 45 | # Unit test / coverage reports 46 | htmlcov/ 47 | .tox/ 48 | .coverage 49 | .cache 50 | nosetests.xml 51 | coverage.xml 52 | 53 | # Translations 54 | *.mo 55 | 56 | # Pycharm 57 | .idea 58 | 59 | # Eclipse 60 | .settings 61 | 62 | # Visual Studio cache/options directory 63 | .vs/ 64 | .vscode 65 | 66 | # OSX Files 67 | .DS_Store 68 | 69 | # Django stuff: 70 | *.log 71 | 72 | # Mr Developer 73 | .mr.developer.cfg 74 | .project 75 | .pydevproject 76 | 77 | # Rope 78 | .ropeproject 79 | 80 | # Sphinx documentation 81 | docs/_build/ 82 | 83 | # Backup files 84 | *~ 85 | *.swp 86 | 87 | # OCA rules 88 | !static/lib/ 89 | -------------------------------------------------------------------------------- /document_page_reference/static/src/js/editor.esm.js: -------------------------------------------------------------------------------- 1 | import {HtmlField, htmlField} from "@web/views/fields/html/html_field"; 2 | import {onMounted} from "@odoo/owl"; 3 | import {registry} from "@web/core/registry"; 4 | import {useService} from "@web/core/utils/hooks"; 5 | 6 | class DocumentPageReferenceField extends HtmlField { 7 | setup() { 8 | super.setup(); 9 | this.orm = useService("orm"); 10 | this.action = useService("action"); 11 | onMounted(() => { 12 | // eslint-disable-next-line no-undef 13 | const links = document.querySelectorAll(".oe_direct_line"); 14 | links.forEach((link) => { 15 | link.addEventListener("click", (event) => 16 | this._onClickDirectLink(event) 17 | ); 18 | }); 19 | }); 20 | } 21 | _onClickDirectLink(event) { 22 | const {oeModel: model, oeId} = event.target.dataset; 23 | const id = parseInt(oeId, 10); 24 | this.orm.call(model, "get_formview_action", [[id]], {}).then((action) => { 25 | this.action.doAction(action); 26 | }); 27 | } 28 | } 29 | registry.category("fields").add("document_page_reference", { 30 | ...htmlField, 31 | component: DocumentPageReferenceField, 32 | }); 33 | -------------------------------------------------------------------------------- /document_page_access_group/security/security.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | Document Page Access 7 | 8 | 9 | 13 | ['|', ('groups_id', 'in', [g.id for g in user.groups_id]), '|', ('user_ids', 'in', [user.id]), '&', ('groups_id', '=', False), ('user_ids', '=', False)] 16 | 17 | 18 | Document Page Full Access 19 | 20 | 21 | 25 | [(1, '=', 1)] 26 | 27 | 28 | -------------------------------------------------------------------------------- /document_page_access_group_user_role/i18n/es.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_access_group_user_role 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 16.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "POT-Creation-Date: 2024-05-31 10:50+0000\n" 10 | "PO-Revision-Date: 2024-05-31 12:51+0200\n" 11 | "Last-Translator: \n" 12 | "Language-Team: \n" 13 | "Language: es\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: \n" 18 | "X-Generator: Poedit 3.0.1\n" 19 | 20 | #. module: document_page_access_group_user_role 21 | #: model:ir.model,name:document_page_access_group_user_role.model_document_page 22 | msgid "Document Page" 23 | msgstr "Página del documento" 24 | 25 | #. module: document_page_access_group_user_role 26 | #: model:ir.model.fields,field_description:document_page_access_group_user_role.field_document_page__role_ids 27 | #: model_terms:ir.ui.view,arch_db:document_page_access_group_user_role.document_page_access_group_view_wiki_form 28 | msgid "Roles" 29 | msgstr "Roles" 30 | 31 | #. module: document_page_access_group_user_role 32 | #: model:ir.model.fields,field_description:document_page_access_group_user_role.field_document_page__user_ids 33 | msgid "Users" 34 | msgstr "" 35 | -------------------------------------------------------------------------------- /document_url/view/document_url_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Add URL 5 | ir.attachment.add_url 6 | ir.actions.act_window 7 | new 8 | form 9 | 10 | 11 | 12 | ir.attachment.add_url.form 13 | ir.attachment.add_url 14 | 15 |
16 | 17 | 18 | 19 | 20 |
21 |
29 |
30 |
31 |
32 |
33 | -------------------------------------------------------------------------------- /document_page_access_group/views/document_page.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | document.page.access.group.view.wiki.form 8 | document.page 9 | 10 | 11 | 12 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /document_url/wizard/document_url.py: -------------------------------------------------------------------------------- 1 | # Copyright 2014 Tecnativa - Pedro M. Baeza 2 | # Copyright 2020 Tecnativa - Manuel Calero 3 | # Copyright 2016 ACSONE SA/NV () 4 | from urllib import parse 5 | 6 | from odoo import fields, models 7 | 8 | 9 | class AddUrlWizard(models.TransientModel): 10 | _name = "ir.attachment.add_url" 11 | _description = "Wizard to add URL attachment" 12 | 13 | name = fields.Char(required=True) 14 | url = fields.Char("URL", required=True) 15 | 16 | def action_add_url(self): 17 | """Adds the URL with the given name as an ir.attachment record.""" 18 | if not self.env.context.get("active_model"): 19 | return 20 | attachment_obj = self.env["ir.attachment"] 21 | for form in self: 22 | url = parse.urlparse(form.url) 23 | if not url.scheme: 24 | url = parse.urlparse("{}{}".format("http://", form.url)) 25 | for active_id in self.env.context.get("active_ids", []): 26 | attachment = { 27 | "name": form.name, 28 | "type": "url", 29 | "url": url.geturl(), 30 | "res_id": active_id, 31 | "res_model": self.env.context["active_model"], 32 | } 33 | attachment_obj.create(attachment) 34 | return {"type": "ir.actions.act_window_close"} 35 | -------------------------------------------------------------------------------- /document_page_group/i18n/es.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_group 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 11.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "PO-Revision-Date: 2020-01-15 16:23+0000\n" 10 | "Last-Translator: Enric Tobella \n" 11 | "Language-Team: none\n" 12 | "Language: es\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: \n" 16 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 17 | "X-Generator: Weblate 3.10\n" 18 | 19 | #. module: document_page_group 20 | #: model:ir.model,name:document_page_group.model_document_page 21 | msgid "Document Page" 22 | msgstr "Página del documento" 23 | 24 | #. module: document_page_group 25 | #: model:ir.model.fields,field_description:document_page_group.field_document_page__group_ids 26 | msgid "Group" 27 | msgstr "Grupo" 28 | 29 | #. module: document_page_group 30 | #: model:ir.model.fields,help:document_page_group.field_document_page__direct_group_ids 31 | msgid "Set the groups that can view this category and its childs" 32 | msgstr "Definir los grupos que puede ver una categoría y sus hijos" 33 | 34 | #. module: document_page_group 35 | #: model:ir.model.fields,field_description:document_page_group.field_document_page__direct_group_ids 36 | msgid "Visible to" 37 | msgstr "Visible para" 38 | -------------------------------------------------------------------------------- /document_page_access_group_user_role/i18n/it.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_access_group_user_role 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 16.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "PO-Revision-Date: 2024-08-12 08:58+0000\n" 10 | "Last-Translator: mymage \n" 11 | "Language-Team: none\n" 12 | "Language: it\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: \n" 16 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 17 | "X-Generator: Weblate 5.6.2\n" 18 | 19 | #. module: document_page_access_group_user_role 20 | #: model:ir.model,name:document_page_access_group_user_role.model_document_page 21 | msgid "Document Page" 22 | msgstr "Pagina documento" 23 | 24 | #. module: document_page_access_group_user_role 25 | #: model:ir.model.fields,field_description:document_page_access_group_user_role.field_document_page__role_ids 26 | #: model_terms:ir.ui.view,arch_db:document_page_access_group_user_role.document_page_access_group_view_wiki_form 27 | msgid "Roles" 28 | msgstr "Ruoli" 29 | 30 | #. module: document_page_access_group_user_role 31 | #: model:ir.model.fields,field_description:document_page_access_group_user_role.field_document_page__user_ids 32 | msgid "Users" 33 | msgstr "Utenti" 34 | 35 | #~ msgid "Groups" 36 | #~ msgstr "Gruppi" 37 | -------------------------------------------------------------------------------- /document_page_group/i18n/it.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_group 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 16.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "PO-Revision-Date: 2023-06-23 09:09+0000\n" 10 | "Last-Translator: mymage \n" 11 | "Language-Team: none\n" 12 | "Language: it\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: \n" 16 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 17 | "X-Generator: Weblate 4.17\n" 18 | 19 | #. module: document_page_group 20 | #: model:ir.model,name:document_page_group.model_document_page 21 | msgid "Document Page" 22 | msgstr "Pagina documento" 23 | 24 | #. module: document_page_group 25 | #: model:ir.model.fields,field_description:document_page_group.field_document_page__group_ids 26 | msgid "Group" 27 | msgstr "Gruppo" 28 | 29 | #. module: document_page_group 30 | #: model:ir.model.fields,help:document_page_group.field_document_page__direct_group_ids 31 | msgid "Set the groups that can view this category and its childs" 32 | msgstr "Imposta i gruppi che possono visualizzare questa categoria e le figlie" 33 | 34 | #. module: document_page_group 35 | #: model:ir.model.fields,field_description:document_page_group.field_document_page__direct_group_ids 36 | msgid "Visible to" 37 | msgstr "Visibile a" 38 | -------------------------------------------------------------------------------- /document_page_group/i18n/pt.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_group 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 16.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "PO-Revision-Date: 2024-02-28 21:33+0000\n" 10 | "Last-Translator: Peter Romão \n" 11 | "Language-Team: none\n" 12 | "Language: pt\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: \n" 16 | "Plural-Forms: nplurals=2; plural=n > 1;\n" 17 | "X-Generator: Weblate 4.17\n" 18 | 19 | #. module: document_page_group 20 | #: model:ir.model,name:document_page_group.model_document_page 21 | msgid "Document Page" 22 | msgstr "Página do documento" 23 | 24 | #. module: document_page_group 25 | #: model:ir.model.fields,field_description:document_page_group.field_document_page__group_ids 26 | msgid "Group" 27 | msgstr "Grupo" 28 | 29 | #. module: document_page_group 30 | #: model:ir.model.fields,help:document_page_group.field_document_page__direct_group_ids 31 | msgid "Set the groups that can view this category and its childs" 32 | msgstr "Definir os grupos que podem exibir esta categoria e seus descendentes" 33 | 34 | #. module: document_page_group 35 | #: model:ir.model.fields,field_description:document_page_group.field_document_page__direct_group_ids 36 | msgid "Visible to" 37 | msgstr "Visível para" 38 | -------------------------------------------------------------------------------- /document_page_access_group_user_role/i18n/pt.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_access_group_user_role 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 16.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "PO-Revision-Date: 2025-02-04 17:11+0000\n" 10 | "Last-Translator: Peter Romão \n" 11 | "Language-Team: none\n" 12 | "Language: pt\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: \n" 16 | "Plural-Forms: nplurals=2; plural=n > 1;\n" 17 | "X-Generator: Weblate 5.6.2\n" 18 | 19 | #. module: document_page_access_group_user_role 20 | #: model:ir.model,name:document_page_access_group_user_role.model_document_page 21 | msgid "Document Page" 22 | msgstr "Página do Documento" 23 | 24 | #. module: document_page_access_group_user_role 25 | #: model:ir.model.fields,field_description:document_page_access_group_user_role.field_document_page__role_ids 26 | #: model_terms:ir.ui.view,arch_db:document_page_access_group_user_role.document_page_access_group_view_wiki_form 27 | msgid "Roles" 28 | msgstr "Papéis" 29 | 30 | #. module: document_page_access_group_user_role 31 | #: model:ir.model.fields,field_description:document_page_access_group_user_role.field_document_page__user_ids 32 | msgid "Users" 33 | msgstr "Utilizadores" 34 | 35 | #~ msgid "Groups" 36 | #~ msgstr "Grupos" 37 | -------------------------------------------------------------------------------- /document_page/tests/test_document_page_show_diff.py: -------------------------------------------------------------------------------- 1 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 2 | from odoo.exceptions import UserError 3 | from odoo.tests import common 4 | 5 | 6 | class TestDocumentPageShowDiff(common.TransactionCase): 7 | """document_page_show_diff test class.""" 8 | 9 | def test_show_demo_page1_diff(self): 10 | """Show test page history difference.""" 11 | page = self.env["document.page"].create( 12 | { 13 | "name": "Test Page", 14 | "content": "
Initial content
", 15 | } 16 | ) 17 | 18 | show_diff_object = self.env["wizard.document.page.history.show_diff"] 19 | 20 | history_document = self.env["document.page.history"] 21 | history_pages = history_document.search([("page_id", "=", page.id)]) 22 | 23 | self.assertTrue( 24 | show_diff_object.with_context( 25 | active_ids=[i.id for i in history_pages] 26 | )._get_diff() 27 | ) 28 | 29 | page.write({"content": "
Text content updated
"}) 30 | page.write({"content": "
Text updated
"}) 31 | 32 | history_pages = history_document.search([("page_id", "=", page.id)]) 33 | 34 | with self.assertRaises(UserError): 35 | show_diff_object.with_context( 36 | active_ids=[i.id for i in history_pages] 37 | )._get_diff() 38 | -------------------------------------------------------------------------------- /document_page_group/i18n/ca.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_group 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 17.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "PO-Revision-Date: 2024-09-04 18:06+0000\n" 10 | "Last-Translator: Esteve Blanch Sanmartí <3501974+esteveblanch@users.noreply." 11 | "github.com>\n" 12 | "Language-Team: none\n" 13 | "Language: ca\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: \n" 17 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 18 | "X-Generator: Weblate 5.6.2\n" 19 | 20 | #. module: document_page_group 21 | #: model:ir.model,name:document_page_group.model_document_page 22 | msgid "Document Page" 23 | msgstr "Pàgina del document" 24 | 25 | #. module: document_page_group 26 | #: model:ir.model.fields,field_description:document_page_group.field_document_page__group_ids 27 | msgid "Group" 28 | msgstr "Grup" 29 | 30 | #. module: document_page_group 31 | #: model:ir.model.fields,help:document_page_group.field_document_page__direct_group_ids 32 | msgid "Set the groups that can view this category and its childs" 33 | msgstr "Estableix els grups que poden veure aquesta categoria i els seus fills" 34 | 35 | #. module: document_page_group 36 | #: model:ir.model.fields,field_description:document_page_group.field_document_page__direct_group_ids 37 | msgid "Visible to" 38 | msgstr "Visible a" 39 | -------------------------------------------------------------------------------- /document_page_group/i18n/sl.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_group 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 12.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "PO-Revision-Date: 2020-03-21 11:13+0000\n" 10 | "Last-Translator: Matjaz Mozetic \n" 11 | "Language-Team: none\n" 12 | "Language: sl\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: \n" 16 | "Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || " 17 | "n%100==4 ? 2 : 3;\n" 18 | "X-Generator: Weblate 3.10\n" 19 | 20 | #. module: document_page_group 21 | #: model:ir.model,name:document_page_group.model_document_page 22 | msgid "Document Page" 23 | msgstr "Stran dokumenta" 24 | 25 | #. module: document_page_group 26 | #: model:ir.model.fields,field_description:document_page_group.field_document_page__group_ids 27 | msgid "Group" 28 | msgstr "Skupina" 29 | 30 | #. module: document_page_group 31 | #: model:ir.model.fields,help:document_page_group.field_document_page__direct_group_ids 32 | msgid "Set the groups that can view this category and its childs" 33 | msgstr "Nastavi skupine z vpogledom v to kategorijo in njej podrejenim" 34 | 35 | #. module: document_page_group 36 | #: model:ir.model.fields,field_description:document_page_group.field_document_page__direct_group_ids 37 | msgid "Visible to" 38 | msgstr "Vidno za" 39 | -------------------------------------------------------------------------------- /document_page_group/i18n/hr.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_group 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 16.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "PO-Revision-Date: 2023-02-13 13:23+0000\n" 10 | "Last-Translator: Bole \n" 11 | "Language-Team: none\n" 12 | "Language: hr\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: \n" 16 | "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " 17 | "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" 18 | "X-Generator: Weblate 4.14.1\n" 19 | 20 | #. module: document_page_group 21 | #: model:ir.model,name:document_page_group.model_document_page 22 | msgid "Document Page" 23 | msgstr "Stranica dokumenta" 24 | 25 | #. module: document_page_group 26 | #: model:ir.model.fields,field_description:document_page_group.field_document_page__group_ids 27 | msgid "Group" 28 | msgstr "Grupa" 29 | 30 | #. module: document_page_group 31 | #: model:ir.model.fields,help:document_page_group.field_document_page__direct_group_ids 32 | msgid "Set the groups that can view this category and its childs" 33 | msgstr "Postavite grupe koje mogu vidjeti ovu kategoriju i njoj podređene" 34 | 35 | #. module: document_page_group 36 | #: model:ir.model.fields,field_description:document_page_group.field_document_page__direct_group_ids 37 | msgid "Visible to" 38 | msgstr "Vidljivo za" 39 | -------------------------------------------------------------------------------- /document_page_access_group/tests/common.py: -------------------------------------------------------------------------------- 1 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 2 | from odoo import Command 3 | from odoo.tests import new_test_user 4 | 5 | from odoo.addons.base.tests.common import BaseCommon 6 | 7 | 8 | class TestDocumentPageAccessGroupBase(BaseCommon): 9 | @classmethod 10 | def setUpClass(cls): 11 | super().setUpClass() 12 | cls.group = cls.env["res.groups"].create({"name": "Test group"}) 13 | cls.user = new_test_user( 14 | cls.env, login="test-user", groups="document_knowledge.group_document_user" 15 | ) 16 | cls.manager_user = new_test_user( 17 | cls.env, 18 | login="test-manager-user", 19 | groups="document_knowledge.group_document_user", 20 | ) 21 | cls.manager_user.write({"groups_id": [Command.link(cls.group.id)]}) 22 | cls.public_page = cls.env["document.page"].create( 23 | {"name": "Public Page", "type": "content"} 24 | ) 25 | cls.knowledge_page = cls.env["document.page"].create( 26 | { 27 | "name": "Knowledge Page", 28 | "type": "content", 29 | "groups_id": [Command.set([cls.group.id])], 30 | } 31 | ) 32 | cls.user_page = cls.env["document.page"].create( 33 | { 34 | "name": "User Page (basic user)", 35 | "type": "content", 36 | "user_ids": [Command.set([cls.user.id])], 37 | } 38 | ) 39 | -------------------------------------------------------------------------------- /document_page/wizard/document_page_create_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Create Menu 6 | document.page.create.menu 7 | 8 |
9 | 10 | 11 | 15 | 16 |
17 |
26 |
27 |
28 |
29 | 30 | 31 | Create Menu 32 | document.page.create.menu 33 | form 34 | new 35 | 36 | 37 |
38 | -------------------------------------------------------------------------------- /document_page_partner/views/document_page.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | document.page 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | document.page 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | document.page 23 | 24 | 25 | 26 | 27 | 28 | 29 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /document_page_access_group/i18n/document_page_access_group.pot: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_access_group 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 18.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "Last-Translator: \n" 10 | "Language-Team: \n" 11 | "MIME-Version: 1.0\n" 12 | "Content-Type: text/plain; charset=UTF-8\n" 13 | "Content-Transfer-Encoding: \n" 14 | "Plural-Forms: \n" 15 | 16 | #. module: document_page_access_group 17 | #: model:ir.model,name:document_page_access_group.model_document_page 18 | msgid "Document Page" 19 | msgstr "" 20 | 21 | #. module: document_page_access_group 22 | #: model:ir.model.fields,field_description:document_page_access_group.field_document_page__groups_id 23 | #: model_terms:ir.ui.view,arch_db:document_page_access_group.document_page_access_group_view_wiki_form 24 | msgid "Groups" 25 | msgstr "" 26 | 27 | #. module: document_page_access_group 28 | #: model_terms:ir.ui.view,arch_db:document_page_access_group.document_page_access_group_view_wiki_form 29 | msgid "Security" 30 | msgstr "" 31 | 32 | #. module: document_page_access_group 33 | #: model:ir.model.fields,field_description:document_page_access_group.field_document_page__user_ids 34 | #: model_terms:ir.ui.view,arch_db:document_page_access_group.document_page_access_group_view_wiki_form 35 | msgid "Users" 36 | msgstr "" 37 | 38 | #. module: document_page_access_group 39 | #. odoo-python 40 | #: code:addons/document_page_access_group/models/document_page.py:0 41 | msgid "You cannot set groups and users at the same time." 42 | msgstr "" 43 | -------------------------------------------------------------------------------- /document_page/security/document_page_security.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Editor 5 | 6 | 10 | 11 | 12 | Manager 13 | 14 | 15 | 16 | 17 | 18 | document_page multi-company 19 | 20 | 21 | ['|',('company_id','=',False),('company_id', 'in', company_ids)] 24 | 25 | 26 | document_page_history multi-company 27 | 28 | 29 | ['|',('company_id','=',False),('company_id', 'in', company_ids)] 32 | 33 | 34 | -------------------------------------------------------------------------------- /attachment_zipped_download/models/ir_attachment.py: -------------------------------------------------------------------------------- 1 | # Copyright 2019 César Fernández Domínguez 2 | # Copyright 2022 Tecnativa - Víctor Martínez 3 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl) 4 | import zipfile 5 | from io import BytesIO 6 | 7 | from odoo import models 8 | from odoo.exceptions import UserError 9 | 10 | 11 | class IrAttachment(models.Model): 12 | _inherit = "ir.attachment" 13 | 14 | def action_attachments_download(self): 15 | items = self.filtered(lambda x: x.type == "binary") 16 | if not items: 17 | raise UserError( 18 | self.env._("None attachment selected. Only binary attachments allowed.") 19 | ) 20 | ids = ",".join(map(str, items.ids)) 21 | return { 22 | "type": "ir.actions.act_url", 23 | "url": f"/web/attachment/download_zip?ids={ids}", 24 | "target": "self", 25 | } 26 | 27 | def _create_temp_zip(self): 28 | zip_buffer = BytesIO() 29 | with zipfile.ZipFile(zip_buffer, "a", zipfile.ZIP_DEFLATED, False) as zip_file: 30 | for attachment in self: 31 | attachment.check("read") 32 | zip_file.writestr( 33 | attachment._compute_zip_file_name(), 34 | attachment.raw, 35 | ) 36 | zip_buffer.seek(0) 37 | zip_file.close() 38 | return zip_buffer 39 | 40 | def _compute_zip_file_name(self): 41 | """Give a chance of easily changing the name of the file inside the ZIP.""" 42 | self.ensure_one() 43 | return self.name 44 | -------------------------------------------------------------------------------- /document_page/__manifest__.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2004-2010 Tiny SPRL (). 2 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 3 | 4 | 5 | { 6 | "name": "Document Page", 7 | "version": "18.0.2.1.0", 8 | "category": "Knowledge Management", 9 | "author": "OpenERP SA, Odoo Community Association (OCA)", 10 | "images": [ 11 | "images/category_list.png", 12 | "images/create_category.png", 13 | "images/page_list.png", 14 | "images/create_page.png", 15 | "images/customer_invoice.jpeg", 16 | "images/page_history.png", 17 | ], 18 | "website": "https://github.com/OCA/knowledge", 19 | "license": "AGPL-3", 20 | "depends": ["mail", "document_knowledge", "web_editor"], 21 | "data": [ 22 | "security/document_page_security.xml", 23 | "security/ir.model.access.csv", 24 | "wizard/document_page_create_menu.xml", 25 | "wizard/document_page_show_diff.xml", 26 | "views/document_page.xml", 27 | "views/document_page_category.xml", 28 | "views/document_page_history.xml", 29 | "views/report_document_page.xml", 30 | ], 31 | "demo": ["demo/document_page.xml"], 32 | "assets": { 33 | "web._assets_primary_variables": [ 34 | "document_page/static/src/**/document_page_variables.scss", 35 | ], 36 | "web.assets_backend": [ 37 | "document_page/static/src/scss/document_page.scss", 38 | "document_page/static/src/js/document_page_kanban_controller.esm.js", 39 | "document_page/static/src/js/document_page_kanban_view.esm.js", 40 | ], 41 | }, 42 | } 43 | -------------------------------------------------------------------------------- /document_page_project/views/document_page_views.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | document.page.form - document_page_project 5 | document.page 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Project Wiki 15 | document.page 16 | [('type','=','content'), ('project_id', '=', active_id)] 19 | { 20 | 'default_type': 'content', 21 | 'default_project_id': active_id} 22 | list,form 23 | 29 | 30 | 31 |

32 | Click to create a new web page. 33 |

34 |
35 |
36 |
37 | -------------------------------------------------------------------------------- /document_page_access_group/i18n/pt_BR.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_access_group 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 18.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "Last-Translator: Automatically generated\n" 10 | "Language-Team: none\n" 11 | "Language: pt_BR\n" 12 | "MIME-Version: 1.0\n" 13 | "Content-Type: text/plain; charset=UTF-8\n" 14 | "Content-Transfer-Encoding: \n" 15 | "Plural-Forms: nplurals=2; plural=n > 1;\n" 16 | 17 | #. module: document_page_access_group 18 | #: model:ir.model,name:document_page_access_group.model_document_page 19 | msgid "Document Page" 20 | msgstr "" 21 | 22 | #. module: document_page_access_group 23 | #: model:ir.model.fields,field_description:document_page_access_group.field_document_page__groups_id 24 | #: model_terms:ir.ui.view,arch_db:document_page_access_group.document_page_access_group_view_wiki_form 25 | msgid "Groups" 26 | msgstr "" 27 | 28 | #. module: document_page_access_group 29 | #: model_terms:ir.ui.view,arch_db:document_page_access_group.document_page_access_group_view_wiki_form 30 | msgid "Security" 31 | msgstr "" 32 | 33 | #. module: document_page_access_group 34 | #: model:ir.model.fields,field_description:document_page_access_group.field_document_page__user_ids 35 | #: model_terms:ir.ui.view,arch_db:document_page_access_group.document_page_access_group_view_wiki_form 36 | msgid "Users" 37 | msgstr "" 38 | 39 | #. module: document_page_access_group 40 | #. odoo-python 41 | #: code:addons/document_page_access_group/models/document_page.py:0 42 | msgid "You cannot set groups and users at the same time." 43 | msgstr "" 44 | -------------------------------------------------------------------------------- /document_url/tests/test_document_url.py: -------------------------------------------------------------------------------- 1 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). 2 | 3 | import base64 4 | 5 | from odoo.tests import common 6 | 7 | 8 | class TestDocumentUrl(common.TransactionCase): 9 | def setUp(self): 10 | super().setUp() 11 | wizard_add_url = self.env["ir.attachment.add_url"] 12 | 13 | self.wizard_add_url = wizard_add_url.with_context( 14 | active_model="res.users", 15 | active_id=self.env.ref("base.user_demo").id, 16 | active_ids=[self.env.ref("base.user_demo").id], 17 | ).create({"name": "Demo User (Website)", "url": "http://www.odoodemouser.com"}) 18 | 19 | def test_add_url_attachment(self): 20 | self.wizard_add_url.action_add_url() 21 | domain = [ 22 | ("type", "=", "url"), 23 | ("name", "=", "Demo User (Website)"), 24 | ("url", "=", "http://www.odoodemouser.com"), 25 | ("res_model", "=", "res.users"), 26 | ("res_id", "=", self.env.ref("base.user_demo").id), 27 | ] 28 | attachment_added_count = self.env["ir.attachment"].search_count(domain) 29 | self.assertEqual(attachment_added_count, 1) 30 | attachment = self.env["ir.attachment"].search(domain) 31 | self.assertEqual(attachment.mimetype, "application/link") 32 | 33 | def test_dont_broke_default_compute_mimetype(self): 34 | blob1 = b"blob1" 35 | blob1_b64 = base64.b64encode(blob1) 36 | attachment = self.env["ir.attachment"].create( 37 | {"name": "a2", "datas": blob1_b64, "mimetype": "image/png"} 38 | ) 39 | self.assertEqual(attachment.mimetype, "image/png") 40 | -------------------------------------------------------------------------------- /document_page_reference/i18n/document_page_reference.pot: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_reference 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 18.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "Last-Translator: \n" 10 | "Language-Team: \n" 11 | "MIME-Version: 1.0\n" 12 | "Content-Type: text/plain; charset=UTF-8\n" 13 | "Content-Transfer-Encoding: \n" 14 | "Plural-Forms: \n" 15 | 16 | #. module: document_page_reference 17 | #: model:ir.model,name:document_page_reference.model_document_page 18 | msgid "Document Page" 19 | msgstr "" 20 | 21 | #. module: document_page_reference 22 | #: model:ir.model.fields,field_description:document_page_reference.field_document_page__content_parsed 23 | msgid "Parsed Content" 24 | msgstr "" 25 | 26 | #. module: document_page_reference 27 | #: model:ir.model.fields,field_description:document_page_reference.field_document_page__reference 28 | msgid "Reference" 29 | msgstr "" 30 | 31 | #. module: document_page_reference 32 | #. odoo-python 33 | #: code:addons/document_page_reference/models/document_page.py:0 34 | msgid "Reference is not valid" 35 | msgstr "" 36 | 37 | #. module: document_page_reference 38 | #. odoo-python 39 | #: code:addons/document_page_reference/models/document_page.py:0 40 | msgid "Reference must be unique" 41 | msgstr "" 42 | 43 | #. module: document_page_reference 44 | #: model:ir.model.fields,help:document_page_reference.field_document_page__reference 45 | msgid "Used to find the document, it can contain letters, numbers and _" 46 | msgstr "" 47 | 48 | #. module: document_page_reference 49 | #: model_terms:ir.ui.view,arch_db:document_page_reference.document_page_form_view 50 | msgid "internal_reference (autofilled if not value is provided)" 51 | msgstr "" 52 | -------------------------------------------------------------------------------- /document_page/tests/test_document_page_create_menu.py: -------------------------------------------------------------------------------- 1 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 2 | from odoo.tests import common 3 | 4 | 5 | class TestDocumentPageCreateMenu(common.TransactionCase): 6 | """document_page_create_menu test class.""" 7 | 8 | def test_page_menu_creation(self): 9 | """Test page menu creation.""" 10 | menu_parent = self.env.ref("document_knowledge.menu_document") 11 | 12 | menu_created = self.env["document.page.create.menu"].create( 13 | {"menu_name": "Wiki Test menu", "menu_parent_id": menu_parent.id} 14 | ) 15 | 16 | menu = self.env["document.page.create.menu"].search( 17 | [("id", "=", menu_created.id)] 18 | ) 19 | menu.with_context( 20 | active_id=[self.ref("document_page.demo_page1")] 21 | ).document_page_menu_create() 22 | 23 | fields_list = ["menu_name", "menu_name"] 24 | 25 | res = menu.with_context( 26 | active_id=[self.ref("document_page.demo_page1")] 27 | ).default_get(fields_list) 28 | 29 | self.assertEqual(res["menu_name"], "Odoo 15.0 Functional Demo") 30 | 31 | def test_page_menu_parent_id_context(self): 32 | """Test page menu parent_id context.""" 33 | menu_parent = self.env["ir.ui.menu"].create({"name": "Test Folder Menu"}) 34 | context_results = ( 35 | self.env["ir.ui.menu"] 36 | .with_context(**{"ir.ui.menu.authorized_list": True}) 37 | .search([("id", "=", menu_parent.id)]) 38 | ) 39 | no_context_results = self.env["ir.ui.menu"].search( 40 | [("id", "=", menu_parent.id)] 41 | ) 42 | self.assertEqual(context_results[:1].id, menu_parent.id) 43 | self.assertEqual(any(no_context_results), False) 44 | -------------------------------------------------------------------------------- /.github/workflows/pre-commit.yml: -------------------------------------------------------------------------------- 1 | name: pre-commit 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - "18.0*" 7 | push: 8 | branches: 9 | - "18.0" 10 | - "18.0-ocabot-*" 11 | 12 | jobs: 13 | pre-commit: 14 | runs-on: ubuntu-22.04 15 | steps: 16 | - uses: actions/checkout@v4 17 | - uses: actions/setup-python@v5 18 | with: 19 | python-version: "3.11" 20 | - name: Get python version 21 | run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV 22 | - uses: actions/cache@v4 23 | with: 24 | path: ~/.cache/pre-commit 25 | key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} 26 | - name: Install pre-commit 27 | run: pip install pre-commit 28 | - name: Run pre-commit 29 | run: pre-commit run --all-files --show-diff-on-failure --color=always 30 | env: 31 | # Consider valid a PR that changes README fragments but doesn't 32 | # change the README.rst file itself. It's not really a problem 33 | # because the bot will update it anyway after merge. This way, we 34 | # lower the barrier for functional contributors that want to fix the 35 | # readme fragments, while still letting developers get README 36 | # auto-generated (which also helps functionals when using runboat). 37 | # DOCS https://pre-commit.com/#temporarily-disabling-hooks 38 | SKIP: oca-gen-addon-readme 39 | - name: Check that all files generated by pre-commit are in git 40 | run: | 41 | newfiles="$(git ls-files --others --exclude-from=.gitignore)" 42 | if [ "$newfiles" != "" ] ; then 43 | echo "Please check-in the following files:" 44 | echo "$newfiles" 45 | exit 1 46 | fi 47 | -------------------------------------------------------------------------------- /attachment_zipped_download/i18n/attachment_zipped_download.pot: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * attachment_zipped_download 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 18.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "Last-Translator: \n" 10 | "Language-Team: \n" 11 | "MIME-Version: 1.0\n" 12 | "Content-Type: text/plain; charset=UTF-8\n" 13 | "Content-Transfer-Encoding: \n" 14 | "Plural-Forms: \n" 15 | 16 | #. module: attachment_zipped_download 17 | #: model:ir.model,name:attachment_zipped_download.model_ir_attachment_action_download 18 | msgid "" 19 | "\n" 20 | " Mixin to help download attachments linked to record(s).\n" 21 | " " 22 | msgstr "" 23 | 24 | #. module: attachment_zipped_download 25 | #: model:ir.model,name:attachment_zipped_download.model_ir_attachment 26 | msgid "Attachment" 27 | msgstr "" 28 | 29 | #. module: attachment_zipped_download 30 | #: model:ir.actions.server,name:attachment_zipped_download.action_attachments_download 31 | msgid "Download" 32 | msgstr "" 33 | 34 | #. module: attachment_zipped_download 35 | #. odoo-python 36 | #: code:addons/attachment_zipped_download/models/ir_attachment_action_download.py:0 37 | msgid "No attachment!" 38 | msgstr "" 39 | 40 | #. module: attachment_zipped_download 41 | #. odoo-python 42 | #: code:addons/attachment_zipped_download/models/ir_attachment.py:0 43 | msgid "None attachment selected. Only binary attachments allowed." 44 | msgstr "" 45 | 46 | #. module: attachment_zipped_download 47 | #. odoo-python 48 | #: code:addons/attachment_zipped_download/models/ir_attachment_action_download.py:0 49 | msgid "There is no document found to download." 50 | msgstr "" 51 | 52 | #. module: attachment_zipped_download 53 | #. odoo-python 54 | #: code:addons/attachment_zipped_download/controllers/main.py:0 55 | msgid "attachments.zip" 56 | msgstr "" 57 | -------------------------------------------------------------------------------- /document_page_access_group/i18n/ca.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_access_group 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 17.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "PO-Revision-Date: 2024-09-04 18:06+0000\n" 10 | "Last-Translator: Esteve Blanch Sanmartí <3501974+esteveblanch@users.noreply." 11 | "github.com>\n" 12 | "Language-Team: none\n" 13 | "Language: ca\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: \n" 17 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 18 | "X-Generator: Weblate 5.6.2\n" 19 | 20 | #. module: document_page_access_group 21 | #: model:ir.model,name:document_page_access_group.model_document_page 22 | msgid "Document Page" 23 | msgstr "Pàgina del document" 24 | 25 | #. module: document_page_access_group 26 | #: model:ir.model.fields,field_description:document_page_access_group.field_document_page__groups_id 27 | #: model_terms:ir.ui.view,arch_db:document_page_access_group.document_page_access_group_view_wiki_form 28 | msgid "Groups" 29 | msgstr "Grups" 30 | 31 | #. module: document_page_access_group 32 | #: model_terms:ir.ui.view,arch_db:document_page_access_group.document_page_access_group_view_wiki_form 33 | msgid "Security" 34 | msgstr "Seguretat" 35 | 36 | #. module: document_page_access_group 37 | #: model:ir.model.fields,field_description:document_page_access_group.field_document_page__user_ids 38 | #: model_terms:ir.ui.view,arch_db:document_page_access_group.document_page_access_group_view_wiki_form 39 | msgid "Users" 40 | msgstr "Usuaris" 41 | 42 | #. module: document_page_access_group 43 | #. odoo-python 44 | #: code:addons/document_page_access_group/models/document_page.py:0 45 | #, python-format 46 | msgid "You cannot set groups and users at the same time." 47 | msgstr "No podeu establir grups i usuaris al mateix temps." 48 | -------------------------------------------------------------------------------- /document_page_access_group/i18n/es.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_access_group 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 14.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "POT-Creation-Date: 2024-07-24 07:09+0000\n" 10 | "PO-Revision-Date: 2024-07-24 09:10+0200\n" 11 | "Last-Translator: luis-ron \n" 12 | "Language-Team: none\n" 13 | "Language: es\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 18 | "X-Generator: Poedit 3.0.1\n" 19 | 20 | #. module: document_page_access_group 21 | #: model:ir.model,name:document_page_access_group.model_document_page 22 | msgid "Document Page" 23 | msgstr "Página de documento" 24 | 25 | #. module: document_page_access_group 26 | #: model:ir.model.fields,field_description:document_page_access_group.field_document_page__groups_id 27 | #: model_terms:ir.ui.view,arch_db:document_page_access_group.document_page_access_group_view_wiki_form 28 | msgid "Groups" 29 | msgstr "Grupos" 30 | 31 | #. module: document_page_access_group 32 | #: model_terms:ir.ui.view,arch_db:document_page_access_group.document_page_access_group_view_wiki_form 33 | msgid "Security" 34 | msgstr "Seguridad" 35 | 36 | #. module: document_page_access_group 37 | #: model:ir.model.fields,field_description:document_page_access_group.field_document_page__user_ids 38 | #: model_terms:ir.ui.view,arch_db:document_page_access_group.document_page_access_group_view_wiki_form 39 | msgid "Users" 40 | msgstr "Usuarios" 41 | 42 | #. module: document_page_access_group 43 | #. odoo-python 44 | #: code:addons/document_page_access_group/models/document_page.py:0 45 | #, python-format 46 | msgid "You cannot set groups and users at the same time." 47 | msgstr "No puedes definir grupos y usuarios al mismo tiempo." 48 | -------------------------------------------------------------------------------- /document_page_access_group_user_role/tests/test_document_page_access_group_user_role.py: -------------------------------------------------------------------------------- 1 | # Copyright 2024 Tecnativa - Víctor Martínez 2 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 3 | from odoo.tests.common import users 4 | 5 | from odoo.addons.document_page_access_group.tests.common import ( 6 | TestDocumentPageAccessGroupBase, 7 | ) 8 | 9 | 10 | class TestDocumentPageAccessGroupUserRole(TestDocumentPageAccessGroupBase): 11 | @classmethod 12 | def setUpClass(cls): 13 | super().setUpClass() 14 | cls.user_role = cls.env["res.users.role"].create( 15 | { 16 | "name": "Test role", 17 | "implied_ids": [(6, 0, [cls.group.id])], 18 | "users": [(6, 0, [cls.manager_user.id])], 19 | } 20 | ) 21 | cls.role_page = cls.env["document.page"].create( 22 | { 23 | "name": "Role Page (test role)", 24 | "type": "content", 25 | "role_ids": [(6, 0, [cls.user_role.id])], 26 | } 27 | ) 28 | 29 | def test_document_page_role_misc(self): 30 | self.assertFalse(self.role_page.groups_id) 31 | self.assertTrue(self.role_page.user_ids) 32 | 33 | @users("test-user") 34 | def test_document_page_role_access_01(self): 35 | pages = self.env["document.page"].search([]) 36 | self.assertIn(self.public_page, pages) 37 | self.assertNotIn(self.knowledge_page, pages) 38 | self.assertIn(self.user_page, pages) 39 | self.assertNotIn(self.role_page, pages) 40 | 41 | @users("test-manager-user") 42 | def test_document_page_role_access_02(self): 43 | pages = self.env["document.page"].search([]) 44 | self.assertIn(self.public_page, pages) 45 | self.assertIn(self.knowledge_page, pages) 46 | self.assertNotIn(self.user_page, pages) 47 | self.assertIn(self.role_page, pages) 48 | -------------------------------------------------------------------------------- /attachment_zipped_download/i18n/pt_BR.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * attachment_zipped_download 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 18.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "Last-Translator: Automatically generated\n" 10 | "Language-Team: none\n" 11 | "Language: pt_BR\n" 12 | "MIME-Version: 1.0\n" 13 | "Content-Type: text/plain; charset=UTF-8\n" 14 | "Content-Transfer-Encoding: \n" 15 | "Plural-Forms: nplurals=2; plural=n > 1;\n" 16 | 17 | #. module: attachment_zipped_download 18 | #: model:ir.model,name:attachment_zipped_download.model_ir_attachment_action_download 19 | msgid "" 20 | "\n" 21 | " Mixin to help download attachments linked to record(s).\n" 22 | " " 23 | msgstr "" 24 | 25 | #. module: attachment_zipped_download 26 | #: model:ir.model,name:attachment_zipped_download.model_ir_attachment 27 | msgid "Attachment" 28 | msgstr "" 29 | 30 | #. module: attachment_zipped_download 31 | #: model:ir.actions.server,name:attachment_zipped_download.action_attachments_download 32 | msgid "Download" 33 | msgstr "" 34 | 35 | #. module: attachment_zipped_download 36 | #. odoo-python 37 | #: code:addons/attachment_zipped_download/models/ir_attachment_action_download.py:0 38 | msgid "No attachment!" 39 | msgstr "" 40 | 41 | #. module: attachment_zipped_download 42 | #. odoo-python 43 | #: code:addons/attachment_zipped_download/models/ir_attachment.py:0 44 | msgid "None attachment selected. Only binary attachments allowed." 45 | msgstr "" 46 | 47 | #. module: attachment_zipped_download 48 | #. odoo-python 49 | #: code:addons/attachment_zipped_download/models/ir_attachment_action_download.py:0 50 | msgid "There is no document found to download." 51 | msgstr "" 52 | 53 | #. module: attachment_zipped_download 54 | #. odoo-python 55 | #: code:addons/attachment_zipped_download/controllers/main.py:0 56 | msgid "attachments.zip" 57 | msgstr "" 58 | -------------------------------------------------------------------------------- /document_page_group/tests/test_document_page_group.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020 Creu Blanca 2 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 3 | 4 | from odoo import Command 5 | 6 | from odoo.addons.base.tests.common import BaseCommon 7 | 8 | 9 | class TestDocumentPageGroup(BaseCommon): 10 | @classmethod 11 | def setUpClass(cls): 12 | super().setUpClass() 13 | knowledge_group = cls.env.ref("document_knowledge.group_document_user").id 14 | cls.user_id = cls.env["res.users"].create( 15 | { 16 | "name": "user", 17 | "login": "login", 18 | "email": "email", 19 | "groups_id": [Command.link(knowledge_group)], 20 | } 21 | ) 22 | cls.group = cls.env.ref("document_page.group_document_manager") 23 | 24 | cls.categ_1 = cls.env["document.page"].create( 25 | {"name": "Categ 1", "type": "category"} 26 | ) 27 | cls.categ_2 = cls.env["document.page"].create( 28 | {"name": "Categ 2", "type": "category", "parent_id": cls.categ_1.id} 29 | ) 30 | cls.page = cls.env["document.page"].create( 31 | {"name": "Page 1", "type": "content", "parent_id": cls.categ_1.id} 32 | ) 33 | 34 | def test_document_page_group(self): 35 | pages = ( 36 | self.env["document.page"] 37 | .with_user(user=self.user_id.id) 38 | .search([("type", "=", "content")]) 39 | ) 40 | self.assertIn(self.page.id, pages.ids) 41 | 42 | self.categ_1.write({"direct_group_ids": [Command.link(self.group.id)]}) 43 | self.assertIn(self.group.id, self.categ_2.group_ids.ids) 44 | 45 | pages = ( 46 | self.env["document.page"] 47 | .with_user(user=self.user_id.id) 48 | .search([("type", "=", "content")]) 49 | ) 50 | self.assertNotIn(self.page.id, pages.ids) 51 | -------------------------------------------------------------------------------- /document_page_project/i18n/document_page_project.pot: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_project 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 18.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "Last-Translator: \n" 10 | "Language-Team: \n" 11 | "MIME-Version: 1.0\n" 12 | "Content-Type: text/plain; charset=UTF-8\n" 13 | "Content-Transfer-Encoding: \n" 14 | "Plural-Forms: \n" 15 | 16 | #. module: document_page_project 17 | #: model_terms:ir.ui.view,arch_db:document_page_project.view_project_kanban 18 | msgid "Wiki Pages" 19 | msgstr "" 20 | 21 | #. module: document_page_project 22 | #: model_terms:ir.actions.act_window,help:document_page_project.action_document_page_projects 23 | msgid "Click to create a new web page." 24 | msgstr "" 25 | 26 | #. module: document_page_project 27 | #: model:ir.model,name:document_page_project.model_document_page 28 | msgid "Document Page" 29 | msgstr "" 30 | 31 | #. module: document_page_project 32 | #: model:ir.model.fields,field_description:document_page_project.field_project_project__document_page_count 33 | msgid "Document Page Count" 34 | msgstr "" 35 | 36 | #. module: document_page_project 37 | #: model:ir.model,name:document_page_project.model_project_project 38 | #: model:ir.model.fields,field_description:document_page_project.field_document_page__project_id 39 | msgid "Project" 40 | msgstr "" 41 | 42 | #. module: document_page_project 43 | #: model:ir.actions.act_window,name:document_page_project.action_document_page_projects 44 | msgid "Project Wiki" 45 | msgstr "" 46 | 47 | #. module: document_page_project 48 | #: model:ir.model.fields,field_description:document_page_project.field_project_project__document_page_ids 49 | msgid "Wiki" 50 | msgstr "" 51 | 52 | #. module: document_page_project 53 | #: model_terms:ir.ui.view,arch_db:document_page_project.edit_project 54 | msgid "Wiki Pages" 55 | msgstr "" 56 | -------------------------------------------------------------------------------- /document_page_approval/data/email_template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Automated new draft need approval Notification Mail 6 | {{object.create_uid.company_id.email or 'noreply@localhost.com'}} 9 | New version of {{object.display_name}} needs your approval 12 | 13 | 14 | {{object.create_uid.partner_id.lang}} 15 | 16 |

Hello,

17 |

submited a new Change Request for and it needs your approval.

20 |

21 | 22 |

23 |

24 | Modified by: 25 | 26 |

27 |

28 | Date: 29 | 30 |

31 | 32 |

Summary

33 |

34 | 35 |

Diff

36 |
37 | 38 |
39 |

Have a great day.

40 |
41 |

Odoo

42 |
43 |
44 |
45 | -------------------------------------------------------------------------------- /document_page_project/views/project_project_views.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | project.project 5 | 6 | 7 | 8 | 13 |
14 | 15 | 20 | 21 | Wiki Pages 22 |
23 |
24 | 25 | 26 | 27 | 28 | project.project.form - document_page_project 29 | project.project 30 | 31 | 32 |
33 | 45 |
46 |
47 |
48 | 49 | -------------------------------------------------------------------------------- /document_page_access_group/i18n/it.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_access_group 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 14.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "PO-Revision-Date: 2024-08-07 08:58+0000\n" 10 | "Last-Translator: mymage \n" 11 | "Language-Team: none\n" 12 | "Language: it\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: \n" 16 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 17 | "X-Generator: Weblate 5.6.2\n" 18 | 19 | #. module: document_page_access_group 20 | #: model:ir.model,name:document_page_access_group.model_document_page 21 | msgid "Document Page" 22 | msgstr "Pagina documento" 23 | 24 | #. module: document_page_access_group 25 | #: model:ir.model.fields,field_description:document_page_access_group.field_document_page__groups_id 26 | #: model_terms:ir.ui.view,arch_db:document_page_access_group.document_page_access_group_view_wiki_form 27 | msgid "Groups" 28 | msgstr "Gruppi" 29 | 30 | #. module: document_page_access_group 31 | #: model_terms:ir.ui.view,arch_db:document_page_access_group.document_page_access_group_view_wiki_form 32 | msgid "Security" 33 | msgstr "Sicurezza" 34 | 35 | #. module: document_page_access_group 36 | #: model:ir.model.fields,field_description:document_page_access_group.field_document_page__user_ids 37 | #: model_terms:ir.ui.view,arch_db:document_page_access_group.document_page_access_group_view_wiki_form 38 | msgid "Users" 39 | msgstr "Utenti" 40 | 41 | #. module: document_page_access_group 42 | #. odoo-python 43 | #: code:addons/document_page_access_group/models/document_page.py:0 44 | #, python-format 45 | msgid "You cannot set groups and users at the same time." 46 | msgstr "Non si possono impostare gruppi e utenti allo stesso tempo." 47 | 48 | #~ msgid "Display Name" 49 | #~ msgstr "Nome visualizzato" 50 | 51 | #~ msgid "ID" 52 | #~ msgstr "ID" 53 | 54 | #~ msgid "Last Modified on" 55 | #~ msgstr "Ultima modifica il" 56 | -------------------------------------------------------------------------------- /document_page/models/document_page_history.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2004-2010 Tiny SPRL (). 2 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 3 | 4 | 5 | from odoo import api, fields, models 6 | 7 | from odoo.addons.web_editor.models.diff_utils import ( 8 | generate_comparison, 9 | ) 10 | 11 | 12 | class DocumentPageHistory(models.Model): 13 | """This model is necessary to manage a document history.""" 14 | 15 | _name = "document.page.history" 16 | _description = "Document Page History" 17 | _order = "id DESC" 18 | 19 | page_id = fields.Many2one("document.page", "Page", ondelete="cascade") 20 | name = fields.Char(index=True) 21 | summary = fields.Char(index=True) 22 | content = fields.Html(sanitize=False) 23 | diff = fields.Html(compute="_compute_diff", sanitize_tags=False) 24 | 25 | company_id = fields.Many2one( 26 | "res.company", 27 | "Company", 28 | help="If set, page is accessible only from this company", 29 | related="page_id.company_id", 30 | store=True, 31 | index=True, 32 | readonly=True, 33 | ) 34 | 35 | def _compute_diff(self): 36 | """Shows a diff between this version and the previous version""" 37 | history = self.env["document.page.history"] 38 | for rec in self: 39 | prev = history.search( 40 | [ 41 | ("page_id", "=", rec.page_id.id), 42 | ("create_date", "<", rec.create_date), 43 | ], 44 | limit=1, 45 | order="create_date DESC", 46 | ) 47 | rec.diff = self._get_diff(prev.id, rec.id) 48 | 49 | def _get_diff(self, v1, v2): 50 | text1 = v1 and self.browse(v1).content or "" 51 | text2 = v2 and self.browse(v2).content or "" 52 | return generate_comparison(text1, text2) 53 | 54 | @api.depends("page_id") 55 | def _compute_display_name(self): 56 | for rec in self: 57 | rec.display_name = rec.id, "%s #%i" % (rec.page_id.name, rec.id) 58 | -------------------------------------------------------------------------------- /attachment_zipped_download/i18n/fr.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * attachment_zipped_download 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 14.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "Last-Translator: \n" 10 | "Language-Team: \n" 11 | "Language: \n" 12 | "MIME-Version: 1.0\n" 13 | "Content-Type: text/plain; charset=UTF-8\n" 14 | "Content-Transfer-Encoding: \n" 15 | "Plural-Forms: \n" 16 | 17 | #. module: attachment_zipped_download 18 | #: model:ir.model,name:attachment_zipped_download.model_ir_attachment_action_download 19 | msgid "" 20 | "\n" 21 | " Mixin to help download attachments linked to record(s).\n" 22 | " " 23 | msgstr "" 24 | "Mixin pour faciliter le téléchargements des pièces jointes lié aux " 25 | "enregistrements." 26 | 27 | #. module: attachment_zipped_download 28 | #: model:ir.model,name:attachment_zipped_download.model_ir_attachment 29 | msgid "Attachment" 30 | msgstr "Pièce jointe" 31 | 32 | #. module: attachment_zipped_download 33 | #: model:ir.actions.server,name:attachment_zipped_download.action_attachments_download 34 | msgid "Download" 35 | msgstr "Télécharger" 36 | 37 | #. module: attachment_zipped_download 38 | #. odoo-python 39 | #: code:addons/attachment_zipped_download/models/ir_attachment_action_download.py:0 40 | msgid "No attachment!" 41 | msgstr "Aucune pièce jointe !" 42 | 43 | #. module: attachment_zipped_download 44 | #. odoo-python 45 | #: code:addons/attachment_zipped_download/models/ir_attachment.py:0 46 | msgid "None attachment selected. Only binary attachments allowed." 47 | msgstr "" 48 | "Aucune pièce jointe sélectionnée. Seul les picèces jointes de type Binaire " 49 | "sont permises." 50 | 51 | #. module: attachment_zipped_download 52 | #. odoo-python 53 | #: code:addons/attachment_zipped_download/models/ir_attachment_action_download.py:0 54 | msgid "There is no document found to download." 55 | msgstr "Aucune pièce jointe téléchargeable trouvé." 56 | 57 | #. module: attachment_zipped_download 58 | #. odoo-python 59 | #: code:addons/attachment_zipped_download/controllers/main.py:0 60 | msgid "attachments.zip" 61 | msgstr "pieces-jointes.zip" 62 | -------------------------------------------------------------------------------- /document_url/static/src/xml/url.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 |
10 | 18 | 27 |
28 |
29 |
30 |
31 | 32 | 36 | attachment.mimetype !== 'application/link' 39 | 40 | 41 | 47 | 48 | 49 | 50 | 51 |
52 | -------------------------------------------------------------------------------- /attachment_zipped_download/i18n/hr.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * attachment_zipped_download 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 16.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "PO-Revision-Date: 2023-02-15 21:23+0000\n" 10 | "Last-Translator: Bole \n" 11 | "Language-Team: none\n" 12 | "Language: hr\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: \n" 16 | "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " 17 | "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" 18 | "X-Generator: Weblate 4.14.1\n" 19 | 20 | #. module: attachment_zipped_download 21 | #: model:ir.model,name:attachment_zipped_download.model_ir_attachment_action_download 22 | msgid "" 23 | "\n" 24 | " Mixin to help download attachments linked to record(s).\n" 25 | " " 26 | msgstr "" 27 | 28 | #. module: attachment_zipped_download 29 | #: model:ir.model,name:attachment_zipped_download.model_ir_attachment 30 | msgid "Attachment" 31 | msgstr "Prilog" 32 | 33 | #. module: attachment_zipped_download 34 | #: model:ir.actions.server,name:attachment_zipped_download.action_attachments_download 35 | msgid "Download" 36 | msgstr "Preuzimanje" 37 | 38 | #. module: attachment_zipped_download 39 | #. odoo-python 40 | #: code:addons/attachment_zipped_download/models/ir_attachment_action_download.py:0 41 | msgid "No attachment!" 42 | msgstr "" 43 | 44 | #. module: attachment_zipped_download 45 | #. odoo-python 46 | #: code:addons/attachment_zipped_download/models/ir_attachment.py:0 47 | msgid "None attachment selected. Only binary attachments allowed." 48 | msgstr "Nema odabranih priloga. Samo binarni prilozi su dozvoljeni." 49 | 50 | #. module: attachment_zipped_download 51 | #. odoo-python 52 | #: code:addons/attachment_zipped_download/models/ir_attachment_action_download.py:0 53 | msgid "There is no document found to download." 54 | msgstr "" 55 | 56 | #. module: attachment_zipped_download 57 | #. odoo-python 58 | #: code:addons/attachment_zipped_download/controllers/main.py:0 59 | msgid "attachments.zip" 60 | msgstr "attachments.zip" 61 | -------------------------------------------------------------------------------- /document_page_reference/i18n/it.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_reference 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 15.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "PO-Revision-Date: 2023-06-23 10:10+0000\n" 10 | "Last-Translator: mymage \n" 11 | "Language-Team: none\n" 12 | "Language: it\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: \n" 16 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 17 | "X-Generator: Weblate 4.17\n" 18 | 19 | #. module: document_page_reference 20 | #: model:ir.model.fields,field_description:document_page_reference.field_document_page__content_parsed 21 | msgid "Content Parsed" 22 | msgstr "Contenuto analizzato" 23 | 24 | #. module: document_page_reference 25 | #: model:ir.model,name:document_page_reference.model_document_page 26 | msgid "Document Page" 27 | msgstr "Pagina documento" 28 | 29 | #. module: document_page_reference 30 | #: model:ir.model.fields,field_description:document_page_reference.field_document_page__reference 31 | msgid "Reference" 32 | msgstr "Riferimento" 33 | 34 | #. module: document_page_reference 35 | #. odoo-python 36 | #: code:addons/document_page_reference/models/document_page.py:0 37 | #, python-format 38 | msgid "Reference is not valid" 39 | msgstr "Il riferimento non è valido" 40 | 41 | #. module: document_page_reference 42 | #. odoo-python 43 | #: code:addons/document_page_reference/models/document_page.py:0 44 | #, python-format 45 | msgid "Reference must be unique" 46 | msgstr "Il riferimento deve essere unico" 47 | 48 | #. module: document_page_reference 49 | #: model:ir.model.fields,help:document_page_reference.field_document_page__reference 50 | msgid "Used to find the document, it can contain letters, numbers and _" 51 | msgstr "Utilizzato per trovare il documento, può contenere lettere, numeri e _" 52 | 53 | #. module: document_page_reference 54 | #: model_terms:ir.ui.view,arch_db:document_page_reference.document_page_form_view 55 | msgid "internal_reference (autofilled if not value is provided)" 56 | msgstr "internal_reference (auto compilato se non viene fornito un valore)" 57 | -------------------------------------------------------------------------------- /document_page_reference/i18n/pt.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_reference 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 16.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "PO-Revision-Date: 2024-02-28 21:33+0000\n" 10 | "Last-Translator: Peter Romão \n" 11 | "Language-Team: none\n" 12 | "Language: pt\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: \n" 16 | "Plural-Forms: nplurals=2; plural=n > 1;\n" 17 | "X-Generator: Weblate 4.17\n" 18 | 19 | #. module: document_page_reference 20 | #: model:ir.model.fields,field_description:document_page_reference.field_document_page__content_parsed 21 | msgid "Content Parsed" 22 | msgstr "Conteúdo Analisado" 23 | 24 | #. module: document_page_reference 25 | #: model:ir.model,name:document_page_reference.model_document_page 26 | msgid "Document Page" 27 | msgstr "Página do documento" 28 | 29 | #. module: document_page_reference 30 | #: model:ir.model.fields,field_description:document_page_reference.field_document_page__reference 31 | msgid "Reference" 32 | msgstr "Referência" 33 | 34 | #. module: document_page_reference 35 | #. odoo-python 36 | #: code:addons/document_page_reference/models/document_page.py:0 37 | #, python-format 38 | msgid "Reference is not valid" 39 | msgstr "A referência não é válida" 40 | 41 | #. module: document_page_reference 42 | #. odoo-python 43 | #: code:addons/document_page_reference/models/document_page.py:0 44 | #, python-format 45 | msgid "Reference must be unique" 46 | msgstr "A referência deve ser única" 47 | 48 | #. module: document_page_reference 49 | #: model:ir.model.fields,help:document_page_reference.field_document_page__reference 50 | msgid "Used to find the document, it can contain letters, numbers and _" 51 | msgstr "Usado para encontrar o documento, pode conter letras, números e _" 52 | 53 | #. module: document_page_reference 54 | #: model_terms:ir.ui.view,arch_db:document_page_reference.document_page_form_view 55 | msgid "internal_reference (autofilled if not value is provided)" 56 | msgstr "" 57 | "internal_reference (preenchimento automático se o valor não for fornecido)" 58 | -------------------------------------------------------------------------------- /document_page_reference/i18n/es.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_reference 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 16.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "PO-Revision-Date: 2023-09-05 22:41+0000\n" 10 | "Last-Translator: Ivorra78 \n" 11 | "Language-Team: none\n" 12 | "Language: es\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: \n" 16 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 17 | "X-Generator: Weblate 4.17\n" 18 | 19 | #. module: document_page_reference 20 | #: model:ir.model.fields,field_description:document_page_reference.field_document_page__content_parsed 21 | msgid "Content Parsed" 22 | msgstr "Contenido procesado" 23 | 24 | #. module: document_page_reference 25 | #: model:ir.model,name:document_page_reference.model_document_page 26 | msgid "Document Page" 27 | msgstr "Página de Documento" 28 | 29 | #. module: document_page_reference 30 | #: model:ir.model.fields,field_description:document_page_reference.field_document_page__reference 31 | msgid "Reference" 32 | msgstr "Referencia" 33 | 34 | #. module: document_page_reference 35 | #. odoo-python 36 | #: code:addons/document_page_reference/models/document_page.py:0 37 | #, python-format 38 | msgid "Reference is not valid" 39 | msgstr "La referencia no es válida" 40 | 41 | #. module: document_page_reference 42 | #. odoo-python 43 | #: code:addons/document_page_reference/models/document_page.py:0 44 | #, python-format 45 | msgid "Reference must be unique" 46 | msgstr "La referencia debe ser única" 47 | 48 | #. module: document_page_reference 49 | #: model:ir.model.fields,help:document_page_reference.field_document_page__reference 50 | msgid "Used to find the document, it can contain letters, numbers and _" 51 | msgstr "" 52 | "Se utiliza para encontrar el documento, puede contener letras, números y _" 53 | 54 | #. module: document_page_reference 55 | #: model_terms:ir.ui.view,arch_db:document_page_reference.document_page_form_view 56 | msgid "internal_reference (autofilled if not value is provided)" 57 | msgstr "internal_reference (autocompletado si no se proporciona ningún valor)" 58 | -------------------------------------------------------------------------------- /document_knowledge/views/document_knowledge.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Documents 5 | knowledge-documents 6 | ir.attachment 7 | kanban,list,form 8 | {'search_default_user_documents': True} 9 | 10 | 11 | Documents search view: additional filters 12 | ir.attachment 13 | 14 | 15 | 16 | 17 | 18 | 23 | 24 | 29 | 30 | 31 | 32 | 33 | 34 | 41 | 48 | 55 | 56 | -------------------------------------------------------------------------------- /document_page_project/i18n/it.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_project 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 15.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "PO-Revision-Date: 2022-12-28 22:45+0000\n" 10 | "Last-Translator: mymage \n" 11 | "Language-Team: none\n" 12 | "Language: it\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: \n" 16 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 17 | "X-Generator: Weblate 4.14.1\n" 18 | 19 | #. module: document_page_project 20 | #: model_terms:ir.ui.view,arch_db:document_page_project.view_project_kanban 21 | msgid "Wiki Pages" 22 | msgstr "Pagine Wiki" 23 | 24 | #. module: document_page_project 25 | #: model_terms:ir.actions.act_window,help:document_page_project.action_document_page_projects 26 | msgid "Click to create a new web page." 27 | msgstr "Fare clic per creare una nuova pagina web." 28 | 29 | #. module: document_page_project 30 | #: model:ir.model,name:document_page_project.model_document_page 31 | msgid "Document Page" 32 | msgstr "Pagina documento" 33 | 34 | #. module: document_page_project 35 | #: model:ir.model.fields,field_description:document_page_project.field_project_project__document_page_count 36 | msgid "Document Page Count" 37 | msgstr "Conteggio pagina documento" 38 | 39 | #. module: document_page_project 40 | #: model:ir.model,name:document_page_project.model_project_project 41 | #: model:ir.model.fields,field_description:document_page_project.field_document_page__project_id 42 | msgid "Project" 43 | msgstr "Progetto" 44 | 45 | #. module: document_page_project 46 | #: model:ir.actions.act_window,name:document_page_project.action_document_page_projects 47 | msgid "Project Wiki" 48 | msgstr "Progetto Wiki" 49 | 50 | #. module: document_page_project 51 | #: model:ir.model.fields,field_description:document_page_project.field_project_project__document_page_ids 52 | msgid "Wiki" 53 | msgstr "Wiki" 54 | 55 | #. module: document_page_project 56 | #: model_terms:ir.ui.view,arch_db:document_page_project.edit_project 57 | msgid "Wiki Pages" 58 | msgstr "Pagine Wiki" 59 | -------------------------------------------------------------------------------- /attachment_zipped_download/i18n/pt.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * attachment_zipped_download 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 16.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "PO-Revision-Date: 2024-02-28 21:33+0000\n" 10 | "Last-Translator: Peter Romão \n" 11 | "Language-Team: none\n" 12 | "Language: pt\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: \n" 16 | "Plural-Forms: nplurals=2; plural=n > 1;\n" 17 | "X-Generator: Weblate 4.17\n" 18 | 19 | #. module: attachment_zipped_download 20 | #: model:ir.model,name:attachment_zipped_download.model_ir_attachment_action_download 21 | msgid "" 22 | "\n" 23 | " Mixin to help download attachments linked to record(s).\n" 24 | " " 25 | msgstr "" 26 | "\n" 27 | " Mixin para ajudar a baixar anexos vinculados ao(s) registo(s).\n" 28 | " " 29 | 30 | #. module: attachment_zipped_download 31 | #: model:ir.model,name:attachment_zipped_download.model_ir_attachment 32 | msgid "Attachment" 33 | msgstr "Anexo" 34 | 35 | #. module: attachment_zipped_download 36 | #: model:ir.actions.server,name:attachment_zipped_download.action_attachments_download 37 | msgid "Download" 38 | msgstr "Transferir" 39 | 40 | #. module: attachment_zipped_download 41 | #. odoo-python 42 | #: code:addons/attachment_zipped_download/models/ir_attachment_action_download.py:0 43 | msgid "No attachment!" 44 | msgstr "Sem Anexo!" 45 | 46 | #. module: attachment_zipped_download 47 | #. odoo-python 48 | #: code:addons/attachment_zipped_download/models/ir_attachment.py:0 49 | msgid "None attachment selected. Only binary attachments allowed." 50 | msgstr "Nenhum anexo selecionado. Somente anexos binários permitidos." 51 | 52 | #. module: attachment_zipped_download 53 | #. odoo-python 54 | #: code:addons/attachment_zipped_download/models/ir_attachment_action_download.py:0 55 | msgid "There is no document found to download." 56 | msgstr "Não há nenhum documento encontrado para transferir." 57 | 58 | #. module: attachment_zipped_download 59 | #. odoo-python 60 | #: code:addons/attachment_zipped_download/controllers/main.py:0 61 | msgid "attachments.zip" 62 | msgstr "anexos.zip" 63 | -------------------------------------------------------------------------------- /document_page_project/i18n/es.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_project 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 13.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "PO-Revision-Date: 2023-10-09 07:41+0000\n" 10 | "Last-Translator: Ivorra78 \n" 11 | "Language-Team: none\n" 12 | "Language: es\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: \n" 16 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 17 | "X-Generator: Weblate 4.17\n" 18 | 19 | #. module: document_page_project 20 | #: model_terms:ir.ui.view,arch_db:document_page_project.view_project_kanban 21 | msgid "Wiki Pages" 22 | msgstr "Páginas Wiki" 23 | 24 | #. module: document_page_project 25 | #: model_terms:ir.actions.act_window,help:document_page_project.action_document_page_projects 26 | msgid "Click to create a new web page." 27 | msgstr "Click para crear una página web nueva." 28 | 29 | #. module: document_page_project 30 | #: model:ir.model,name:document_page_project.model_document_page 31 | msgid "Document Page" 32 | msgstr "Página Documento" 33 | 34 | #. module: document_page_project 35 | #: model:ir.model.fields,field_description:document_page_project.field_project_project__document_page_count 36 | msgid "Document Page Count" 37 | msgstr "Conteo de páginas de documento" 38 | 39 | #. module: document_page_project 40 | #: model:ir.model,name:document_page_project.model_project_project 41 | #: model:ir.model.fields,field_description:document_page_project.field_document_page__project_id 42 | msgid "Project" 43 | msgstr "Proyecto" 44 | 45 | #. module: document_page_project 46 | #: model:ir.actions.act_window,name:document_page_project.action_document_page_projects 47 | msgid "Project Wiki" 48 | msgstr "Proyecto Wiki" 49 | 50 | #. module: document_page_project 51 | #: model:ir.model.fields,field_description:document_page_project.field_project_project__document_page_ids 52 | msgid "Wiki" 53 | msgstr "Wiki" 54 | 55 | #. module: document_page_project 56 | #: model_terms:ir.ui.view,arch_db:document_page_project.edit_project 57 | msgid "Wiki Pages" 58 | msgstr "Páginas Wiki" 59 | -------------------------------------------------------------------------------- /attachment_zipped_download/i18n/it.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * attachment_zipped_download 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 16.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "PO-Revision-Date: 2023-09-20 19:38+0000\n" 10 | "Last-Translator: mymage \n" 11 | "Language-Team: none\n" 12 | "Language: it\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: \n" 16 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 17 | "X-Generator: Weblate 4.17\n" 18 | 19 | #. module: attachment_zipped_download 20 | #: model:ir.model,name:attachment_zipped_download.model_ir_attachment_action_download 21 | msgid "" 22 | "\n" 23 | " Mixin to help download attachments linked to record(s).\n" 24 | " " 25 | msgstr "" 26 | "\n" 27 | " Mixin per aiutare a scaricare gli allegati collegati ai record.\n" 28 | " " 29 | 30 | #. module: attachment_zipped_download 31 | #: model:ir.model,name:attachment_zipped_download.model_ir_attachment 32 | msgid "Attachment" 33 | msgstr "Allegato" 34 | 35 | #. module: attachment_zipped_download 36 | #: model:ir.actions.server,name:attachment_zipped_download.action_attachments_download 37 | msgid "Download" 38 | msgstr "Scarica" 39 | 40 | #. module: attachment_zipped_download 41 | #. odoo-python 42 | #: code:addons/attachment_zipped_download/models/ir_attachment_action_download.py:0 43 | msgid "No attachment!" 44 | msgstr "Nessun allegato!" 45 | 46 | #. module: attachment_zipped_download 47 | #. odoo-python 48 | #: code:addons/attachment_zipped_download/models/ir_attachment.py:0 49 | msgid "None attachment selected. Only binary attachments allowed." 50 | msgstr "Nessun allegato selezionato. Consentiti solo allegati binari." 51 | 52 | #. module: attachment_zipped_download 53 | #. odoo-python 54 | #: code:addons/attachment_zipped_download/models/ir_attachment_action_download.py:0 55 | msgid "There is no document found to download." 56 | msgstr "Non sono stati trovati documenti da scaricare." 57 | 58 | #. module: attachment_zipped_download 59 | #. odoo-python 60 | #: code:addons/attachment_zipped_download/controllers/main.py:0 61 | msgid "attachments.zip" 62 | msgstr "attachments.zip" 63 | -------------------------------------------------------------------------------- /document_page_project/i18n/pt.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_project 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 16.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "PO-Revision-Date: 2024-07-27 04:58+0000\n" 10 | "Last-Translator: Peter Romão \n" 11 | "Language-Team: none\n" 12 | "Language: pt\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: \n" 16 | "Plural-Forms: nplurals=2; plural=n > 1;\n" 17 | "X-Generator: Weblate 5.6.2\n" 18 | 19 | #. module: document_page_project 20 | #: model_terms:ir.ui.view,arch_db:document_page_project.view_project_kanban 21 | msgid "Wiki Pages" 22 | msgstr "Páginas Wiki" 23 | 24 | #. module: document_page_project 25 | #: model_terms:ir.actions.act_window,help:document_page_project.action_document_page_projects 26 | msgid "Click to create a new web page." 27 | msgstr "Clique para criar uma nova página web." 28 | 29 | #. module: document_page_project 30 | #: model:ir.model,name:document_page_project.model_document_page 31 | msgid "Document Page" 32 | msgstr "Página do Documento" 33 | 34 | #. module: document_page_project 35 | #: model:ir.model.fields,field_description:document_page_project.field_project_project__document_page_count 36 | msgid "Document Page Count" 37 | msgstr "Contagem de Páginas do Documento" 38 | 39 | #. module: document_page_project 40 | #: model:ir.model,name:document_page_project.model_project_project 41 | #: model:ir.model.fields,field_description:document_page_project.field_document_page__project_id 42 | msgid "Project" 43 | msgstr "Projeto" 44 | 45 | #. module: document_page_project 46 | #: model:ir.actions.act_window,name:document_page_project.action_document_page_projects 47 | msgid "Project Wiki" 48 | msgstr "Wiki do Projeto" 49 | 50 | #. module: document_page_project 51 | #: model:ir.model.fields,field_description:document_page_project.field_project_project__document_page_ids 52 | msgid "Wiki" 53 | msgstr "Wiki" 54 | 55 | #. module: document_page_project 56 | #: model_terms:ir.ui.view,arch_db:document_page_project.edit_project 57 | msgid "Wiki Pages" 58 | msgstr "Páginas Wiki" 59 | -------------------------------------------------------------------------------- /attachment_zipped_download/models/ir_attachment_action_download.py: -------------------------------------------------------------------------------- 1 | # Copyright 2023 Foodles (https://www.foodles.com/) 2 | # @author Pierre Verkest 3 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). 4 | from odoo import models 5 | 6 | 7 | class IrAttachmentActionDownloadMixin(models.AbstractModel): 8 | _name = "ir.attachment.action_download" 9 | _description = """ 10 | Mixin to help download attachments linked to record(s). 11 | """ 12 | 13 | def _get_downloadable_attachments(self): 14 | """Give a chance to easily overwrite this method 15 | on sub modules to limit restict attachement able to downlaods 16 | 17 | In some case we probably want the user download some specific 18 | document that are probably related to the current model 19 | 20 | By default return all attachment link the the record. 21 | """ 22 | return self.env["ir.attachment"].search( 23 | [("res_model", "=", self._name), ("res_id", "in", self.ids)] 24 | ) 25 | 26 | def action_download_attachments(self): 27 | """Return action to: 28 | * emit a warning message if no attachment found 29 | * download a file if only 1 file found 30 | * zip and download the list of attachment returns by 31 | `_get_downloadable_attachments` 32 | """ 33 | attachments = self._get_downloadable_attachments() 34 | if not attachments: 35 | title = self.env._("No attachment!") 36 | message = self.env._("There is no document found to download.") 37 | return { 38 | "type": "ir.actions.client", 39 | "tag": "display_notification", 40 | "params": { 41 | "type": "warning", 42 | "title": title, 43 | "message": message, 44 | "sticky": True, 45 | }, 46 | } 47 | 48 | if len(attachments) == 1: 49 | return { 50 | "target": "self", 51 | "type": "ir.actions.act_url", 52 | "url": f"/web/content/{attachments.id}?download=1", 53 | } 54 | else: 55 | return attachments.action_attachments_download() 56 | -------------------------------------------------------------------------------- /document_page_project/i18n/he_IL.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_project 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 13.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "PO-Revision-Date: 2020-10-19 08:08+0000\n" 10 | "Last-Translator: Yves Goldberg \n" 11 | "Language-Team: none\n" 12 | "Language: he_IL\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: \n" 16 | "Plural-Forms: nplurals=4; plural=(n == 1) ? 0 : ((n == 2) ? 1 : ((n > 10 && " 17 | "n % 10 == 0) ? 2 : 3));\n" 18 | "X-Generator: Weblate 3.10\n" 19 | 20 | #. module: document_page_project 21 | #: model_terms:ir.ui.view,arch_db:document_page_project.view_project_kanban 22 | msgid "Wiki Pages" 23 | msgstr "Wiki דפי" 24 | 25 | #. module: document_page_project 26 | #: model_terms:ir.actions.act_window,help:document_page_project.action_document_page_projects 27 | msgid "Click to create a new web page." 28 | msgstr "לחץ ליצירת עמוד נחיתה." 29 | 30 | #. module: document_page_project 31 | #: model:ir.model,name:document_page_project.model_document_page 32 | msgid "Document Page" 33 | msgstr "עמוד המסמך" 34 | 35 | #. module: document_page_project 36 | #: model:ir.model.fields,field_description:document_page_project.field_project_project__document_page_count 37 | msgid "Document Page Count" 38 | msgstr "מספור עמודים במסמכים" 39 | 40 | #. module: document_page_project 41 | #: model:ir.model,name:document_page_project.model_project_project 42 | #: model:ir.model.fields,field_description:document_page_project.field_document_page__project_id 43 | msgid "Project" 44 | msgstr "פרוייקט" 45 | 46 | #. module: document_page_project 47 | #: model:ir.actions.act_window,name:document_page_project.action_document_page_projects 48 | msgid "Project Wiki" 49 | msgstr "תיקי Wiki" 50 | 51 | #. module: document_page_project 52 | #: model:ir.model.fields,field_description:document_page_project.field_project_project__document_page_ids 53 | #, fuzzy 54 | msgid "Wiki" 55 | msgstr "Wiki" 56 | 57 | #. module: document_page_project 58 | #: model_terms:ir.ui.view,arch_db:document_page_project.edit_project 59 | msgid "Wiki Pages" 60 | msgstr "דפי Wiki" 61 | -------------------------------------------------------------------------------- /document_page_project/i18n/hr.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_page_project 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 12.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "PO-Revision-Date: 2019-11-13 17:34+0000\n" 10 | "Last-Translator: Bole \n" 11 | "Language-Team: none\n" 12 | "Language: hr\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: \n" 16 | "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " 17 | "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" 18 | "X-Generator: Weblate 3.8\n" 19 | 20 | #. module: document_page_project 21 | #: model_terms:ir.ui.view,arch_db:document_page_project.view_project_kanban 22 | msgid "Wiki Pages" 23 | msgstr "Wiki Stranice" 24 | 25 | #. module: document_page_project 26 | #: model_terms:ir.actions.act_window,help:document_page_project.action_document_page_projects 27 | msgid "Click to create a new web page." 28 | msgstr "Kliknite za kreiranje nove web stranice." 29 | 30 | #. module: document_page_project 31 | #: model:ir.model,name:document_page_project.model_document_page 32 | msgid "Document Page" 33 | msgstr "Dokumenti" 34 | 35 | #. module: document_page_project 36 | #: model:ir.model.fields,field_description:document_page_project.field_project_project__document_page_count 37 | msgid "Document Page Count" 38 | msgstr "Broj stranica sa dokumentima" 39 | 40 | #. module: document_page_project 41 | #: model:ir.model,name:document_page_project.model_project_project 42 | #: model:ir.model.fields,field_description:document_page_project.field_document_page__project_id 43 | msgid "Project" 44 | msgstr "Projekt" 45 | 46 | #. module: document_page_project 47 | #: model:ir.actions.act_window,name:document_page_project.action_document_page_projects 48 | msgid "Project Wiki" 49 | msgstr "Wiki Projekta" 50 | 51 | #. module: document_page_project 52 | #: model:ir.model.fields,field_description:document_page_project.field_project_project__document_page_ids 53 | msgid "Wiki" 54 | msgstr "Wiki" 55 | 56 | #. module: document_page_project 57 | #: model_terms:ir.ui.view,arch_db:document_page_project.edit_project 58 | msgid "Wiki Pages" 59 | msgstr "Wiki stranice" 60 | -------------------------------------------------------------------------------- /attachment_zipped_download/i18n/es.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * attachment_zipped_download 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 14.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "POT-Creation-Date: 2022-03-15 14:04+0000\n" 10 | "PO-Revision-Date: 2023-09-07 16:37+0000\n" 11 | "Last-Translator: Ivorra78 \n" 12 | "Language-Team: \n" 13 | "Language: es\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 18 | "X-Generator: Weblate 4.17\n" 19 | 20 | #. module: attachment_zipped_download 21 | #: model:ir.model,name:attachment_zipped_download.model_ir_attachment_action_download 22 | msgid "" 23 | "\n" 24 | " Mixin to help download attachments linked to record(s).\n" 25 | " " 26 | msgstr "" 27 | "\n" 28 | " Mixin para ayudar a descargar archivos adjuntos vinculados a " 29 | "registros.\n" 30 | " " 31 | 32 | #. module: attachment_zipped_download 33 | #: model:ir.model,name:attachment_zipped_download.model_ir_attachment 34 | msgid "Attachment" 35 | msgstr "Adjunto" 36 | 37 | #. module: attachment_zipped_download 38 | #: model:ir.actions.server,name:attachment_zipped_download.action_attachments_download 39 | msgid "Download" 40 | msgstr "Descargar" 41 | 42 | #. module: attachment_zipped_download 43 | #. odoo-python 44 | #: code:addons/attachment_zipped_download/models/ir_attachment_action_download.py:0 45 | msgid "No attachment!" 46 | msgstr "¡No hay adjuntos!" 47 | 48 | #. module: attachment_zipped_download 49 | #. odoo-python 50 | #: code:addons/attachment_zipped_download/models/ir_attachment.py:0 51 | msgid "None attachment selected. Only binary attachments allowed." 52 | msgstr "" 53 | "No se seleccionó ningún archivo adjunto. Solo se permiten archivos adjuntos " 54 | "binarios." 55 | 56 | #. module: attachment_zipped_download 57 | #. odoo-python 58 | #: code:addons/attachment_zipped_download/models/ir_attachment_action_download.py:0 59 | msgid "There is no document found to download." 60 | msgstr "No se encontró ningún documento para descargar." 61 | 62 | #. module: attachment_zipped_download 63 | #. odoo-python 64 | #: code:addons/attachment_zipped_download/controllers/main.py:0 65 | msgid "attachments.zip" 66 | msgstr "adjuntos.zip" 67 | -------------------------------------------------------------------------------- /document_page_tag/views/document_page.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | document.page 5 | 6 | 7 | 8 | 13 | 14 | 15 | 16 | 17 | document.page 18 | 19 | 20 | 21 | 22 | 23 | 24 | 31 | 32 | 33 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | document_page.tags.tree 45 | document.page 46 | 47 | list 48 | 49 | 50 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /document_knowledge/views/res_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | res.config.settings.view.form.inherit.knowledge 5 | res.config.settings 6 | 7 | 8 | 9 | 10 | 15 | 19 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | Settings 33 | ir.actions.act_window 34 | res.config.settings 35 | 36 | form 37 | inline 38 | {'module': 'document_knowledge'} 39 | 40 | 47 | 54 | 55 | -------------------------------------------------------------------------------- /document_page/wizard/document_page_create_menu.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2004-2010 Tiny SPRL (). 2 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 3 | 4 | from odoo import api, fields, models 5 | 6 | 7 | class DocumentPageCreateMenu(models.TransientModel): 8 | """Create Menu.""" 9 | 10 | _name = "document.page.create.menu" 11 | _description = "Wizard Create Menu" 12 | 13 | menu_name = fields.Char(required=True) 14 | menu_parent_id = fields.Many2one("ir.ui.menu", "Parent Menu", required=True) 15 | 16 | @api.model 17 | def default_get(self, fields_list): 18 | """Get Page name of the menu.""" 19 | res = super().default_get(fields_list) 20 | page_id = self.env.context.get("active_id") 21 | obj_page = self.env["document.page"] 22 | page = obj_page.browse(page_id) 23 | res["menu_name"] = page.name 24 | return res 25 | 26 | def document_page_menu_create(self): 27 | """Menu creation.""" 28 | obj_page = self.env["document.page"] 29 | obj_menu = self.env["ir.ui.menu"] 30 | obj_action = self.env["ir.actions.act_window"] 31 | obj_model_data = self.env["ir.model.data"] 32 | page_id = self.env.context.get("active_id", False) 33 | page = obj_page.browse(page_id) 34 | 35 | data = self[0] 36 | view_id = obj_model_data._xmlid_to_res_id("document_page.view_wiki_menu_form") 37 | value = { 38 | "name": "Document Page", 39 | "view_mode": "form,list", 40 | "res_model": "document.page", 41 | "view_id": view_id, 42 | "type": "ir.actions.act_window", 43 | "target": "current", 44 | } 45 | value["domain"] = "[('parent_id','=',%d)]" % page.id 46 | value["res_id"] = page.id 47 | 48 | # only the super user is allowed to create menu due to security rules 49 | # on ir.values 50 | # see.: http://goo.gl/Y99S7V 51 | action_id = obj_action.sudo().create(value) 52 | 53 | menu_id = obj_menu.sudo().create( 54 | { 55 | "name": data.menu_name, 56 | "parent_id": data.menu_parent_id.id, 57 | "action": "ir.actions.act_window," + str(action_id.id), 58 | } 59 | ) 60 | if page.menu_id: 61 | page.menu_id.unlink() 62 | page.write({"menu_id": menu_id.id}) 63 | return {"type": "ir.actions.client", "tag": "reload"} 64 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: tests 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - "18.0*" 7 | push: 8 | branches: 9 | - "18.0" 10 | - "18.0-ocabot-*" 11 | 12 | jobs: 13 | unreleased-deps: 14 | runs-on: ubuntu-latest 15 | name: Detect unreleased dependencies 16 | steps: 17 | - uses: actions/checkout@v4 18 | - run: | 19 | for reqfile in requirements.txt test-requirements.txt ; do 20 | if [ -f ${reqfile} ] ; then 21 | result=0 22 | # reject non-comment lines that contain a / (i.e. URLs, relative paths) 23 | grep "^[^#].*/" ${reqfile} || result=$? 24 | if [ $result -eq 0 ] ; then 25 | echo "Unreleased dependencies found in ${reqfile}." 26 | exit 1 27 | fi 28 | fi 29 | done 30 | test: 31 | runs-on: ubuntu-22.04 32 | container: ${{ matrix.container }} 33 | name: ${{ matrix.name }} 34 | strategy: 35 | fail-fast: false 36 | matrix: 37 | include: 38 | - container: ghcr.io/oca/oca-ci/py3.10-odoo18.0:latest 39 | name: test with Odoo 40 | - container: ghcr.io/oca/oca-ci/py3.10-ocb18.0:latest 41 | name: test with OCB 42 | makepot: "true" 43 | services: 44 | postgres: 45 | image: postgres:12.0 46 | env: 47 | POSTGRES_USER: odoo 48 | POSTGRES_PASSWORD: odoo 49 | POSTGRES_DB: odoo 50 | ports: 51 | - 5432:5432 52 | env: 53 | OCA_ENABLE_CHECKLOG_ODOO: "1" 54 | steps: 55 | - uses: actions/checkout@v4 56 | with: 57 | persist-credentials: false 58 | - name: Install addons and dependencies 59 | run: oca_install_addons 60 | - name: Check licenses 61 | run: manifestoo -d . check-licenses 62 | - name: Check development status 63 | run: manifestoo -d . check-dev-status --default-dev-status=Beta 64 | - name: Initialize test db 65 | run: oca_init_test_database 66 | - name: Run tests 67 | run: oca_run_tests 68 | - uses: codecov/codecov-action@v4 69 | with: 70 | token: ${{ secrets.CODECOV_TOKEN }} 71 | - name: Update .pot files 72 | run: oca_export_and_push_pot https://x-access-token:${{ secrets.GIT_PUSH_TOKEN }}@github.com/${{ github.repository }} 73 | if: ${{ matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == 'OCA' }} 74 | -------------------------------------------------------------------------------- /document_page_approval/security/document_page_security.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Approver 5 | 6 | 10 | 11 | 12 | 13 | 14 | 15 | Change Request Global 16 | 17 | 21 | ['|',('state','=','approved'),('create_uid','=',user.id)] 24 | 25 | 26 | 27 | 28 | 29 | 30 | Change Request Approver 31 | 32 | 33 | [('state','!=','draft')] 34 | 35 | 36 | 37 | 38 | 39 | 40 | Change Request Manager 41 | 42 | 46 | [(1, '=', 1)] 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /document_page/tests/test_document_page.py: -------------------------------------------------------------------------------- 1 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 2 | from odoo.tests import common 3 | 4 | 5 | class TestDocumentPage(common.TransactionCase): 6 | def setUp(self): 7 | super().setUp() 8 | self.page_obj = self.env["document.page"] 9 | self.history_obj = self.env["document.page.history"] 10 | self.category1 = self.env.ref("document_page.demo_category1") 11 | self.page1 = self.env.ref("document_page.demo_page1") 12 | 13 | def test_page_creation(self): 14 | page = self.page_obj.create( 15 | { 16 | "name": "Test Page 1", 17 | "parent_id": self.category1.id, 18 | "content": "

Test content

", 19 | } 20 | ) 21 | self.assertEqual(page.content, "

Test content

") 22 | self.assertEqual(len(page.history_ids), 1) 23 | page.content = "

New content for Demo Page

" 24 | self.assertEqual(len(page.history_ids), 2) 25 | 26 | def test_category_template(self): 27 | page = self.page_obj.create( 28 | {"name": "Test Page 2", "parent_id": self.category1.id} 29 | ) 30 | page._onchange_parent_id() 31 | self.assertEqual(page.content, self.category1.template) 32 | 33 | def test_page_history_diff(self): 34 | page = self.page_obj.create( 35 | {"name": "Test Page 3", "content": "
Test content
"} 36 | ) 37 | page.content = "
New content
" 38 | self.assertIsNotNone(page.history_ids[0].diff) 39 | 40 | def test_page_link(self): 41 | page = self.page_obj.create( 42 | {"name": "Test Page 3", "content": "
Test content
"} 43 | ) 44 | self.assertEqual( 45 | page.backend_url, 46 | f"/web#id={page.id}&model=document.page&view_type=form", 47 | ) 48 | menu = self.env.ref("document_knowledge.menu_document") 49 | page.menu_id = menu 50 | self.assertEqual( 51 | page.backend_url, 52 | f"/web#id={page.id}&model=document.page&view_type=form&action={menu.action.id}", 53 | ) 54 | 55 | def test_page_copy(self): 56 | page = self.page_obj.create( 57 | {"name": "Test Page 3", "content": "
Test content
"} 58 | ) 59 | page_copy = page.copy() 60 | self.assertEqual(page_copy.name, page.name + " (copy)") 61 | self.assertEqual(page_copy.content, page.content) 62 | self.assertEqual(page_copy.draft_name, "1.0") 63 | self.assertEqual(page_copy.draft_summary, "summary") 64 | -------------------------------------------------------------------------------- /attachment_zipped_download/tests/test_attachment_zipped_download.py: -------------------------------------------------------------------------------- 1 | # Copyright 2022-2024 Tecnativa - Víctor Martínez 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). 3 | import base64 4 | 5 | from odoo.exceptions import AccessError 6 | from odoo.tests import HttpCase, new_test_user 7 | 8 | from odoo.addons.base.tests.common import BaseCommon 9 | 10 | 11 | class TestAttachmentZippedDownloadBase(BaseCommon): 12 | @classmethod 13 | def _create_attachment(cls, user, name, model=False, res_id=False): 14 | return ( 15 | cls.env["ir.attachment"] 16 | .with_user(user) 17 | .create( 18 | { 19 | "name": name, 20 | "datas": base64.b64encode(b"\xff data"), 21 | "res_model": model, 22 | "res_id": res_id, 23 | } 24 | ) 25 | ) 26 | 27 | 28 | class TestAttachmentZippedDownload(HttpCase, TestAttachmentZippedDownloadBase): 29 | @classmethod 30 | def setUpClass(cls): 31 | super().setUpClass() 32 | cls.user = new_test_user(cls.env, login="test-user") 33 | test_1 = cls._create_attachment(cls.user, "test1.txt") 34 | test_2 = cls._create_attachment(cls.user, "test2.txt") 35 | cls.attachments = test_1 + test_2 36 | 37 | def test_action_attachments_download(self): 38 | self.authenticate("test-user", "test-user") 39 | res = self.attachments.action_attachments_download() 40 | response = self.url_open(res["url"], timeout=20) 41 | self.assertEqual(response.status_code, 200) 42 | 43 | 44 | class TestAttachmentZipped(TestAttachmentZippedDownloadBase): 45 | @classmethod 46 | def setUpClass(cls): 47 | super().setUpClass() 48 | cls.user = new_test_user( 49 | cls.env, 50 | login="test-user", 51 | password="test-user", 52 | groups="base.group_user,base.group_partner_manager", 53 | ) 54 | test_1 = cls._create_attachment(cls.user, "test1.txt") 55 | test_2 = cls._create_attachment(cls.user, "test2.txt") 56 | test_3 = cls._create_attachment( 57 | cls.user, 58 | "test3.txt", 59 | model="res.partner", 60 | res_id=cls.user.partner_id.id, 61 | ) 62 | cls.attachments = test_1 + test_2 + test_3 63 | 64 | def test_create_temp_zip(self): 65 | res = self.attachments._create_temp_zip() 66 | self.assertTrue(res) 67 | 68 | def test_create_temp_zip_access_denined(self): 69 | attachments = self.attachments | self._create_attachment( 70 | self.uid, 71 | "test4.txt", 72 | model="ir.ui.view", 73 | res_id=self.env.ref("base.view_view_form").id, 74 | ) 75 | with self.assertRaises(AccessError): 76 | attachments._create_temp_zip() 77 | -------------------------------------------------------------------------------- /document_page_tag/views/document_page_tag.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | document.page.tag.search 5 | document.page.tag 6 | 7 | 8 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | document.page.tag.form 21 | document.page.tag 22 | 23 |
24 | 25 | 31 | 32 | 33 | 34 |
35 |
40 | 41 | 42 | 43 |
44 |
45 |
46 |
47 | 48 | 49 | document.page.tag.tree 50 | document.page.tag 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | Tags 61 | ir.actions.act_window 62 | document.page.tag 63 | list,form 64 | 65 | 66 | 73 |
74 | -------------------------------------------------------------------------------- /document_url/i18n/document_url.pot: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * document_url 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 18.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "Last-Translator: \n" 10 | "Language-Team: \n" 11 | "MIME-Version: 1.0\n" 12 | "Content-Type: text/plain; charset=UTF-8\n" 13 | "Content-Transfer-Encoding: \n" 14 | "Plural-Forms: \n" 15 | 16 | #. module: document_url 17 | #: model_terms:ir.ui.view,arch_db:document_url.view_ir_attachment_add_url_form 18 | msgid "Add" 19 | msgstr "" 20 | 21 | #. module: document_url 22 | #. odoo-javascript 23 | #: code:addons/document_url/static/src/xml/url.xml:0 24 | #: model:ir.actions.act_window,name:document_url.action_ir_attachment_add_url 25 | #: model_terms:ir.ui.view,arch_db:document_url.view_ir_attachment_add_url_form 26 | msgid "Add URL" 27 | msgstr "" 28 | 29 | #. module: document_url 30 | #. odoo-javascript 31 | #: code:addons/document_url/static/src/xml/url.xml:0 32 | msgid "Attach files" 33 | msgstr "" 34 | 35 | #. module: document_url 36 | #: model:ir.model,name:document_url.model_ir_attachment 37 | msgid "Attachment" 38 | msgstr "" 39 | 40 | #. module: document_url 41 | #: model_terms:ir.ui.view,arch_db:document_url.view_ir_attachment_add_url_form 42 | msgid "Cancel" 43 | msgstr "" 44 | 45 | #. module: document_url 46 | #: model:ir.model.fields,field_description:document_url.field_ir_attachment_add_url__create_uid 47 | msgid "Created by" 48 | msgstr "" 49 | 50 | #. module: document_url 51 | #: model:ir.model.fields,field_description:document_url.field_ir_attachment_add_url__create_date 52 | msgid "Created on" 53 | msgstr "" 54 | 55 | #. module: document_url 56 | #: model:ir.model.fields,field_description:document_url.field_ir_attachment_add_url__display_name 57 | msgid "Display Name" 58 | msgstr "" 59 | 60 | #. module: document_url 61 | #. odoo-javascript 62 | #: code:addons/document_url/static/src/js/url.esm.js:0 63 | msgid "Do you really want to delete \"%s\"?" 64 | msgstr "" 65 | 66 | #. module: document_url 67 | #: model:ir.model.fields,field_description:document_url.field_ir_attachment_add_url__id 68 | msgid "ID" 69 | msgstr "" 70 | 71 | #. module: document_url 72 | #: model:ir.model.fields,field_description:document_url.field_ir_attachment_add_url__write_uid 73 | msgid "Last Updated by" 74 | msgstr "" 75 | 76 | #. module: document_url 77 | #: model:ir.model.fields,field_description:document_url.field_ir_attachment_add_url__write_date 78 | msgid "Last Updated on" 79 | msgstr "" 80 | 81 | #. module: document_url 82 | #: model:ir.model.fields,field_description:document_url.field_ir_attachment_add_url__name 83 | msgid "Name" 84 | msgstr "" 85 | 86 | #. module: document_url 87 | #: model:ir.model.fields,field_description:document_url.field_ir_attachment_add_url__url 88 | msgid "URL" 89 | msgstr "" 90 | 91 | #. module: document_url 92 | #: model:ir.model,name:document_url.model_ir_attachment_add_url 93 | msgid "Wizard to add URL attachment" 94 | msgstr "" 95 | --------------------------------------------------------------------------------