diff --git a/product_attribute_set/README.rst b/product_attribute_set/README.rst new file mode 100644 index 000000000..ed8ed3e5b --- /dev/null +++ b/product_attribute_set/README.rst @@ -0,0 +1,107 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +===================== +Product Attribute Set +===================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:c8f3bc87e4527a2b6b0da0379466badb789202dd429ba9407b9678b9fd1dc29c + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/license-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/19.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-19-0/odoo-pim-19-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=19.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. + +Known issues / Roadmap +====================== + + + +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 +- Mohamed Alkobrosli + +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..c3fad3027 --- /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": "19.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 000000000..241d6c185 --- /dev/null +++ b/product_attribute_set/demo/product_attribute.xml @@ -0,0 +1,75 @@ + + + + + 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..532ab3d07 --- /dev/null +++ b/product_attribute_set/i18n/es.po @@ -0,0 +1,105 @@ +# 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: 2023-11-26 19:34+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,name:product_attribute_set.model_attribute_attribute +msgid "Attribute" +msgstr "" + +#. 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_terms:ir.ui.view,arch_db:product_attribute_set.product_template_form_view +#: model_terms:ir.ui.view,arch_db:product_attribute_set.product_variant_easy_edit_view +msgid "Attributes" +msgstr "Atributos" + +#. 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: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:attribute.set,name:product_attribute_set.mouse_attribute_set +msgid "Mouse" +msgstr "Ratón" + +#. module: product_attribute_set +#: 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_template +msgid "Product" +msgstr "Producto" + +#. 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_product +msgid "Product Variant" +msgstr "" + +#. 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: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: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..c5a962d59 --- /dev/null +++ b/product_attribute_set/i18n/es_AR.po @@ -0,0 +1,144 @@ +# 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-07-24 01:58+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 5.6.2\n" + +#. module: product_attribute_set +#: model:ir.model,name:product_attribute_set.model_attribute_attribute +msgid "Attribute" +msgstr "Atributo" + +#. 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_terms:ir.ui.view,arch_db:product_attribute_set.product_template_form_view +#: model_terms:ir.ui.view,arch_db:product_attribute_set.product_variant_easy_edit_view +msgid "Attributes" +msgstr "Atributos" + +#. 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: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:attribute.set,name:product_attribute_set.mouse_attribute_set +msgid "Mouse" +msgstr "Mouse" + +#. module: product_attribute_set +#: 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_template +msgid "Product" +msgstr "Producto" + +#. 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_product +msgid "Product Variant" +msgstr "Variante 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: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:ir.model.fields,field_description:product_attribute_set.computer_linux_compatible_attribute_ir_model_fields +msgid "X Linux Compatible" +msgstr "X Compatible con Linux" + +#~ msgid "Attribute Set Completion Rate" +#~ msgstr "Tasa de Finalización del Conjunto de Atributos" + +#~ msgid "Attribute Set Completion State" +#~ msgstr "Estado de Finalización del Conjunto de Atributos" + +#~ msgid "Attribute Set completed criterias" +#~ msgstr "Criterios de Conjunto de Atributos completados" + +#~ msgid "Attribute Set not completed criterias" +#~ msgstr "Criterios de Conjunto de Atributos no completados" + +#~ msgid "Attribute set completeness percentage" +#~ msgstr "Porcentaje de finalización del Conjunto de atributos" + +#~ msgid "Attribute set completeness status" +#~ msgstr "Estado de finalización del conjunto de atributos" + +#~ msgid "Completeness Requirements" +#~ msgstr "Requerimientos de Finalización" + +#~ msgid "Display Name" +#~ msgstr "Nombre Mostrado" + +#~ msgid "ID" +#~ msgstr "ID" + +#~ msgid "Last Modified on" +#~ msgstr "Última Modificación el" + +#~ msgid "Product Template" +#~ msgstr "Plantilla de Producto" + +#~ msgid "Volume" +#~ msgstr "Volumen" + +#~ msgid "Weight" +#~ msgstr "Peso" diff --git a/product_attribute_set/i18n/fr.po b/product_attribute_set/i18n/fr.po new file mode 100644 index 000000000..86579f756 --- /dev/null +++ b/product_attribute_set/i18n/fr.po @@ -0,0 +1,105 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_attribute_set +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-01-08 23:45+0000\n" +"Last-Translator: kbentaleb \n" +"Language-Team: none\n" +"Language: fr\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,name:product_attribute_set.model_attribute_attribute +msgid "Attribute" +msgstr "" + +#. 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 "Jeu d'attribut" + +#. module: product_attribute_set +#: model_terms:ir.ui.view,arch_db:product_attribute_set.product_template_form_view +#: model_terms:ir.ui.view,arch_db:product_attribute_set.product_variant_easy_edit_view +msgid "Attributes" +msgstr "Attributs" + +#. module: product_attribute_set +#: model:attribute.set,name:product_attribute_set.computer_attribute_set +msgid "Computer" +msgstr "Calculer" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_category__attribute_set_id +msgid "Default Attribute Set" +msgstr "Jeu d'attribut par défaut" + +#. 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:attribute.set,name:product_attribute_set.mouse_attribute_set +msgid "Mouse" +msgstr "Souris" + +#. module: product_attribute_set +#: 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_template +msgid "Product" +msgstr "Produit" + +#. module: product_attribute_set +#: model:ir.model,name:product_attribute_set.model_product_category +msgid "Product Category" +msgstr "Catégories de produits" + +#. module: product_attribute_set +#: model:ir.model,name:product_attribute_set.model_product_product +msgid "Product Variant" +msgstr "" + +#. module: product_attribute_set +#: model:attribute.group,name:product_attribute_set.computer_technical_attribute_group +msgid "Technical" +msgstr "Technique" + +#. module: product_attribute_set +#: 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:ir.model.fields,field_description:product_attribute_set.computer_linux_compatible_attribute_ir_model_fields +msgid "X Linux Compatible" +msgstr "Compatible X Linux" diff --git a/product_attribute_set/i18n/fr_BE.po b/product_attribute_set/i18n/fr_BE.po new file mode 100644 index 000000000..9660ab0a9 --- /dev/null +++ b/product_attribute_set/i18n/fr_BE.po @@ -0,0 +1,139 @@ +# 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" +"Language: \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,name:product_attribute_set.model_attribute_attribute +msgid "Attribute" +msgstr "" + +#. 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_terms:ir.ui.view,arch_db:product_attribute_set.product_template_form_view +#: model_terms:ir.ui.view,arch_db:product_attribute_set.product_variant_easy_edit_view +msgid "Attributes" +msgstr "Attributs" + +#. 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: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:attribute.set,name:product_attribute_set.mouse_attribute_set +msgid "Mouse" +msgstr "Souris" + +#. module: product_attribute_set +#: 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_template +msgid "Product" +msgstr "" + +#. 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_product +msgid "Product Variant" +msgstr "" + +#. module: product_attribute_set +#: model:attribute.group,name:product_attribute_set.computer_technical_attribute_group +msgid "Technical" +msgstr "Technique" + +#. module: product_attribute_set +#: 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:ir.model.fields,field_description:product_attribute_set.computer_linux_compatible_attribute_ir_model_fields +msgid "X Linux Compatible" +msgstr "Compatible linux X" + +#~ msgid "Attribute Set Completion Rate" +#~ msgstr "Taux d'achèvement de l'ensemble d'attribut" + +#~ msgid "Attribute Set Completion State" +#~ msgstr "État d'achèvement de l'ensemble d'attribut" + +#~ msgid "Attribute Set completed criterias" +#~ msgstr "Critères remplis de l'ensemble d'attribut" + +#~ msgid "Attribute Set not completed criterias" +#~ msgstr "Critères non remplis de l'ensemble d'attribut" + +#~ msgid "Attribute set completeness percentage" +#~ msgstr "Pourcentage de complétude de l'ensemble d'attribut" + +#~ msgid "Attribute set completeness status" +#~ msgstr "État de complétude de l'ensemble d'attribut" + +#~ msgid "Completeness Requirements" +#~ msgstr "Exigences d'exhaustivité" + +#~ msgid "Display Name" +#~ msgstr "Nom affiché" + +#~ msgid "Last Modified on" +#~ msgstr "Dernière modification le" + +#~ msgid "Product Template" +#~ msgstr "Article" + +#~ msgid "Volume" +#~ msgstr "Volume" + +#~ msgid "Weight" +#~ msgstr "Poids" diff --git a/product_attribute_set/i18n/it.po b/product_attribute_set/i18n/it.po new file mode 100644 index 000000000..db3037c1e --- /dev/null +++ b/product_attribute_set/i18n/it.po @@ -0,0 +1,105 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_attribute_set +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-07-22 08:58+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.6.2\n" + +#. module: product_attribute_set +#: model:ir.model,name:product_attribute_set.model_attribute_attribute +msgid "Attribute" +msgstr "Attributo" + +#. 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 "Impostazione attibuto" + +#. module: product_attribute_set +#: model_terms:ir.ui.view,arch_db:product_attribute_set.product_template_form_view +#: model_terms:ir.ui.view,arch_db:product_attribute_set.product_variant_easy_edit_view +msgid "Attributes" +msgstr "Attributi" + +#. module: product_attribute_set +#: model:attribute.set,name:product_attribute_set.computer_attribute_set +msgid "Computer" +msgstr "Calcolatore" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_category__attribute_set_id +msgid "Default Attribute Set" +msgstr "Impostazione attributo predefinita" + +#. 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:attribute.set,name:product_attribute_set.mouse_attribute_set +msgid "Mouse" +msgstr "Mouse" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.computer_processor_attribute_ir_model_fields +msgid "Processor" +msgstr "Processore" + +#. module: product_attribute_set +#: model:ir.model,name:product_attribute_set.model_product_template +msgid "Product" +msgstr "Prodotto" + +#. module: product_attribute_set +#: model:ir.model,name:product_attribute_set.model_product_category +msgid "Product Category" +msgstr "Categoria prodotto" + +#. module: product_attribute_set +#: model:ir.model,name:product_attribute_set.model_product_product +msgid "Product Variant" +msgstr "Variante prodotto" + +#. module: product_attribute_set +#: model:attribute.group,name:product_attribute_set.computer_technical_attribute_group +msgid "Technical" +msgstr "Tecnico" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.computer_tech_description_attribute_ir_model_fields +msgid "Technical Description" +msgstr "Descrizione tecnica" + +#. module: product_attribute_set +#: model:attribute.group,name:product_attribute_set.computer_transport_attribute_group +msgid "Transport" +msgstr "Trasporto" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.computer_linux_compatible_attribute_ir_model_fields +msgid "X Linux Compatible" +msgstr "Compatibile con 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 000000000..fde6a29b6 --- /dev/null +++ b/product_attribute_set/i18n/product_attribute_set.pot @@ -0,0 +1,102 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_attribute_set +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.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,name:product_attribute_set.model_attribute_attribute +msgid "Attribute" +msgstr "" + +#. 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_terms:ir.ui.view,arch_db:product_attribute_set.product_template_form_view +#: model_terms:ir.ui.view,arch_db:product_attribute_set.product_variant_easy_edit_view +msgid "Attributes" +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: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:attribute.set,name:product_attribute_set.mouse_attribute_set +msgid "Mouse" +msgstr "" + +#. module: product_attribute_set +#: 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_template +msgid "Product" +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_product +msgid "Product Variant" +msgstr "" + +#. module: product_attribute_set +#: model:attribute.group,name:product_attribute_set.computer_technical_attribute_group +msgid "Technical" +msgstr "" + +#. module: product_attribute_set +#: 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: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/tr.po b/product_attribute_set/i18n/tr.po new file mode 100644 index 000000000..b1f336615 --- /dev/null +++ b/product_attribute_set/i18n/tr.po @@ -0,0 +1,105 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_attribute_set +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-03-07 08:36+0000\n" +"Last-Translator: Ömer KÜLAK \n" +"Language-Team: none\n" +"Language: tr\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,name:product_attribute_set.model_attribute_attribute +msgid "Attribute" +msgstr "" + +#. 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 "Nitelik Seti" + +#. module: product_attribute_set +#: model_terms:ir.ui.view,arch_db:product_attribute_set.product_template_form_view +#: model_terms:ir.ui.view,arch_db:product_attribute_set.product_variant_easy_edit_view +msgid "Attributes" +msgstr "Nitelikler" + +#. module: product_attribute_set +#: model:attribute.set,name:product_attribute_set.computer_attribute_set +msgid "Computer" +msgstr "Bilgisayar" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.field_product_category__attribute_set_id +msgid "Default Attribute Set" +msgstr "Varsayılan Nitelik Seti" + +#. module: product_attribute_set +#: model:attribute.option,name:product_attribute_set.computer_processor_attribute_option_1 +msgid "Intel i5" +msgstr "İntel i5" + +#. module: product_attribute_set +#: model:attribute.option,name:product_attribute_set.computer_processor_attribute_option_2 +msgid "Intel i6" +msgstr "İntel i6" + +#. module: product_attribute_set +#: model:attribute.option,name:product_attribute_set.computer_processor_attribute_option_3 +msgid "Intel i7" +msgstr "İntel i7" + +#. module: product_attribute_set +#: model:attribute.set,name:product_attribute_set.mouse_attribute_set +msgid "Mouse" +msgstr "Fare" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.computer_processor_attribute_ir_model_fields +msgid "Processor" +msgstr "İşlemci" + +#. module: product_attribute_set +#: model:ir.model,name:product_attribute_set.model_product_template +msgid "Product" +msgstr "Ürün" + +#. module: product_attribute_set +#: model:ir.model,name:product_attribute_set.model_product_category +msgid "Product Category" +msgstr "Ürün Kategorisi" + +#. module: product_attribute_set +#: model:ir.model,name:product_attribute_set.model_product_product +msgid "Product Variant" +msgstr "" + +#. module: product_attribute_set +#: model:attribute.group,name:product_attribute_set.computer_technical_attribute_group +msgid "Technical" +msgstr "Teknik" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.computer_tech_description_attribute_ir_model_fields +msgid "Technical Description" +msgstr "Teknik Açıklama" + +#. module: product_attribute_set +#: model:attribute.group,name:product_attribute_set.computer_transport_attribute_group +msgid "Transport" +msgstr "Ulaşım" + +#. module: product_attribute_set +#: model:ir.model.fields,field_description:product_attribute_set.computer_linux_compatible_attribute_ir_model_fields +msgid "X Linux Compatible" +msgstr "X Linux Uyumlu" diff --git a/product_attribute_set/models/__init__.py b/product_attribute_set/models/__init__.py new file mode 100644 index 000000000..d3ddd3de9 --- /dev/null +++ b/product_attribute_set/models/__init__.py @@ -0,0 +1,3 @@ +from . import attribute_attribute +from . import product_category +from . import product diff --git a/product_attribute_set/models/attribute_attribute.py b/product_attribute_set/models/attribute_attribute.py new file mode 100644 index 000000000..80161185b --- /dev/null +++ b/product_attribute_set/models/attribute_attribute.py @@ -0,0 +1,14 @@ +# Copyright 2023 ForgeFlow S.L. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import models + + +class AttributeAttribute(models.Model): + _inherit = "attribute.attribute" + + def _get_attribute_set_allowed_model(self): + res = super()._get_attribute_set_allowed_model() + if self.model_id.model == "product.product": + res |= self.env["ir.model"].search([("model", "=", "product.template")]) + return res diff --git a/product_attribute_set/models/product.py b/product_attribute_set/models/product.py new file mode 100644 index 000000000..4d5005a1f --- /dev/null +++ b/product_attribute_set/models/product.py @@ -0,0 +1,57 @@ +# 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.""" + # Use the current product's category to determine default attribute set + if self.categ_id: + return self.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 + + +class ProductProduct(models.Model): + _inherit = ["product.product", "attribute.set.owner.mixin"] + _name = "product.product" + + attribute_set_id = fields.Many2one( + related="product_tmpl_id.attribute_set_id", store=True + ) + + @api.model + def _get_attribute_set_owner_model(self): + return [("model", "in", ("product.product", "product.template"))] diff --git a/product_attribute_set/models/product_category.py b/product_attribute_set/models/product_category.py new file mode 100644 index 000000000..11007acca --- /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) + 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 res diff --git a/product_attribute_set/pyproject.toml b/product_attribute_set/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/product_attribute_set/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/product_attribute_set/readme/CONTRIBUTORS.md b/product_attribute_set/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..b4f358e83 --- /dev/null +++ b/product_attribute_set/readme/CONTRIBUTORS.md @@ -0,0 +1,7 @@ +- Sébastien BEAU \<\> +- Clément Mombereau \<\> +- Benoît Guillot \<\> +- David Dufresne \<\> +- El Hadji Dem \<\> +- Denis Roussel \<\> +- Mohamed Alkobrosli \<\> diff --git a/product_attribute_set/readme/DESCRIPTION.md b/product_attribute_set/readme/DESCRIPTION.md new file mode 100644 index 000000000..a9afef89b --- /dev/null +++ b/product_attribute_set/readme/DESCRIPTION.md @@ -0,0 +1,11 @@ +This module allows to display product's Attributes in product form views +thanks to the +[attribute_set](https://github.com/akretion/odoo-pim/tree/12.0/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](https://github.com/akretion/odoo-pim/tree/12.0/pim_attribute_set) +module in the PIM (Product Information Management) application developed +by [Akretion](https://akretion.com/) diff --git a/product_attribute_set/readme/ROADMAP.md b/product_attribute_set/readme/ROADMAP.md new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/product_attribute_set/readme/ROADMAP.md @@ -0,0 +1 @@ + diff --git a/product_attribute_set/readme/USAGE.md b/product_attribute_set/readme/USAGE.md new file mode 100644 index 000000000..d16b1141f --- /dev/null +++ b/product_attribute_set/readme/USAGE.md @@ -0,0 +1,2 @@ +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..15ef191a1 --- /dev/null +++ b/product_attribute_set/static/description/index.html @@ -0,0 +1,454 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

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
  • +
+
+
+

Contributors

+ +
+
+

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 000000000..2394d77ae --- /dev/null +++ b/product_attribute_set/views/product.xml @@ -0,0 +1,79 @@ + + + + + + {"include_native_attribute_view_ref": 1, "search_default_filter_to_sell": 1} + + + + attributes.product.normal.form + product.template + + + +
+
+
+ + + + + + +
+
+ + product.template + + + + + + + + + + + + + {"include_native_attribute_view_ref": 1} + + + + + {"include_native_attribute_view_ref": 1, "search_default_filter_to_sell": 1} + + + + + product.product.view.form.easy - product_attribute_set + product.product + + + + + + + + + + +
diff --git a/product_attribute_set/views/product_category.xml b/product_attribute_set/views/product_category.xml new file mode 100644 index 000000000..8709d0812 --- /dev/null +++ b/product_attribute_set/views/product_category.xml @@ -0,0 +1,17 @@ + + + + product.category.form + product.category + + + + + + + + diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 000000000..38e03e959 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1 @@ +odoo-addon-attribute_set @ git+https://github.com/OCA/odoo-pim.git@refs/pull/226/head#subdirectory=attribute_set