diff --git a/attribute_set/__manifest__.py b/attribute_set/__manifest__.py index 0d36ad572..5bcfd3c02 100644 --- a/attribute_set/__manifest__.py +++ b/attribute_set/__manifest__.py @@ -1,6 +1,6 @@ { "name": "Attribute Set", - "version": "15.0.1.0.2", + "version": "15.0.1.0.3", "category": "Generic Modules/Others", "license": "AGPL-3", "author": "Akretion,Odoo Community Association (OCA)", diff --git a/attribute_set/static/description/index.html b/attribute_set/static/description/index.html index ac61c157a..c9f2cd95c 100644 --- a/attribute_set/static/description/index.html +++ b/attribute_set/static/description/index.html @@ -8,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -274,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -300,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -440,7 +441,9 @@

Contributors

Maintainers

This module is maintained by the OCA.

-Odoo Community Association + +Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

diff --git a/attribute_set/views/attribute_group_view.xml b/attribute_set/views/attribute_group_view.xml index bd8f60bb7..993d381f9 100644 --- a/attribute_set/views/attribute_group_view.xml +++ b/attribute_set/views/attribute_group_view.xml @@ -35,4 +35,18 @@ + + Attribute Groups + attribute.group + tree,form + + {} + + + diff --git a/product_attribute_set/README.rst b/product_attribute_set/README.rst new file mode 100644 index 000000000..375f2b033 --- /dev/null +++ b/product_attribute_set/README.rst @@ -0,0 +1,88 @@ +===================== +Product Attribute Set +===================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:3bf56ab75c5153ecdfad2b853b20e5f10eb82c896e7fd8b61cd05f8e13ecd2db + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fodoo--pim-lightgray.png?logo=github + :target: https://github.com/OCA/odoo-pim/tree/15.0/product_attribute_set + :alt: OCA/odoo-pim +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/odoo-pim-15-0/odoo-pim-15-0-product_attribute_set + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/odoo-pim&target_branch=15.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows to display product's Attributes in product form views thanks to the `attribute_set `_ module. It also adds a suggested link between product's Category and product's Attribute Set. + +However this module **does not provide an Attribute menu** to easily manage product's Attribute as this feature is covered by the `pim_attribute_set `_ module in the PIM (Product Information Management) application developed by `Akretion `_ + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To understand how to create and use Attributes, please refer to the `attribute_set` module's README. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Akretion + +Contributors +~~~~~~~~~~~~ + +* Sébastien BEAU +* Clément Mombereau +* Benoît Guillot +* David Dufresne +* El Hadji Dem +* Denis Roussel + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/odoo-pim `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_attribute_set/__init__.py b/product_attribute_set/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/product_attribute_set/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/product_attribute_set/__manifest__.py b/product_attribute_set/__manifest__.py new file mode 100644 index 000000000..b38349877 --- /dev/null +++ b/product_attribute_set/__manifest__.py @@ -0,0 +1,14 @@ +# Copyright 2015 Akretion (http://www.akretion.com). +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +{ + "name": "Product Attribute Set", + "version": "15.0.1.0.0", + "category": "Generic Modules/Others", + "license": "AGPL-3", + "author": "Akretion,Odoo Community Association (OCA)", + "website": "https://github.com/OCA/odoo-pim", + "depends": ["product", "attribute_set"], + "data": ["views/product.xml", "views/product_category.xml"], + "demo": ["demo/product_attribute.xml"], + "installable": True, +} diff --git a/product_attribute_set/demo/product_attribute.xml b/product_attribute_set/demo/product_attribute.xml new file mode 100644 index 000000000..f25ad9ba3 --- /dev/null +++ b/product_attribute_set/demo/product_attribute.xml @@ -0,0 +1,77 @@ + + + + + Computer + + + + Mouse + + + + + Technical + + + + + Transport + + + + + + custom + Processor + x_processor + select + + + + + + Intel i5 + + + + Intel i6 + + + + Intel i7 + + + + custom + Technical Description + x_technical_description + text + + + + + + custom + x_linux_compatible + boolean + + + + + + + native + + + + + + + native + + + + + + diff --git a/product_attribute_set/i18n/es.po b/product_attribute_set/i18n/es.po new file mode 100644 index 000000000..a25b8bf8b --- /dev/null +++ b/product_attribute_set/i18n/es.po @@ -0,0 +1,160 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_attribute_set +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-03-17 23:57+0000\n" +"Last-Translator: Ivorra78 \n" +"Language-Team: none\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_product__attribute_set_id +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__attribute_set_id +#: model_terms:ir.ui.view,arch_db:product_attribute_set.product_template_search_view +msgid "Attribute Set" +msgstr "Conjunto de atributos" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__attribute_set_completion_rate +msgid "Attribute Set Completion Rate" +msgstr "Tasa de cumplimentación del conjunto de atributos" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__attribute_set_completion_state +msgid "Attribute Set Completion State" +msgstr "Estado de finalización del conjunto de atributos" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__attribute_set_completed_ids +msgid "Attribute Set completed criterias" +msgstr "Conjunto de atributos Criterios completados" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__attribute_set_not_completed_ids +msgid "Attribute Set not completed criterias" +msgstr "Conjunto de atributos criterios no cumplidos" + +#. module: product_attribute_set +#: model:ir.model.fields,help:product_attribute_set.field_product_template__attribute_set_completion_rate +msgid "Attribute set completeness percentage" +msgstr "Porcentaje de integridad del conjunto de atributos" + +#. module: product_attribute_set +#: model:ir.model.fields,help:product_attribute_set.field_product_template__attribute_set_completion_state +msgid "Attribute set completeness status" +msgstr "Estado de integridad del conjunto de atributos" + +#. module: product_attribute_set +#: model_terms:ir.ui.view,arch_db:product_attribute_set.product_template_form_view +msgid "Attributes" +msgstr "Atributos" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__attribute_set_completeness_ids +msgid "Completeness Requirements" +msgstr "Requisitos de Integridad" + +#. module: product_attribute_set +#: model:attribute.set,name:product_attribute_set.computer_attribute_set +msgid "Computer" +msgstr "Ordenador" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_category__attribute_set_id +msgid "Default Attribute Set" +msgstr "Conjunto de Atributos por Defecto" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_category__display_name +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__display_name +msgid "Display Name" +msgstr "Mostrar Nombre" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_category__id +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__id +msgid "ID" +msgstr "ID (identificación)" + +#. module: product_attribute_set +#: model:attribute.option,name:product_attribute_set.computer_processor_attribute_option_1 +msgid "Intel i5" +msgstr "i5 de Intel" + +#. module: product_attribute_set +#: model:attribute.option,name:product_attribute_set.computer_processor_attribute_option_2 +msgid "Intel i6" +msgstr "i6 de Intel" + +#. module: product_attribute_set +#: model:attribute.option,name:product_attribute_set.computer_processor_attribute_option_3 +msgid "Intel i7" +msgstr "i7 de Intel" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_category____last_update +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template____last_update +msgid "Last Modified on" +msgstr "Última Modificación el" + +#. module: product_attribute_set +#: model:attribute.set,name:product_attribute_set.mouse_attribute_set +msgid "Mouse" +msgstr "Ratón" + +#. module: product_attribute_set +#: model:attribute.attribute,field_description:product_attribute_set.computer_processor_attribute +#: model:ir.model.fields,field_description:product_attribute_set.computer_processor_attribute_ir_model_fields +msgid "Processor" +msgstr "Procesador" + +#. module: product_attribute_set +#: model:ir.model,name:product_attribute_set.model_product_category +msgid "Product Category" +msgstr "Categoría de Producto" + +#. module: product_attribute_set +#: model:ir.model,name:product_attribute_set.model_product_template +msgid "Product Template" +msgstr "Plantilla Producto" + +#. module: product_attribute_set +#: model:attribute.group,name:product_attribute_set.computer_technical_attribute_group +msgid "Technical" +msgstr "Técnico" + +#. module: product_attribute_set +#: model:attribute.attribute,field_description:product_attribute_set.computer_tech_description_attribute +#: model:ir.model.fields,field_description:product_attribute_set.computer_tech_description_attribute_ir_model_fields +msgid "Technical Description" +msgstr "Descripción Técnica" + +#. module: product_attribute_set +#: model:attribute.group,name:product_attribute_set.computer_transport_attribute_group +msgid "Transport" +msgstr "Transporte" + +#. module: product_attribute_set +#: model:attribute.attribute,field_description:product_attribute_set.computer_volume_attribute +msgid "Volume" +msgstr "Tomo" + +#. module: product_attribute_set +#: model:attribute.attribute,field_description:product_attribute_set.computer_weight_attribute +msgid "Weight" +msgstr "Peso" + +#. module: product_attribute_set +#: model:attribute.attribute,field_description:product_attribute_set.computer_linux_compatible_attribute +#: model:ir.model.fields,field_description:product_attribute_set.computer_linux_compatible_attribute_ir_model_fields +msgid "X Linux Compatible" +msgstr "X Compatible con Linux" diff --git a/product_attribute_set/i18n/es_AR.po b/product_attribute_set/i18n/es_AR.po new file mode 100644 index 000000000..004ae2601 --- /dev/null +++ b/product_attribute_set/i18n/es_AR.po @@ -0,0 +1,160 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_attribute_set +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2022-09-18 17:07+0000\n" +"Last-Translator: Ignacio Buioli \n" +"Language-Team: none\n" +"Language: es_AR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_product__attribute_set_id +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__attribute_set_id +#: model_terms:ir.ui.view,arch_db:product_attribute_set.product_template_search_view +msgid "Attribute Set" +msgstr "Conjunto de Atributos" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__attribute_set_completion_rate +msgid "Attribute Set Completion Rate" +msgstr "Tasa de Finalización del Conjunto de Atributos" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__attribute_set_completion_state +msgid "Attribute Set Completion State" +msgstr "Estado de Finalización del Conjunto de Atributos" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__attribute_set_completed_ids +msgid "Attribute Set completed criterias" +msgstr "Criterios de Conjunto de Atributos completados" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__attribute_set_not_completed_ids +msgid "Attribute Set not completed criterias" +msgstr "Criterios de Conjunto de Atributos no completados" + +#. module: product_attribute_set +#: model:ir.model.fields,help:product_attribute_set.field_product_template__attribute_set_completion_rate +msgid "Attribute set completeness percentage" +msgstr "Porcentaje de finalización del Conjunto de atributos" + +#. module: product_attribute_set +#: model:ir.model.fields,help:product_attribute_set.field_product_template__attribute_set_completion_state +msgid "Attribute set completeness status" +msgstr "Estado de finalización del conjunto de atributos" + +#. module: product_attribute_set +#: model_terms:ir.ui.view,arch_db:product_attribute_set.product_template_form_view +msgid "Attributes" +msgstr "Atributos" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__attribute_set_completeness_ids +msgid "Completeness Requirements" +msgstr "Requerimientos de Finalización" + +#. module: product_attribute_set +#: model:attribute.set,name:product_attribute_set.computer_attribute_set +msgid "Computer" +msgstr "Computadora" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_category__attribute_set_id +msgid "Default Attribute Set" +msgstr "Conjunto de Atributos Predeterminado" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_category__display_name +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__display_name +msgid "Display Name" +msgstr "Nombre Mostrado" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_category__id +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__id +msgid "ID" +msgstr "ID" + +#. module: product_attribute_set +#: model:attribute.option,name:product_attribute_set.computer_processor_attribute_option_1 +msgid "Intel i5" +msgstr "Intel i5" + +#. module: product_attribute_set +#: model:attribute.option,name:product_attribute_set.computer_processor_attribute_option_2 +msgid "Intel i6" +msgstr "Intel i6" + +#. module: product_attribute_set +#: model:attribute.option,name:product_attribute_set.computer_processor_attribute_option_3 +msgid "Intel i7" +msgstr "Intel i7" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_category____last_update +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template____last_update +msgid "Last Modified on" +msgstr "Última Modificación el" + +#. module: product_attribute_set +#: model:attribute.set,name:product_attribute_set.mouse_attribute_set +msgid "Mouse" +msgstr "Mouse" + +#. module: product_attribute_set +#: model:attribute.attribute,field_description:product_attribute_set.computer_processor_attribute +#: model:ir.model.fields,field_description:product_attribute_set.computer_processor_attribute_ir_model_fields +msgid "Processor" +msgstr "Procesador" + +#. module: product_attribute_set +#: model:ir.model,name:product_attribute_set.model_product_category +msgid "Product Category" +msgstr "Categoria del Producto" + +#. module: product_attribute_set +#: model:ir.model,name:product_attribute_set.model_product_template +msgid "Product Template" +msgstr "Plantilla de Producto" + +#. module: product_attribute_set +#: model:attribute.group,name:product_attribute_set.computer_technical_attribute_group +msgid "Technical" +msgstr "Técnico" + +#. module: product_attribute_set +#: model:attribute.attribute,field_description:product_attribute_set.computer_tech_description_attribute +#: model:ir.model.fields,field_description:product_attribute_set.computer_tech_description_attribute_ir_model_fields +msgid "Technical Description" +msgstr "Descripción Técnica" + +#. module: product_attribute_set +#: model:attribute.group,name:product_attribute_set.computer_transport_attribute_group +msgid "Transport" +msgstr "Transporte" + +#. module: product_attribute_set +#: model:attribute.attribute,field_description:product_attribute_set.computer_volume_attribute +msgid "Volume" +msgstr "Volumen" + +#. module: product_attribute_set +#: model:attribute.attribute,field_description:product_attribute_set.computer_weight_attribute +msgid "Weight" +msgstr "Peso" + +#. module: product_attribute_set +#: model:attribute.attribute,field_description:product_attribute_set.computer_linux_compatible_attribute +#: model:ir.model.fields,field_description:product_attribute_set.computer_linux_compatible_attribute_ir_model_fields +msgid "X Linux Compatible" +msgstr "X Compatible con Linux" diff --git a/product_attribute_set/i18n/it.po b/product_attribute_set/i18n/it.po new file mode 100644 index 000000000..949fd7260 --- /dev/null +++ b/product_attribute_set/i18n/it.po @@ -0,0 +1,160 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_attribute_set +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2025-05-20 17:26+0000\n" +"Last-Translator: mymage \n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 5.10.4\n" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_product__attribute_set_id +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__attribute_set_id +#: model_terms:ir.ui.view,arch_db:product_attribute_set.product_template_search_view +msgid "Attribute Set" +msgstr "" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__attribute_set_completion_rate +msgid "Attribute Set Completion Rate" +msgstr "" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__attribute_set_completion_state +msgid "Attribute Set Completion State" +msgstr "" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__attribute_set_completed_ids +msgid "Attribute Set completed criterias" +msgstr "" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__attribute_set_not_completed_ids +msgid "Attribute Set not completed criterias" +msgstr "" + +#. module: product_attribute_set +#: model:ir.model.fields,help:product_attribute_set.field_product_template__attribute_set_completion_rate +msgid "Attribute set completeness percentage" +msgstr "" + +#. module: product_attribute_set +#: model:ir.model.fields,help:product_attribute_set.field_product_template__attribute_set_completion_state +msgid "Attribute set completeness status" +msgstr "" + +#. module: product_attribute_set +#: model_terms:ir.ui.view,arch_db:product_attribute_set.product_template_form_view +msgid "Attributes" +msgstr "" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__attribute_set_completeness_ids +msgid "Completeness Requirements" +msgstr "" + +#. module: product_attribute_set +#: model:attribute.set,name:product_attribute_set.computer_attribute_set +msgid "Computer" +msgstr "" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_category__attribute_set_id +msgid "Default Attribute Set" +msgstr "" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_category__display_name +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__display_name +msgid "Display Name" +msgstr "" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_category__id +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__id +msgid "ID" +msgstr "ID" + +#. module: product_attribute_set +#: model:attribute.option,name:product_attribute_set.computer_processor_attribute_option_1 +msgid "Intel i5" +msgstr "" + +#. module: product_attribute_set +#: model:attribute.option,name:product_attribute_set.computer_processor_attribute_option_2 +msgid "Intel i6" +msgstr "" + +#. module: product_attribute_set +#: model:attribute.option,name:product_attribute_set.computer_processor_attribute_option_3 +msgid "Intel i7" +msgstr "" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_category____last_update +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template____last_update +msgid "Last Modified on" +msgstr "" + +#. module: product_attribute_set +#: model:attribute.set,name:product_attribute_set.mouse_attribute_set +msgid "Mouse" +msgstr "" + +#. module: product_attribute_set +#: model:attribute.attribute,field_description:product_attribute_set.computer_processor_attribute +#: model:ir.model.fields,field_description:product_attribute_set.computer_processor_attribute_ir_model_fields +msgid "Processor" +msgstr "" + +#. module: product_attribute_set +#: model:ir.model,name:product_attribute_set.model_product_category +msgid "Product Category" +msgstr "" + +#. module: product_attribute_set +#: model:ir.model,name:product_attribute_set.model_product_template +msgid "Product Template" +msgstr "" + +#. module: product_attribute_set +#: model:attribute.group,name:product_attribute_set.computer_technical_attribute_group +msgid "Technical" +msgstr "" + +#. module: product_attribute_set +#: model:attribute.attribute,field_description:product_attribute_set.computer_tech_description_attribute +#: model:ir.model.fields,field_description:product_attribute_set.computer_tech_description_attribute_ir_model_fields +msgid "Technical Description" +msgstr "" + +#. module: product_attribute_set +#: model:attribute.group,name:product_attribute_set.computer_transport_attribute_group +msgid "Transport" +msgstr "" + +#. module: product_attribute_set +#: model:attribute.attribute,field_description:product_attribute_set.computer_volume_attribute +msgid "Volume" +msgstr "" + +#. module: product_attribute_set +#: model:attribute.attribute,field_description:product_attribute_set.computer_weight_attribute +msgid "Weight" +msgstr "" + +#. module: product_attribute_set +#: model:attribute.attribute,field_description:product_attribute_set.computer_linux_compatible_attribute +#: model:ir.model.fields,field_description:product_attribute_set.computer_linux_compatible_attribute_ir_model_fields +msgid "X Linux Compatible" +msgstr "" diff --git a/product_attribute_set/i18n/product_attribute_set.pot b/product_attribute_set/i18n/product_attribute_set.pot new file mode 100644 index 000000000..70cb9d7e2 --- /dev/null +++ b/product_attribute_set/i18n/product_attribute_set.pot @@ -0,0 +1,157 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_attribute_set +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_product__attribute_set_id +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__attribute_set_id +#: model_terms:ir.ui.view,arch_db:product_attribute_set.product_template_search_view +msgid "Attribute Set" +msgstr "" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__attribute_set_completion_rate +msgid "Attribute Set Completion Rate" +msgstr "" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__attribute_set_completion_state +msgid "Attribute Set Completion State" +msgstr "" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__attribute_set_completed_ids +msgid "Attribute Set completed criterias" +msgstr "" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__attribute_set_not_completed_ids +msgid "Attribute Set not completed criterias" +msgstr "" + +#. module: product_attribute_set +#: model:ir.model.fields,help:product_attribute_set.field_product_template__attribute_set_completion_rate +msgid "Attribute set completeness percentage" +msgstr "" + +#. module: product_attribute_set +#: model:ir.model.fields,help:product_attribute_set.field_product_template__attribute_set_completion_state +msgid "Attribute set completeness status" +msgstr "" + +#. module: product_attribute_set +#: model_terms:ir.ui.view,arch_db:product_attribute_set.product_template_form_view +msgid "Attributes" +msgstr "" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__attribute_set_completeness_ids +msgid "Completeness Requirements" +msgstr "" + +#. module: product_attribute_set +#: model:attribute.set,name:product_attribute_set.computer_attribute_set +msgid "Computer" +msgstr "" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_category__attribute_set_id +msgid "Default Attribute Set" +msgstr "" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_category__display_name +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__display_name +msgid "Display Name" +msgstr "" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_category__id +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__id +msgid "ID" +msgstr "" + +#. module: product_attribute_set +#: model:attribute.option,name:product_attribute_set.computer_processor_attribute_option_1 +msgid "Intel i5" +msgstr "" + +#. module: product_attribute_set +#: model:attribute.option,name:product_attribute_set.computer_processor_attribute_option_2 +msgid "Intel i6" +msgstr "" + +#. module: product_attribute_set +#: model:attribute.option,name:product_attribute_set.computer_processor_attribute_option_3 +msgid "Intel i7" +msgstr "" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_category____last_update +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template____last_update +msgid "Last Modified on" +msgstr "" + +#. module: product_attribute_set +#: model:attribute.set,name:product_attribute_set.mouse_attribute_set +msgid "Mouse" +msgstr "" + +#. module: product_attribute_set +#: model:attribute.attribute,field_description:product_attribute_set.computer_processor_attribute +#: model:ir.model.fields,field_description:product_attribute_set.computer_processor_attribute_ir_model_fields +msgid "Processor" +msgstr "" + +#. module: product_attribute_set +#: model:ir.model,name:product_attribute_set.model_product_category +msgid "Product Category" +msgstr "" + +#. module: product_attribute_set +#: model:ir.model,name:product_attribute_set.model_product_template +msgid "Product Template" +msgstr "" + +#. module: product_attribute_set +#: model:attribute.group,name:product_attribute_set.computer_technical_attribute_group +msgid "Technical" +msgstr "" + +#. module: product_attribute_set +#: model:attribute.attribute,field_description:product_attribute_set.computer_tech_description_attribute +#: model:ir.model.fields,field_description:product_attribute_set.computer_tech_description_attribute_ir_model_fields +msgid "Technical Description" +msgstr "" + +#. module: product_attribute_set +#: model:attribute.group,name:product_attribute_set.computer_transport_attribute_group +msgid "Transport" +msgstr "" + +#. module: product_attribute_set +#: model:attribute.attribute,field_description:product_attribute_set.computer_volume_attribute +msgid "Volume" +msgstr "" + +#. module: product_attribute_set +#: model:attribute.attribute,field_description:product_attribute_set.computer_weight_attribute +msgid "Weight" +msgstr "" + +#. module: product_attribute_set +#: model:attribute.attribute,field_description:product_attribute_set.computer_linux_compatible_attribute +#: model:ir.model.fields,field_description:product_attribute_set.computer_linux_compatible_attribute_ir_model_fields +msgid "X Linux Compatible" +msgstr "" diff --git a/product_attribute_set/models/__init__.py b/product_attribute_set/models/__init__.py new file mode 100644 index 000000000..533c5a5a9 --- /dev/null +++ b/product_attribute_set/models/__init__.py @@ -0,0 +1,2 @@ +from . import product_category +from . import product diff --git a/product_attribute_set/models/product.py b/product_attribute_set/models/product.py new file mode 100644 index 000000000..7fd7c5dc6 --- /dev/null +++ b/product_attribute_set/models/product.py @@ -0,0 +1,56 @@ +# Copyright 2011 Akretion (http://www.akretion.com). +# @author Benoit Guillot +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + + +from odoo import api, fields, models + + +class ProductTemplate(models.Model): + """The mixin 'attribute.set.owner.mixin' override the model's fields_view_get() + method which will replace the 'attributes_placeholder' by a group made up of all + the product.template's Attributes. + Each Attribute will have a conditional invisibility depending on its Attriute Sets. + """ + + _inherit = ["product.template", "attribute.set.owner.mixin"] + _name = "product.template" + + attribute_set_id = fields.Many2one( + "attribute.set", + "Attribute Set", + default=lambda self: self._get_default_att_set(), + ) + + def _get_default_att_set(self): + """Fill default Product's attribute_set with its Category's + default attribute_set.""" + default_categ_id_id = self._get_default_category_id() + if default_categ_id_id: + default_categ_id = self.env["product.category"].search( + [("id", "=", default_categ_id_id.id)] + ) + return default_categ_id.attribute_set_id.id + + @api.model + def create(self, vals): + if not vals.get("attribute_set_id") and vals.get("categ_id"): + category = self.env["product.category"].browse(vals["categ_id"]) + vals["attribute_set_id"] = category.attribute_set_id.id + return super().create(vals) + + def write(self, vals): + if not vals.get("attribute_set_id") and vals.get("categ_id"): + category = self.env["product.category"].browse(vals["categ_id"]) + vals["attribute_set_id"] = category.attribute_set_id.id + return super().write(vals) + + @api.onchange("categ_id") + def update_att_set_onchange_categ_id(self): + self.ensure_one() + if self.categ_id and not self.attribute_set_id: + self.attribute_set_id = self.categ_id.attribute_set_id + + +# TODO : add the 'attribute.set.owner.mixin' to product.product in order to display +# Attributes in Variants. diff --git a/product_attribute_set/models/product_category.py b/product_attribute_set/models/product_category.py new file mode 100644 index 000000000..983718a4d --- /dev/null +++ b/product_attribute_set/models/product_category.py @@ -0,0 +1,26 @@ +# Copyright 2015 Akretion (http://www.akretion.com). +# @author Benoit Guillot +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ProductCategory(models.Model): + _inherit = "product.category" + + attribute_set_id = fields.Many2one( + "attribute.set", + "Default Attribute Set", + context={"default_model_id": "product.template"}, + ) + + def write(self, vals): + """Fill Category's products with Category's default attribute_set_id if empty""" + res = super().write(vals) + if vals.get("attribute_set_id"): + for category in self: + template_ids = self.env["product.template"].search( + [("categ_id", "=", category.id), ("attribute_set_id", "=", False)] + ) + template_ids.write({"attribute_set_id": category.attribute_set_id.id}) + return res diff --git a/product_attribute_set/readme/CONTRIBUTORS.rst b/product_attribute_set/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..21068774e --- /dev/null +++ b/product_attribute_set/readme/CONTRIBUTORS.rst @@ -0,0 +1,6 @@ +* Sébastien BEAU +* Clément Mombereau +* Benoît Guillot +* David Dufresne +* El Hadji Dem +* Denis Roussel diff --git a/product_attribute_set/readme/DESCRIPTION.rst b/product_attribute_set/readme/DESCRIPTION.rst new file mode 100644 index 000000000..926945df7 --- /dev/null +++ b/product_attribute_set/readme/DESCRIPTION.rst @@ -0,0 +1,3 @@ +This module allows to display product's Attributes in product form views thanks to the `attribute_set `_ module. It also adds a suggested link between product's Category and product's Attribute Set. + +However this module **does not provide an Attribute menu** to easily manage product's Attribute as this feature is covered by the `pim_attribute_set `_ module in the PIM (Product Information Management) application developed by `Akretion `_ diff --git a/product_attribute_set/readme/ROADMAP.rst b/product_attribute_set/readme/ROADMAP.rst new file mode 100644 index 000000000..e69de29bb diff --git a/product_attribute_set/readme/USAGE.rst b/product_attribute_set/readme/USAGE.rst new file mode 100644 index 000000000..f679e348b --- /dev/null +++ b/product_attribute_set/readme/USAGE.rst @@ -0,0 +1 @@ +To understand how to create and use Attributes, please refer to the `attribute_set` module's README. diff --git a/product_attribute_set/static/description/icon.png b/product_attribute_set/static/description/icon.png new file mode 100644 index 000000000..3a0328b51 Binary files /dev/null and b/product_attribute_set/static/description/icon.png differ diff --git a/product_attribute_set/static/description/index.html b/product_attribute_set/static/description/index.html new file mode 100644 index 000000000..7b339231d --- /dev/null +++ b/product_attribute_set/static/description/index.html @@ -0,0 +1,434 @@ + + + + + +Product Attribute Set + + + +
+

Product Attribute Set

+ + +

Beta License: AGPL-3 OCA/odoo-pim Translate me on Weblate Try me on Runboat

+

This module allows to display product’s Attributes in product form views thanks to the attribute_set module. It also adds a suggested link between product’s Category and product’s Attribute Set.

+

However this module does not provide an Attribute menu to easily manage product’s Attribute as this feature is covered by the pim_attribute_set module in the PIM (Product Information Management) application developed by Akretion

+

Table of contents

+ +
+

Usage

+

To understand how to create and use Attributes, please refer to the attribute_set module’s README.

+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Akretion
  • +
+
+ +
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/odoo-pim project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/product_attribute_set/tests/__init__.py b/product_attribute_set/tests/__init__.py new file mode 100644 index 000000000..382f155ff --- /dev/null +++ b/product_attribute_set/tests/__init__.py @@ -0,0 +1 @@ +from . import test_product_attribute_set diff --git a/product_attribute_set/tests/test_product_attribute_set.py b/product_attribute_set/tests/test_product_attribute_set.py new file mode 100644 index 000000000..c4b854507 --- /dev/null +++ b/product_attribute_set/tests/test_product_attribute_set.py @@ -0,0 +1,55 @@ +# 2023 Copyright ForgeFlow, S.L. (https://www.forgeflow.com) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo.tests.common import SavepointCase + + +class TestProductAttributeSet(SavepointCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + # Models + cls.product_ctg_model = cls.env["product.category"] + cls.product_tmpl_model = cls.env["product.template"] + cls.attribute_set_model = cls.env["attribute.set"] + cls.product_tmpl_odoo_model = cls.env.ref("product.model_product_template") + + # Instances + cls.attribute_set_01 = cls.attribute_set_model.create( + {"name": "Attribute Set 01", "model_id": cls.product_tmpl_odoo_model.id} + ) + cls.attribute_set_02 = cls.attribute_set_model.create( + {"name": "Attribute Set 02", "model_id": cls.product_tmpl_odoo_model.id} + ) + cls.product_ctg_01 = cls.product_ctg_model.create({"name": "Category 01"}) + cls.product_ctg_02 = cls.product_ctg_model.create( + {"name": "Category 02", "attribute_set_id": cls.attribute_set_02.id} + ) + cls.product_tmpl_01 = cls.product_tmpl_model.create( + {"name": "Product 01", "categ_id": cls.product_ctg_01.id} + ) + cls.product_tmpl_02 = cls.product_tmpl_model.create( + { + "name": "Product 02", + "categ_id": cls.product_ctg_01.id, + "attribute_set_id": cls.attribute_set_02.id, + } + ) + + def test_01_product_category_to_non_assigned_templates(self): + """ + Should assign the value to only the first template as the second one already + has a value. + """ + self.product_ctg_01.attribute_set_id = self.attribute_set_01 + self.assertEqual(self.attribute_set_01, self.product_tmpl_01.attribute_set_id) + self.assertNotEqual(self.attribute_set_01, self.product_tmpl_02) + + def test_02_category_change(self): + """ + When the category changes, the attribute set value is also changed based on the + value assigned in the category. + """ + self.assertFalse(self.product_tmpl_01.attribute_set_id) + self.product_tmpl_01.categ_id = self.product_ctg_02 + self.assertEqual(self.attribute_set_02, self.product_tmpl_01.attribute_set_id) diff --git a/product_attribute_set/views/product.xml b/product_attribute_set/views/product.xml new file mode 100644 index 000000000..b5180a1ee --- /dev/null +++ b/product_attribute_set/views/product.xml @@ -0,0 +1,51 @@ + + + + + {"include_native_attribute": 1, "search_default_filter_to_sell": 1} + + + + attributes.product.normal.form + product.template + + + +
+
+
+ + + + + + +
+
+ + product.template + + + + + + + + + +
diff --git a/product_attribute_set/views/product_category.xml b/product_attribute_set/views/product_category.xml new file mode 100644 index 000000000..ea9624113 --- /dev/null +++ b/product_attribute_set/views/product_category.xml @@ -0,0 +1,17 @@ + + + + product.category.form + product.category + + + + + + + + diff --git a/setup/product_attribute_set/odoo/addons/product_attribute_set b/setup/product_attribute_set/odoo/addons/product_attribute_set new file mode 120000 index 000000000..af8fabc43 --- /dev/null +++ b/setup/product_attribute_set/odoo/addons/product_attribute_set @@ -0,0 +1 @@ +../../../../product_attribute_set \ No newline at end of file diff --git a/setup/product_attribute_set/setup.py b/setup/product_attribute_set/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/product_attribute_set/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)