diff --git a/product_fao_fishing/README.rst b/product_fao_fishing/README.rst new file mode 100644 index 00000000..f94fceb4 --- /dev/null +++ b/product_fao_fishing/README.rst @@ -0,0 +1,100 @@ +=================== +Product FAO Fishing +=================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:c3f59b7e2f9e0f9a856b80d761e3df11548e7d9afedd26c1ef8d4c685bdccc18 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Fcommunity--data--files-lightgray.png?logo=github + :target: https://github.com/OCA/community-data-files/tree/17.0/product_fao_fishing + :alt: OCA/community-data-files +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/community-data-files-17-0/community-data-files-17-0-product_fao_fishing + :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/community-data-files&target_branch=17.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module extends the functionality of product module to allow to set +some data related to fishing areas and capture technologies as +attributes. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +1. Go to *Sales > Configuration > Products > Attribute Values* + + - Update fish FAO areas if you want + +Usage +===== + +1. Go to *Sales > Configuration > Settings* + + - Active "Variants and Options" and apply changes + +2. Go to *Sales > Products > Products* + + - In *Variants* tab you can add *FAO Fishing Areas* attribute and + select an attribute value. + +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 +------- + +* Tecnativa + +Contributors +------------ + +- `Tecnativa `__: + + - Sergio Teruel + - Ernesto Tejeda + +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/community-data-files `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_fao_fishing/__init__.py b/product_fao_fishing/__init__.py new file mode 100644 index 00000000..31660d6a --- /dev/null +++ b/product_fao_fishing/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import models diff --git a/product_fao_fishing/__manifest__.py b/product_fao_fishing/__manifest__.py new file mode 100644 index 00000000..d5a200a2 --- /dev/null +++ b/product_fao_fishing/__manifest__.py @@ -0,0 +1,19 @@ +# Copyright 2018 Tecnativa - Sergio Teruel +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +{ + "name": "Product FAO Fishing", + "summary": "Set fishing areas and capture technology", + "version": "17.0.1.0.0", + "development_status": "Beta", + "category": "Fishing", + "website": "https://github.com/OCA/community-data-files", + "author": "Tecnativa, Odoo Community Association (OCA)", + "license": "AGPL-3", + "installable": True, + "depends": ["product"], + "data": [ + "data/product_fao_fishing_data.xml", + "data/product_fao_fishing_technique_data.xml", + "views/product_attribute_views.xml", + ], +} diff --git a/product_fao_fishing/data/product_fao_fishing_data.xml b/product_fao_fishing/data/product_fao_fishing_data.xml new file mode 100644 index 00000000..e1885678 --- /dev/null +++ b/product_fao_fishing/data/product_fao_fishing_data.xml @@ -0,0 +1,153 @@ + + + + FAO Fishing Areas + no_variant + select + + + + Africa - Inland waters + + + + + America, North - Inland waters + + + + + America, South - Inland waters + + + + + Asia - Inland waters + + + + + Europe - Inland waters + + + + + Oceania - Inland waters + + + + + Former USSR area - Inland waters + + + + + Antarctica - Inland waters + + + + + Arctic Sea + + + + + Atlantic, Northwest + + + + + Atlantic, Northeast + + + + + Atlantic, Western Central + + + + + Atlantic, Eastern Central + + + + + Mediterranean and Black Sea + + + + + Atlantic, Southwest + + + + + Atlantic, Southeast + + + + + Atlantic, Antarctic + + + + + Indian Ocean, Western + + + + + Indian Ocean, Eastern + + + + + Indian Ocean, Antarctic + + + + + Pacific, Northwest + + + + + Pacific, Northeast + + + + + Pacific, Western Central + + + + + Pacific, Eastern Central + + + + + Pacific, Southwest + + + + + Pacific, Southeast + + + + + Pacific, Antarctic + + + + + Antarctic areas nei + + + + + Marine areas outside the Antarctic + + + diff --git a/product_fao_fishing/data/product_fao_fishing_technique_data.xml b/product_fao_fishing/data/product_fao_fishing_technique_data.xml new file mode 100644 index 00000000..57a34aba --- /dev/null +++ b/product_fao_fishing/data/product_fao_fishing_technique_data.xml @@ -0,0 +1,53 @@ + + + + FAO Fishing Technique + no_variant + select + + + Spearfishing + + + + Netting + + + + Trawl nets + + + + Enmanelle nets and similar + + + + Purse seines and nets hoisted + + + + Angling + + + + Harrows + + + + Trapping + + + + Aquaculture + + + diff --git a/product_fao_fishing/i18n/es.po b/product_fao_fishing/i18n/es.po new file mode 100644 index 00000000..fc8a92a8 --- /dev/null +++ b/product_fao_fishing/i18n/es.po @@ -0,0 +1,254 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_fao_fishing +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-12 18:18+0000\n" +"PO-Revision-Date: 2023-08-02 12:09+0000\n" +"Last-Translator: Ivorra78 \n" +"Language-Team: \n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_1 +msgid "Africa - Inland waters" +msgstr "África - Aguas continentales" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_2 +msgid "America, North - Inland waters" +msgstr "América, Norte - Aguas continentales" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_3 +msgid "America, South - Inland waters" +msgstr "América, Sur - Aguas continentales" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_angling +msgid "Angling" +msgstr "Pesca con caña" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_98 +msgid "Antarctic areas nei" +msgstr "Áreas antárticas" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_8 +msgid "Antarctica - Inland waters" +msgstr "Antártida - Aguas continentales" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_aquaculture +msgid "Aquaculture" +msgstr "Acuicultura" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_18 +msgid "Arctic Sea" +msgstr "Mar Ártico" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_4 +msgid "Asia - Inland waters" +msgstr "Asia - Aguas continentales" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_48 +msgid "Atlantic, Antarctic" +msgstr "Atlántico, Antártico" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_34 +msgid "Atlantic, Eastern Central" +msgstr "Atlántico, Este Central" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_27 +msgid "Atlantic, Northeast" +msgstr "Atlántico, Noreste" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_21 +msgid "Atlantic, Northwest" +msgstr "Atlántico, Noroeste" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_47 +msgid "Atlantic, Southeast" +msgstr "Atlántico, Sudeste" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_41 +msgid "Atlantic, Southwest" +msgstr "Atlántico, suroeste" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_31 +msgid "Atlantic, Western Central" +msgstr "Atlántico, centro occidental" + +#. module: product_fao_fishing +#: model:ir.model,name:product_fao_fishing.model_product_attribute_value +msgid "Attribute Value" +msgstr "Valor del Atributo" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_enmanelle_nets +msgid "Enmanelle nets and similar" +msgstr "Redes Enmanelle y similares" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_5 +msgid "Europe - Inland waters" +msgstr "Europa - Aguas continentales" + +#. module: product_fao_fishing +#: model:product.attribute,name:product_fao_fishing.fao_fishing_area +msgid "FAO Fishing Areas" +msgstr "Areas de pesca FAO" + +#. module: product_fao_fishing +#: model:product.attribute,name:product_fao_fishing.fao_fishing_technique +msgid "FAO Fishing Technique" +msgstr "Técnica de pesca FAO" + +#. module: product_fao_fishing +#: model:ir.model.fields,field_description:product_fao_fishing.field_product_product__fao_fishing_area_ids +#: model:ir.model.fields,field_description:product_fao_fishing.field_product_template__fao_fishing_area_ids +msgid "Fao Fishing Area" +msgstr "Areas de pesca FAO" + +#. module: product_fao_fishing +#: model:ir.model.fields,field_description:product_fao_fishing.field_product_product__fao_fishing_technique_ids +#: model:ir.model.fields,field_description:product_fao_fishing.field_product_template__fao_fishing_technique_ids +msgid "Fao Fishing Technique" +msgstr "Técnica de pesca FAO" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_7 +msgid "Former USSR area - Inland waters" +msgstr "Zona de la antigua URSS - Aguas continentales" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_harrows +msgid "Harrows" +msgstr "Gradas" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_58 +msgid "Indian Ocean, Antarctic" +msgstr "Océano Índico, Antártida" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_57 +msgid "Indian Ocean, Eastern" +msgstr "Océano Índico, Este" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_51 +msgid "Indian Ocean, Western" +msgstr "Océano Índico, Oeste" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_99 +msgid "Marine areas outside the Antarctic" +msgstr "Áreas marinas fuera de la Antártida" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_37 +msgid "Mediterranean and Black Sea" +msgstr "Mediterráneo y Mar Negro" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_netting +msgid "Netting" +msgstr "Redes" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_6 +msgid "Oceania - Inland waters" +msgstr "Oceanía - Aguas continentales" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_88 +msgid "Pacific, Antarctic" +msgstr "Pacífico, Antártida" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_77 +msgid "Pacific, Eastern Central" +msgstr "Pacífico, Este Central" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_67 +msgid "Pacific, Northeast" +msgstr "Pacífico, Noreste" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_61 +msgid "Pacific, Northwest" +msgstr "Noroeste pacífico" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_87 +msgid "Pacific, Southeast" +msgstr "Pacífico, Sudeste" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_81 +msgid "Pacific, Southwest" +msgstr "Pacífico, suroeste" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_71 +msgid "Pacific, Western Central" +msgstr "Pacífico, centro occidental" + +#. module: product_fao_fishing +#: model:ir.model,name:product_fao_fishing.model_product_template +msgid "Product" +msgstr "Producto" + +#. module: product_fao_fishing +#: model:ir.model,name:product_fao_fishing.model_product_template_attribute_value +msgid "Product Template Attribute Value" +msgstr "Valor personalizado del atributo del producto" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_purse_nets +msgid "Purse seines and nets hoisted" +msgstr "Izado de redes y redes de cerco" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_spearfishing +msgid "Spearfishing" +msgstr "Pesca submarina" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_trapping +msgid "Trapping" +msgstr "Captura" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_trawl_nets +msgid "Trawl nets" +msgstr "Redes de arrastre" + +#. module: product_fao_fishing +#: model:ir.model.fields,field_description:product_fao_fishing.field_product_attribute_value__fao_zone_code +#: model:ir.model.fields,field_description:product_fao_fishing.field_product_template_attribute_value__fao_zone_code +msgid "Zone Code" +msgstr "Código Zona" + +#~ msgid "Product Template" +#~ msgstr "Plantilla de producto" diff --git a/product_fao_fishing/i18n/product_fao_fishing.pot b/product_fao_fishing/i18n/product_fao_fishing.pot new file mode 100644 index 00000000..ce1acae0 --- /dev/null +++ b/product_fao_fishing/i18n/product_fao_fishing.pot @@ -0,0 +1,247 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_fao_fishing +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.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_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_1 +msgid "Africa - Inland waters" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_2 +msgid "America, North - Inland waters" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_3 +msgid "America, South - Inland waters" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_angling +msgid "Angling" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_98 +msgid "Antarctic areas nei" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_8 +msgid "Antarctica - Inland waters" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_aquaculture +msgid "Aquaculture" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_18 +msgid "Arctic Sea" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_4 +msgid "Asia - Inland waters" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_48 +msgid "Atlantic, Antarctic" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_34 +msgid "Atlantic, Eastern Central" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_27 +msgid "Atlantic, Northeast" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_21 +msgid "Atlantic, Northwest" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_47 +msgid "Atlantic, Southeast" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_41 +msgid "Atlantic, Southwest" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_31 +msgid "Atlantic, Western Central" +msgstr "" + +#. module: product_fao_fishing +#: model:ir.model,name:product_fao_fishing.model_product_attribute_value +msgid "Attribute Value" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_enmanelle_nets +msgid "Enmanelle nets and similar" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_5 +msgid "Europe - Inland waters" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute,name:product_fao_fishing.fao_fishing_area +msgid "FAO Fishing Areas" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute,name:product_fao_fishing.fao_fishing_technique +msgid "FAO Fishing Technique" +msgstr "" + +#. module: product_fao_fishing +#: model:ir.model.fields,field_description:product_fao_fishing.field_product_product__fao_fishing_area_ids +#: model:ir.model.fields,field_description:product_fao_fishing.field_product_template__fao_fishing_area_ids +msgid "Fao Fishing Area" +msgstr "" + +#. module: product_fao_fishing +#: model:ir.model.fields,field_description:product_fao_fishing.field_product_product__fao_fishing_technique_ids +#: model:ir.model.fields,field_description:product_fao_fishing.field_product_template__fao_fishing_technique_ids +msgid "Fao Fishing Technique" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_7 +msgid "Former USSR area - Inland waters" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_harrows +msgid "Harrows" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_58 +msgid "Indian Ocean, Antarctic" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_57 +msgid "Indian Ocean, Eastern" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_51 +msgid "Indian Ocean, Western" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_99 +msgid "Marine areas outside the Antarctic" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_37 +msgid "Mediterranean and Black Sea" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_netting +msgid "Netting" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_6 +msgid "Oceania - Inland waters" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_88 +msgid "Pacific, Antarctic" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_77 +msgid "Pacific, Eastern Central" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_67 +msgid "Pacific, Northeast" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_61 +msgid "Pacific, Northwest" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_87 +msgid "Pacific, Southeast" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_81 +msgid "Pacific, Southwest" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_71 +msgid "Pacific, Western Central" +msgstr "" + +#. module: product_fao_fishing +#: model:ir.model,name:product_fao_fishing.model_product_template +msgid "Product" +msgstr "" + +#. module: product_fao_fishing +#: model:ir.model,name:product_fao_fishing.model_product_template_attribute_value +msgid "Product Template Attribute Value" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_purse_nets +msgid "Purse seines and nets hoisted" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_spearfishing +msgid "Spearfishing" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_trapping +msgid "Trapping" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_trawl_nets +msgid "Trawl nets" +msgstr "" + +#. module: product_fao_fishing +#: model:ir.model.fields,field_description:product_fao_fishing.field_product_attribute_value__fao_zone_code +#: model:ir.model.fields,field_description:product_fao_fishing.field_product_template_attribute_value__fao_zone_code +msgid "Zone Code" +msgstr "" diff --git a/product_fao_fishing/i18n/pt_BR.po b/product_fao_fishing/i18n/pt_BR.po new file mode 100644 index 00000000..526061eb --- /dev/null +++ b/product_fao_fishing/i18n/pt_BR.po @@ -0,0 +1,248 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_fao_fishing +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: pt_BR\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_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_1 +msgid "Africa - Inland waters" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_2 +msgid "America, North - Inland waters" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_3 +msgid "America, South - Inland waters" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_angling +msgid "Angling" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_98 +msgid "Antarctic areas nei" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_8 +msgid "Antarctica - Inland waters" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_aquaculture +msgid "Aquaculture" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_18 +msgid "Arctic Sea" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_4 +msgid "Asia - Inland waters" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_48 +msgid "Atlantic, Antarctic" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_34 +msgid "Atlantic, Eastern Central" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_27 +msgid "Atlantic, Northeast" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_21 +msgid "Atlantic, Northwest" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_47 +msgid "Atlantic, Southeast" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_41 +msgid "Atlantic, Southwest" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_31 +msgid "Atlantic, Western Central" +msgstr "" + +#. module: product_fao_fishing +#: model:ir.model,name:product_fao_fishing.model_product_attribute_value +msgid "Attribute Value" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_enmanelle_nets +msgid "Enmanelle nets and similar" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_5 +msgid "Europe - Inland waters" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute,name:product_fao_fishing.fao_fishing_area +msgid "FAO Fishing Areas" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute,name:product_fao_fishing.fao_fishing_technique +msgid "FAO Fishing Technique" +msgstr "" + +#. module: product_fao_fishing +#: model:ir.model.fields,field_description:product_fao_fishing.field_product_product__fao_fishing_area_ids +#: model:ir.model.fields,field_description:product_fao_fishing.field_product_template__fao_fishing_area_ids +msgid "Fao Fishing Area" +msgstr "" + +#. module: product_fao_fishing +#: model:ir.model.fields,field_description:product_fao_fishing.field_product_product__fao_fishing_technique_ids +#: model:ir.model.fields,field_description:product_fao_fishing.field_product_template__fao_fishing_technique_ids +msgid "Fao Fishing Technique" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_7 +msgid "Former USSR area - Inland waters" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_harrows +msgid "Harrows" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_58 +msgid "Indian Ocean, Antarctic" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_57 +msgid "Indian Ocean, Eastern" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_51 +msgid "Indian Ocean, Western" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_99 +msgid "Marine areas outside the Antarctic" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_37 +msgid "Mediterranean and Black Sea" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_netting +msgid "Netting" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_6 +msgid "Oceania - Inland waters" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_88 +msgid "Pacific, Antarctic" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_77 +msgid "Pacific, Eastern Central" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_67 +msgid "Pacific, Northeast" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_61 +msgid "Pacific, Northwest" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_87 +msgid "Pacific, Southeast" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_81 +msgid "Pacific, Southwest" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_71 +msgid "Pacific, Western Central" +msgstr "" + +#. module: product_fao_fishing +#: model:ir.model,name:product_fao_fishing.model_product_template +msgid "Product" +msgstr "" + +#. module: product_fao_fishing +#: model:ir.model,name:product_fao_fishing.model_product_template_attribute_value +msgid "Product Template Attribute Value" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_purse_nets +msgid "Purse seines and nets hoisted" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_spearfishing +msgid "Spearfishing" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_trapping +msgid "Trapping" +msgstr "" + +#. module: product_fao_fishing +#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_trawl_nets +msgid "Trawl nets" +msgstr "" + +#. module: product_fao_fishing +#: model:ir.model.fields,field_description:product_fao_fishing.field_product_attribute_value__fao_zone_code +#: model:ir.model.fields,field_description:product_fao_fishing.field_product_template_attribute_value__fao_zone_code +msgid "Zone Code" +msgstr "" diff --git a/product_fao_fishing/models/__init__.py b/product_fao_fishing/models/__init__.py new file mode 100644 index 00000000..45784799 --- /dev/null +++ b/product_fao_fishing/models/__init__.py @@ -0,0 +1,4 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import product_attribute +from . import product_template diff --git a/product_fao_fishing/models/product_attribute.py b/product_fao_fishing/models/product_attribute.py new file mode 100644 index 00000000..9994ec89 --- /dev/null +++ b/product_fao_fishing/models/product_attribute.py @@ -0,0 +1,16 @@ +# Copyright 2018 Tecnativa - Sergio Teruel +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ProductAttributeValue(models.Model): + _inherit = "product.attribute.value" + + fao_zone_code = fields.Char(string="Zone Code") + + +class ProductTemplateAttributeValue(models.Model): + _inherit = "product.template.attribute.value" + + fao_zone_code = fields.Char(related="product_attribute_value_id.fao_zone_code") diff --git a/product_fao_fishing/models/product_template.py b/product_fao_fishing/models/product_template.py new file mode 100644 index 00000000..1e489f65 --- /dev/null +++ b/product_fao_fishing/models/product_template.py @@ -0,0 +1,50 @@ +# Copyright 2018 Tecnativa - Sergio Teruel +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ProductTemplate(models.Model): + _inherit = "product.template" + + fao_fishing_area_ids = fields.Many2many( + comodel_name="product.attribute.value", compute="_compute_fao_fishing_area_ids" + ) + fao_fishing_technique_ids = fields.Many2many( + comodel_name="product.attribute.value", + compute="_compute_fao_fishing_technique_ids", + ) + + def _compute_fao_fishing_area_ids(self): + """ + Helper method to retrieve the fishing areas from product attributes + """ + fao_fishing_area_attribute = self.env.ref( + "product_fao_fishing.fao_fishing_area" + ) + ptal_obj = self.env["product.template.attribute.line"] + for template in self: + attribute_line = ptal_obj.search( + [ + ("product_tmpl_id", "=", template.id), + ("attribute_id", "=", fao_fishing_area_attribute.id), + ] + ) + template.fao_fishing_area_ids = attribute_line.value_ids + + def _compute_fao_fishing_technique_ids(self): + """ + Helper method to retrieve the fishing techniques from product attributes + """ + fao_fishing_technique_attribute = self.env.ref( + "product_fao_fishing.fao_fishing_technique" + ) + ptal_obj = self.env["product.template.attribute.line"] + for template in self: + attribute_line = ptal_obj.search( + [ + ("product_tmpl_id", "=", template.id), + ("attribute_id", "=", fao_fishing_technique_attribute.id), + ] + ) + template.fao_fishing_technique_ids = attribute_line.value_ids diff --git a/product_fao_fishing/pyproject.toml b/product_fao_fishing/pyproject.toml new file mode 100644 index 00000000..4231d0cc --- /dev/null +++ b/product_fao_fishing/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/product_fao_fishing/readme/CONFIGURE.md b/product_fao_fishing/readme/CONFIGURE.md new file mode 100644 index 00000000..012c25d1 --- /dev/null +++ b/product_fao_fishing/readme/CONFIGURE.md @@ -0,0 +1,2 @@ +1. Go to *Sales \> Configuration \> Products \> Attribute Values* + - Update fish FAO areas if you want diff --git a/product_fao_fishing/readme/CONTRIBUTORS.md b/product_fao_fishing/readme/CONTRIBUTORS.md new file mode 100644 index 00000000..e01c42b3 --- /dev/null +++ b/product_fao_fishing/readme/CONTRIBUTORS.md @@ -0,0 +1,3 @@ +- [Tecnativa](https://www.tecnativa.com): + - Sergio Teruel + - Ernesto Tejeda diff --git a/product_fao_fishing/readme/DESCRIPTION.md b/product_fao_fishing/readme/DESCRIPTION.md new file mode 100644 index 00000000..29bd0bf1 --- /dev/null +++ b/product_fao_fishing/readme/DESCRIPTION.md @@ -0,0 +1,3 @@ +This module extends the functionality of product module to allow to set +some data related to fishing areas and capture technologies as +attributes. diff --git a/product_fao_fishing/readme/USAGE.md b/product_fao_fishing/readme/USAGE.md new file mode 100644 index 00000000..851e9931 --- /dev/null +++ b/product_fao_fishing/readme/USAGE.md @@ -0,0 +1,5 @@ +1. Go to *Sales \> Configuration \> Settings* + - Active "Variants and Options" and apply changes +2. Go to *Sales \> Products \> Products* + - In *Variants* tab you can add *FAO Fishing Areas* attribute and + select an attribute value. diff --git a/product_fao_fishing/static/description/icon.png b/product_fao_fishing/static/description/icon.png new file mode 100644 index 00000000..3a0328b5 Binary files /dev/null and b/product_fao_fishing/static/description/icon.png differ diff --git a/product_fao_fishing/static/description/index.html b/product_fao_fishing/static/description/index.html new file mode 100644 index 00000000..8a8aa0a4 --- /dev/null +++ b/product_fao_fishing/static/description/index.html @@ -0,0 +1,452 @@ + + + + + + +Product FAO Fishing + + + +
+

Product FAO Fishing

+ + +

Beta License: AGPL-3 OCA/community-data-files Translate me on Weblate Try me on Runboat

+

This module extends the functionality of product module to allow to set +some data related to fishing areas and capture technologies as +attributes.

+

Table of contents

+ +
+

Configuration

+
    +
  1. Go to Sales > Configuration > Products > Attribute Values
      +
    • Update fish FAO areas if you want
    • +
    +
  2. +
+
+
+

Usage

+
    +
  1. Go to Sales > Configuration > Settings
      +
    • Active “Variants and Options” and apply changes
    • +
    +
  2. +
  3. Go to Sales > Products > Products
      +
    • In Variants tab you can add FAO Fishing Areas attribute and +select an attribute value.
    • +
    +
  4. +
+
+
+

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

+
    +
  • Tecnativa
  • +
+
+
+

Contributors

+
    +
  • Tecnativa:
      +
    • Sergio Teruel
    • +
    • Ernesto Tejeda
    • +
    +
  • +
+
+
+

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/community-data-files project on GitHub.

+

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

+
+
+
+ + diff --git a/product_fao_fishing/tests/__init__.py b/product_fao_fishing/tests/__init__.py new file mode 100644 index 00000000..425c8329 --- /dev/null +++ b/product_fao_fishing/tests/__init__.py @@ -0,0 +1,2 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from . import test_product_fao_fishing diff --git a/product_fao_fishing/tests/test_product_fao_fishing.py b/product_fao_fishing/tests/test_product_fao_fishing.py new file mode 100644 index 00000000..9c76eb0f --- /dev/null +++ b/product_fao_fishing/tests/test_product_fao_fishing.py @@ -0,0 +1,67 @@ +# Copyright 2018 Tecnativa - Sergio Teruel +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo.tests import TransactionCase + +from odoo.addons.base.tests.common import DISABLED_MAIL_CONTEXT + + +class TestProductFaoFishing(TransactionCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.env = cls.env(context=dict(cls.env.context, **DISABLED_MAIL_CONTEXT)) + cls.product_attribute = cls.env.ref("product_fao_fishing.fao_fishing_area") + cls.fao_technique_attribute = cls.env.ref( + "product_fao_fishing.fao_fishing_technique" + ) + cls.product_attribute_value_1 = cls.env.ref( + "product_fao_fishing.fao_fishing_area_1" + ) + cls.product_attribute_value_2 = cls.env.ref( + "product_fao_fishing.fao_fishing_area_2" + ) + cls.technique_attribute_value_1 = cls.env.ref( + "product_fao_fishing.fishing_technique_att_value_spearfishing" + ) + cls.technique_attribute_value_2 = cls.env.ref( + "product_fao_fishing.fishing_technique_att_value_harrows" + ) + cls.product = cls.env["product.template"].create( + { + "name": "test", + "attribute_line_ids": [ + ( + 0, + 0, + { + "attribute_id": cls.product_attribute.id, + "value_ids": [ + (4, cls.product_attribute_value_1.id), + (4, cls.product_attribute_value_2.id), + ], + }, + ), + ( + 0, + 0, + { + "attribute_id": cls.fao_technique_attribute.id, + "value_ids": [ + (4, cls.technique_attribute_value_1.id), + (4, cls.technique_attribute_value_2.id), + ], + }, + ), + ], + } + ) + cls.fishing_tech_arrow = cls.env.ref( + "product_fao_fishing.fishing_technique_att_value_harrows" + ) + + def test_fishing_areas_from_attribute(self): + """ + Test helper method to access directly to FAO fishing area product + """ + self.assertEqual(len(self.product.fao_fishing_area_ids), 2) + self.assertEqual(len(self.product.fao_fishing_technique_ids), 2) diff --git a/product_fao_fishing/views/product_attribute_views.xml b/product_fao_fishing/views/product_attribute_views.xml new file mode 100644 index 00000000..9b0aa031 --- /dev/null +++ b/product_fao_fishing/views/product_attribute_views.xml @@ -0,0 +1,29 @@ + + + + + product.template.attribute.value + + + + + + + + + product.template.attribute.value + + + + + + + +