diff --git a/product_attribute_set/README.rst b/product_attribute_set/README.rst new file mode 100644 index 00000000..58f415ce --- /dev/null +++ b/product_attribute_set/README.rst @@ -0,0 +1,85 @@ +===================== +Product Attribute Set +===================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/14.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-14-0/odoo-pim-14-0-product_attribute_set + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/295/14.0 + :alt: Try me on Runbot + +|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 smashing 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 00000000..0650744f --- /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 00000000..06b79861 --- /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": "16.0.1.0.0", + "category": "PIM", + "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 00000000..f25ad9ba --- /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 00000000..5eab902e --- /dev/null +++ b/product_attribute_set/i18n/es.po @@ -0,0 +1,158 @@ +# 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: Automatically generated\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" + +#. 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/i18n/es_AR.po b/product_attribute_set/i18n/es_AR.po new file mode 100644 index 00000000..004ae260 --- /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/fr_BE.po b/product_attribute_set/i18n/fr_BE.po new file mode 100644 index 00000000..21f6da9b --- /dev/null +++ b/product_attribute_set/i18n/fr_BE.po @@ -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 "Ensemble d'attribut" + +#. 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 "Taux d'achèvement de l'ensemble d'attribut" + +#. 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 "État d'achèvement de l'ensemble d'attribut" + +#. 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 "Critères remplis de l'ensemble d'attribut" + +#. 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 "Critères non remplis de l'ensemble d'attribut" + +#. 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 "Pourcentage de complétude de l'ensemble d'attribut" + +#. 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 "État de complétude de l'ensemble d'attribut" + +#. module: product_attribute_set +#: model_terms:ir.ui.view,arch_db:product_attribute_set.product_template_form_view +msgid "Attributes" +msgstr "Attributs" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_template__attribute_set_completeness_ids +msgid "Completeness Requirements" +msgstr "Exigences d'exhaustivité" + +#. module: product_attribute_set +#: model:attribute.set,name:product_attribute_set.computer_attribute_set +msgid "Computer" +msgstr "Ordinateur" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_category__attribute_set_id +msgid "Default Attribute Set" +msgstr "Ensemble d'attribut par défaut" + +#. 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 "Nom affiché" + +#. 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 "Dernière modification le" + +#. module: product_attribute_set +#: model:attribute.set,name:product_attribute_set.mouse_attribute_set +msgid "Mouse" +msgstr "Souris" + +#. 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 "Processeur" + +#. module: product_attribute_set +#: model:ir.model,name:product_attribute_set.model_product_category +msgid "Product Category" +msgstr "Catégorie d'article" + +#. module: product_attribute_set +#: model:ir.model,name:product_attribute_set.model_product_template +msgid "Product Template" +msgstr "Article" + +#. module: product_attribute_set +#: model:attribute.group,name:product_attribute_set.computer_technical_attribute_group +msgid "Technical" +msgstr "Technique" + +#. 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 "Description Technique" + +#. module: product_attribute_set +#: model:attribute.group,name:product_attribute_set.computer_transport_attribute_group +msgid "Transport" +msgstr "Transport" + +#. module: product_attribute_set +#: model:attribute.attribute,field_description:product_attribute_set.computer_volume_attribute +msgid "Volume" +msgstr "Volume" + +#. module: product_attribute_set +#: model:attribute.attribute,field_description:product_attribute_set.computer_weight_attribute +msgid "Weight" +msgstr "Poids" + +#. 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 "Compatible linux X" 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 00000000..70cb9d7e --- /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 00000000..533c5a5a --- /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 00000000..540d4dcf --- /dev/null +++ b/product_attribute_set/models/product.py @@ -0,0 +1,52 @@ +# 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): + + _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): + """Get default product's attribute_set by category.""" + 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)], limit=1 + ) + return default_categ_id.attribute_set_id.id + + @api.model_create_multi + def create(self, vals_list): + category_model = self.env["product.category"] + for vals in vals_list: + if not vals.get("attribute_set_id") and vals.get("categ_id"): + category = category_model.browse(vals["categ_id"]) + vals["attribute_set_id"] = category.attribute_set_id.id + return super().create(vals_list) + + 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 _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 00000000..ecc51adb --- /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 + super().write(vals) + for record in self: + if vals.get("attribute_set_id"): + templates = self.env["product.template"].search( + [("categ_id", "=", record.id), ("attribute_set_id", "=", False)] + ) + templates.write({"attribute_set_id": record.attribute_set_id.id}) + return True diff --git a/product_attribute_set/readme/CONTRIBUTORS.rst b/product_attribute_set/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..21068774 --- /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 00000000..926945df --- /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 00000000..e69de29b diff --git a/product_attribute_set/readme/USAGE.rst b/product_attribute_set/readme/USAGE.rst new file mode 100644 index 00000000..f679e348 --- /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 00000000..3a0328b5 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 00000000..23524867 --- /dev/null +++ b/product_attribute_set/static/description/index.html @@ -0,0 +1,430 @@ + + + + + + +Product Attribute Set + + + +
+

Product Attribute Set

+ + +

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

+

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 smashing 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/views/product.xml b/product_attribute_set/views/product.xml new file mode 100644 index 00000000..6419280a --- /dev/null +++ b/product_attribute_set/views/product.xml @@ -0,0 +1,50 @@ + + + + + {"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 00000000..ea962411 --- /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 00000000..af8fabc4 --- /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 00000000..28c57bb6 --- /dev/null +++ b/setup/product_attribute_set/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)