From 7bf962d8d9d44e98be2e0321afdfc7d0bb9c4eba Mon Sep 17 00:00:00 2001
From: Sergio Teruel Albert
Date: Thu, 5 Jul 2018 12:13:14 +0200
Subject: [PATCH 01/22] [11.0][ADD] product_fao_fishing: New module
---
product_fao_fishing/README.rst | 94 +++++
product_fao_fishing/__init__.py | 3 +
product_fao_fishing/__manifest__.py | 24 ++
.../data/product_fao_fishing_data.xml | 183 +++++++++
.../product_fao_fishing_techique_data.xml | 40 ++
product_fao_fishing/i18n/.empty | 0
product_fao_fishing/i18n/es.po | 350 ++++++++++++++++++
product_fao_fishing/models/__init__.py | 5 +
.../models/product_attribute.py | 11 +
.../models/product_fao_fishing_technique.py | 54 +++
.../models/product_template.py | 32 ++
product_fao_fishing/readme/CONFIGURE.rst | 3 +
product_fao_fishing/readme/CONTRIBUTORS.rst | 3 +
product_fao_fishing/readme/DESCRIPTION.rst | 2 +
product_fao_fishing/readme/USAGE.rst | 7 +
.../security/ir.model.access.csv | 2 +
.../static/description/icon.png | Bin 0 -> 9455 bytes
.../static/description/index.html | 124 +++++++
product_fao_fishing/tests/__init__.py | 2 +
.../tests/test_product_fao_fishing.py | 28 ++
.../views/product_attribute_views.xml | 27 ++
.../views/product_fao_techinique_views.xml | 61 +++
.../views/product_template_views.xml | 17 +
23 files changed, 1072 insertions(+)
create mode 100644 product_fao_fishing/README.rst
create mode 100644 product_fao_fishing/__init__.py
create mode 100644 product_fao_fishing/__manifest__.py
create mode 100644 product_fao_fishing/data/product_fao_fishing_data.xml
create mode 100644 product_fao_fishing/data/product_fao_fishing_techique_data.xml
create mode 100644 product_fao_fishing/i18n/.empty
create mode 100644 product_fao_fishing/i18n/es.po
create mode 100644 product_fao_fishing/models/__init__.py
create mode 100644 product_fao_fishing/models/product_attribute.py
create mode 100644 product_fao_fishing/models/product_fao_fishing_technique.py
create mode 100644 product_fao_fishing/models/product_template.py
create mode 100644 product_fao_fishing/readme/CONFIGURE.rst
create mode 100644 product_fao_fishing/readme/CONTRIBUTORS.rst
create mode 100644 product_fao_fishing/readme/DESCRIPTION.rst
create mode 100644 product_fao_fishing/readme/USAGE.rst
create mode 100644 product_fao_fishing/security/ir.model.access.csv
create mode 100644 product_fao_fishing/static/description/icon.png
create mode 100644 product_fao_fishing/static/description/index.html
create mode 100644 product_fao_fishing/tests/__init__.py
create mode 100644 product_fao_fishing/tests/test_product_fao_fishing.py
create mode 100644 product_fao_fishing/views/product_attribute_views.xml
create mode 100644 product_fao_fishing/views/product_fao_techinique_views.xml
create mode 100644 product_fao_fishing/views/product_template_views.xml
diff --git a/product_fao_fishing/README.rst b/product_fao_fishing/README.rst
new file mode 100644
index 00000000..ecfcdfee
--- /dev/null
+++ b/product_fao_fishing/README.rst
@@ -0,0 +1,94 @@
+===================
+Product FAO Fishing
+===================
+
+.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ !! 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%2Fcommunity--data--files-lightgray.png?logo=github
+ :target: https://github.com/OCA/community-data-files/tree/11.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-11-0/community-data-files-11-0-product_fao_fishing
+ :alt: Translate me on Weblate
+.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
+ :target: https://runbot.odoo-community.org/runbot/101/11.0
+ :alt: Try me on Runbot
+
+|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
+=============
+
+#. Go to Sales > Settings > Attributes or Attribute Values
+
+ * Update fish FAO areas if you want
+
+Usage
+=====
+
+#. Go to Sales > Settings
+
+ * Active "Attributes and Variants" option and apply changes
+#. Go to Sales > Catalog > Product
+
+ * In variant tab you can add fish FAO area attribute ans 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 smashing 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
+
+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..86c3e733
--- /dev/null
+++ b/product_fao_fishing/__manifest__.py
@@ -0,0 +1,24 @@
+# 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': '11.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': [
+ 'security/ir.model.access.csv',
+ 'data/product_fao_fishing_data.xml',
+ 'data/product_fao_fishing_techique_data.xml',
+ 'views/product_attribute_views.xml',
+ 'views/product_fao_techinique_views.xml',
+ 'views/product_template_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..f5212dd6
--- /dev/null
+++ b/product_fao_fishing/data/product_fao_fishing_data.xml
@@ -0,0 +1,183 @@
+
+
+
+
+ FAO Fishing Areas
+ False
+
+
+
+
+ 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_techique_data.xml b/product_fao_fishing/data/product_fao_fishing_techique_data.xml
new file mode 100644
index 00000000..d0468cfb
--- /dev/null
+++ b/product_fao_fishing/data/product_fao_fishing_techique_data.xml
@@ -0,0 +1,40 @@
+
+
+
+
+ Spearfishing
+
+
+
+ Netting
+
+
+
+ Trawl nets
+
+
+
+ Enmanelle nets and similar
+
+
+
+ Purse seines and nets hoisted
+
+
+
+ Angling
+
+
+
+ Harrows
+
+
+
+ Trapping
+
+
+
+ Aquaculture
+
+
+
diff --git a/product_fao_fishing/i18n/.empty b/product_fao_fishing/i18n/.empty
new file mode 100644
index 00000000..e69de29b
diff --git a/product_fao_fishing/i18n/es.po b/product_fao_fishing/i18n/es.po
new file mode 100644
index 00000000..8bf83274
--- /dev/null
+++ b/product_fao_fishing/i18n/es.po
@@ -0,0 +1,350 @@
+# 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: 2018-07-05 12:01+0200\n"
+"PO-Revision-Date: 2018-07-05 12:24+0200\n"
+"Language-Team: \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: Poedit 1.8.7.1\n"
+"Last-Translator: Sergio Teruel \n"
+"Language: es\n"
+
+#. module: product_fao_fishing
+#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_1
+#, fuzzy
+msgid "Africa - Inland waters"
+msgstr "Sudáfrica"
+
+#. module: product_fao_fishing
+#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_2
+msgid "America, North - Inland waters"
+msgstr "África - 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 del Sur - Aguas continentales"
+
+#. module: product_fao_fishing
+#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_98
+#, fuzzy
+msgid "Antarctic areas nei"
+msgstr "Areas / Departamentos"
+
+#. module: product_fao_fishing
+#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_8
+#, fuzzy
+msgid "Antarctica - Inland waters"
+msgstr "Antártida"
+
+#. module: product_fao_fishing
+#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_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
+#, fuzzy
+msgid "Atlantic, Eastern Central"
+msgstr "República Centro Africana"
+
+#. module: product_fao_fishing
+#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_27
+msgid "Atlantic, Northeast"
+msgstr "Atlántico, nordeste"
+
+#. 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
+#, fuzzy
+msgid "Atlantic, Western Central"
+msgstr "Sáhara occidental"
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique_child_id
+msgid "Child Technique"
+msgstr "Subtécnica"
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique_complete_name
+msgid "Complete Name"
+msgstr "Nombre completo"
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique_create_uid
+msgid "Created by"
+msgstr "Creado por"
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique_create_date
+msgid "Created on"
+msgstr "Creado en"
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique_display_name
+msgid "Display Name"
+msgstr "Mostrar Nombre"
+
+#. module: product_fao_fishing
+#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_draft_nets
+#, fuzzy
+msgid "Draft nets"
+msgstr "Borrador"
+
+#. module: product_fao_fishing
+#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_enmanelle_nets
+msgid "Enmanelle nets and similar"
+msgstr ""
+
+#. module: product_fao_fishing
+#: code:addons/product_fao_fishing/models/product_fao_fishing_technique.py:52
+#, python-format
+msgid "Error ! You cannot create recursive techniques."
+msgstr "¡Error! No puede crear técnicas recursivas"
+
+#. 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 "Areas de pesca FAO"
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_product_fao_fishing_technique_id
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_template_fao_fishing_technique_id
+msgid "FAO Fishing Tech."
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_search_view
+msgid "FAO Techniques"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:ir.model,name:product_fao_fishing.model_product_fao_fishing_technique
+msgid "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.fao.fishing.technique,name:product_fao_fishing.fishing_technique_harrows
+msgid "Harrows"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique_id
+msgid "ID"
+msgstr "ID"
+
+#. module: product_fao_fishing
+#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_58
+#, fuzzy
+msgid "Indian Ocean, Antarctic"
+msgstr "Territorio británico del Océano Índico"
+
+#. module: product_fao_fishing
+#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_57
+#, fuzzy
+msgid "Indian Ocean, Eastern"
+msgstr "Territorio británico del Océano Índico"
+
+#. module: product_fao_fishing
+#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_51
+#, fuzzy
+msgid "Indian Ocean, Western"
+msgstr "Territorio británico del Océano Índico"
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique___last_update
+#, fuzzy
+msgid "Last Modified on"
+msgstr "Última modificación en"
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique_write_uid
+#, fuzzy
+msgid "Last Updated by"
+msgstr "Última modificación por"
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique_write_date
+#, fuzzy
+msgid "Last Updated on"
+msgstr "Última actualización en"
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique_parent_left
+#, fuzzy
+msgid "Left Parent"
+msgstr "Padre izquierdo"
+
+#. 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
+#, fuzzy
+msgid "Mediterranean and Black Sea"
+msgstr "Negro"
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique_name
+#, fuzzy
+msgid "Name"
+msgstr "Nombre"
+
+#. module: product_fao_fishing
+#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_traps
+msgid "Nasas and traps"
+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
+#, fuzzy
+msgid "Pacific, Eastern Central"
+msgstr "República Centro Africana"
+
+#. 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
+#, fuzzy
+msgid "Pacific, Western Central"
+msgstr "Sáhara occidental"
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique_parent_id
+#, fuzzy
+msgid "Parent Technique"
+msgstr "Padre"
+
+#. module: product_fao_fishing
+#: model:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_search_view
+msgid "Product Fao Fishing Techniques"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_list_view
+msgid "Product Fao Techiniques"
+msgstr "Técnicas de pesca"
+
+#. module: product_fao_fishing
+#: model:ir.actions.act_window,name:product_fao_fishing.product_fao_techique_action_form
+msgid "Product Fao Techniques"
+msgstr "Técnicas de pesca"
+
+#. module: product_fao_fishing
+#: model:ir.model,name:product_fao_fishing.model_product_template
+msgid "Product Template"
+msgstr "Plantilla de producto"
+
+#. module: product_fao_fishing
+#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_purse_nets
+msgid "Purse seines and nets hoisted"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique_parent_right
+#, fuzzy
+msgid "Right Parent"
+msgstr "Padre derecho"
+
+#. module: product_fao_fishing
+#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_hooks
+msgid "Sedales and hooks"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_form_view
+msgid "Technique name"
+msgstr "Nombre técnica"
+
+#. module: product_fao_fishing
+#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_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
+msgid "Zone Code"
+msgstr "Código Zona"
+
+#. module: product_fao_fishing
+#: model:ir.model,name:product_fao_fishing.model_product_attribute_value
+#, fuzzy
+msgid "product.attribute.value"
+msgstr "product.attribute.value"
diff --git a/product_fao_fishing/models/__init__.py b/product_fao_fishing/models/__init__.py
new file mode 100644
index 00000000..4905833f
--- /dev/null
+++ b/product_fao_fishing/models/__init__.py
@@ -0,0 +1,5 @@
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
+
+from . import product_attribute
+from . import product_fao_fishing_technique
+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..2555efee
--- /dev/null
+++ b/product_fao_fishing/models/product_attribute.py
@@ -0,0 +1,11 @@
+# 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')
diff --git a/product_fao_fishing/models/product_fao_fishing_technique.py b/product_fao_fishing/models/product_fao_fishing_technique.py
new file mode 100644
index 00000000..cf19c713
--- /dev/null
+++ b/product_fao_fishing/models/product_fao_fishing_technique.py
@@ -0,0 +1,54 @@
+# Copyright 2018 Tecnativa - Sergio Teruel
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
+
+from odoo import _, api, fields, models
+from odoo.exceptions import ValidationError
+
+
+class ProductFaoFishingTechnique(models.Model):
+ _name = 'product.fao.fishing.technique'
+ _description = "Fishing Technique"
+ _parent_name = "parent_id"
+ _parent_store = True
+ _parent_order = 'name'
+ _rec_name = 'complete_name'
+ _order = 'parent_left'
+
+ name = fields.Char(
+ string='Name',
+ index=True,
+ required=True,
+ translate=True,
+ )
+ complete_name = fields.Char(
+ 'Complete Name', compute='_compute_complete_name',
+ store=True)
+ parent_id = fields.Many2one(
+ comodel_name='product.fao.fishing.technique',
+ string='Parent Technique',
+ index=True,
+ ondelete='cascade',
+ )
+ child_id = fields.One2many(
+ comodel_name='product.fao.fishing.technique',
+ inverse_name='parent_id',
+ string='Child Technique',
+ )
+ parent_left = fields.Integer('Left Parent', index=1)
+ parent_right = fields.Integer('Right Parent', index=1)
+
+ @api.depends('name', 'parent_id.complete_name')
+ def _compute_complete_name(self):
+ for tech in self:
+ if tech.parent_id:
+ tech.complete_name = '{} / {}'.format(
+ tech.parent_id.complete_name, tech.name)
+ else:
+ tech.complete_name = tech.name
+
+ @api.constrains('parent_id')
+ def _check_technique_recursion(self):
+ if not self._check_recursion():
+ raise ValidationError(_(
+ 'Error ! You cannot create recursive techniques.'))
+ return True
diff --git a/product_fao_fishing/models/product_template.py b/product_fao_fishing/models/product_template.py
new file mode 100644
index 00000000..a086ded0
--- /dev/null
+++ b/product_fao_fishing/models/product_template.py
@@ -0,0 +1,32 @@
+# 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_technique_id = fields.Many2one(
+ comodel_name='product.fao.fishing.technique',
+ string='FAO Fishing Tech.',
+ ondelete='restrict',
+ )
+ fao_fishing_area_ids = fields.Many2many(
+ comodel_name='product.attribute.value',
+ compute='_compute_fao_fishing_area_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')
+ for template in self:
+ attribute_line = self.env['product.attribute.line'].search([
+ ('product_tmpl_id', '=', template.id),
+ ('attribute_id', '=', fao_fishing_area_attribute.id),
+ ])
+ template.fao_fishing_area_ids = attribute_line.value_ids
diff --git a/product_fao_fishing/readme/CONFIGURE.rst b/product_fao_fishing/readme/CONFIGURE.rst
new file mode 100644
index 00000000..5fb1cc1a
--- /dev/null
+++ b/product_fao_fishing/readme/CONFIGURE.rst
@@ -0,0 +1,3 @@
+#. Go to Sales > Settings > Attributes or Attribute Values
+
+ * Update fish FAO areas if you want
diff --git a/product_fao_fishing/readme/CONTRIBUTORS.rst b/product_fao_fishing/readme/CONTRIBUTORS.rst
new file mode 100644
index 00000000..e88095e5
--- /dev/null
+++ b/product_fao_fishing/readme/CONTRIBUTORS.rst
@@ -0,0 +1,3 @@
+* `Tecnativa `_:
+
+ * Sergio Teruel
diff --git a/product_fao_fishing/readme/DESCRIPTION.rst b/product_fao_fishing/readme/DESCRIPTION.rst
new file mode 100644
index 00000000..d0883419
--- /dev/null
+++ b/product_fao_fishing/readme/DESCRIPTION.rst
@@ -0,0 +1,2 @@
+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.rst b/product_fao_fishing/readme/USAGE.rst
new file mode 100644
index 00000000..ee777775
--- /dev/null
+++ b/product_fao_fishing/readme/USAGE.rst
@@ -0,0 +1,7 @@
+#. Go to Sales > Settings
+
+ * Active "Attributes and Variants" option and apply changes
+#. Go to Sales > Catalog > Product
+
+ * In variant tab you can add fish FAO area attribute ans select an
+ attribute value.
diff --git a/product_fao_fishing/security/ir.model.access.csv b/product_fao_fishing/security/ir.model.access.csv
new file mode 100644
index 00000000..fa51e221
--- /dev/null
+++ b/product_fao_fishing/security/ir.model.access.csv
@@ -0,0 +1,2 @@
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+access_product_fao_fishing_technique_employee,product_fao_fishing_technique_employee,model_product_fao_fishing_technique,base.group_user,1,1,1,1
diff --git a/product_fao_fishing/static/description/icon.png b/product_fao_fishing/static/description/icon.png
new file mode 100644
index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d
GIT binary patch
literal 9455
zcmW++2RxMjAAjx~&dlBk9S+%}OXg)AGE&Cb*&}d0jUxM@u(PQx^-s)697TX`ehR4?GS^qbkof1cslKgkU)h65qZ9Oc=ml_0temigYLJfnz{IDzUf>bGs4N!v3=Z3jMq&A#7%rM5eQ#dc?k~!
zVpnB`o+K7|Al`Q_U;eD$B
zfJtP*jH`siUq~{KE)`jP2|#TUEFGRryE2`i0**z#*^6~AI|YzIWy$Cu#CSLW3q=GA
z6`?GZymC;dCPk~rBS%eCb`5OLr;RUZ;D`}um=H)BfVIq%7VhiMr)_#G0N#zrNH|__
zc+blN2UAB0=617@>_u;MPHN;P;N#YoE=)R#i$k_`UAA>WWCcEVMh~L_
zj--gtp&|K1#58Yz*AHCTMziU1Jzt_jG0I@qAOHsk$2}yTmVkBp_eHuY$A9)>P6o~I
z%aQ?!(GqeQ-Y+b0I(m9pwgi(IIZZzsbMv+9w{PFtd_<_(LA~0H(xz{=FhLB@(1&qHA5EJw1>>=%q2f&^X>IQ{!GJ4e9U
z&KlB)z(84HmNgm2hg2C0>WM{E(DdPr+EeU_N@57;PC2&DmGFW_9kP&%?X4}+xWi)(
z;)z%wI5>D4a*5XwD)P--sPkoY(a~WBw;E~AW`Yue4kFa^LM3X`8x|}ZUeMnqr}>kH
zG%WWW>3ml$Yez?i%)2pbKPI7?5o?hydokgQyZsNEr{a|mLdt;X2TX(#B1j35xPnPW
z*bMSSOauW>o;*=kO8ojw91VX!qoOQb)zHJ!odWB}d+*K?#sY_jqPdg{Sm2HdYzdEx
zOGVPhVRTGPtv0o}RfVP;Nd(|CB)I;*t&QO8h
zFfekr30S!-LHmV_Su-W+rEwYXJ^;6&3|L$mMC8*bQptyOo9;>Qb9Q9`ySe3%V$A*9
zeKEe+b0{#KWGp$F+tga)0RtI)nhMa-K@JS}2krK~n8vJ=Ngm?R!9G<~RyuU0d?nz#
z-5EK$o(!F?hmX*2Yt6+coY`6jGbb7tF#6nHA
zuKk=GGJ;ZwON1iAfG$E#Y7MnZVmrY|j0eVI(DN_MNFJmyZ|;w4tf@=CCDZ#5N_0K=
z$;R~bbk?}TpfDjfB&aiQ$VA}s?P}xPERJG{kxk5~R`iRS(SK5d+Xs9swCozZISbnS
zk!)I0>t=A<-^z(cmSFz3=jZ23u13X><0b)P)^1T_))Kr`e!-pb#q&J*Q`p+B6la%C
zuVl&0duN<;uOsB3%T9Fp8t{ED108)`y_~Hnd9AUX7h-H?jVuU|}My+C=TjH(jKz
zqMVr0re3S$H@t{zI95qa)+Crz*5Zj}Ao%4Z><+W(nOZd?gDnfNBC3>M8WE61$So|P
zVvqH0SNtDTcsUdzaMDpT=Ty0pDHHNL@Z0w$Y`XO
z2M-_r1S+GaH%pz#Uy0*w$Vdl=X=rQXEzO}d6J^R6zjM1u&c9vYLvLp?W7w(?np9x1
zE_0JSAJCPB%i7p*Wvg)pn5T`8k3-uR?*NT|J`eS#_#54p>!p(mLDvmc-3o0mX*mp_
zN*AeS<>#^-{S%W<*mz^!X$w_2dHWpcJ6^j64qFBft-o}o_Vx80o0>}Du;>kLts;$8
zC`7q$QI(dKYG`Wa8#wl@V4jVWBRGQ@1dr-hstpQL)Tl+aqVpGpbSfN>5i&QMXfiZ>
zaA?T1VGe?rpQ@;+pkrVdd{klI&jVS@I5_iz!=UMpTsa~mBga?1r}aRBm1WS;TT*s0f0lY=JBl66Upy)-k4J}lh=P^8(SXk~0xW=T9v*B|gzIhN
z>qsO7dFd~mgxAy4V?&)=5ieYq?zi?ZEoj)&2o)RLy=@hbCRcfT5jigwtQGE{L*8<@Yd{zg;CsL5mvzfDY}P-wos_6PfprFVaeqNE%h
zKZhLtcQld;ZD+>=nqN~>GvROfueSzJD&BE*}XfU|H&(FssBqY=hPCt`d
zH?@s2>I(|;fcW&YM6#V#!kUIP8$Nkdh0A(bEVj``-AAyYgwY~jB
zT|I7Bf@%;7aL7Wf4dZ%VqF$eiaC38OV6oy3Z#TER2G+fOCd9Iaoy6aLYbPTN{XRPz
z;U!V|vBf%H!}52L2gH_+j;`bTcQRXB+y9onc^wLm5wi3-Be}U>k_u>2Eg$=k!(l@I
zcCg+flakT2Nej3i0yn+g+}%NYb?ta;R?(g5SnwsQ49U8Wng8d|{B+lyRcEDvR3+`O{zfmrmvFrL6acVP%yG98X
zo&+VBg@px@i)%o?dG(`T;n*$S5*rnyiR#=wW}}GsAcfyQpE|>a{=$Hjg=-*_K;UtD
z#z-)AXwSRY?OPefw^iI+
z)AXz#PfEjlwTes|_{sB?4(O@fg0AJ^g8gP}ex9Ucf*@_^J(s_5jJV}c)s$`Myn|Kd
z$6>}#q^n{4vN@+Os$m7KV+`}c%4)4pv@06af4-x5#wj!KKb%caK{A&Y#Rfs
z-po?Dcb1({W=6FKIUirH&(yg=*6aLCekcKwyfK^JN5{wcA3nhO(o}SK#!CINhI`-I
z1)6&n7O&ZmyFMuNwvEic#IiOAwNkR=u5it{B9n2sAJV5pNhar=j5`*N!Na;c7g!l$
z3aYBqUkqqTJ=Re-;)s!EOeij=7SQZ3Hq}ZRds%IM*PtM$wV
z@;rlc*NRK7i3y5BETSKuumEN`Xu_8GP1Ri=OKQ$@I^ko8>H6)4rjiG5{VBM>B|%`&&s^)jS|-_95&yc=GqjNo{zFkw%%HHhS~e=s
zD#sfS+-?*t|J!+ozP6KvtOl!R)@@-z24}`9{QaVLD^9VCSR2b`b!KC#o;Ki<+wXB6
zx3&O0LOWcg4&rv4QG0)4yb}7BFSEg~=IR5#ZRj8kg}dS7_V&^%#Do==#`u
zpy6{ox?jWuR(;pg+f@mT>#HGWHAJRRDDDv~@(IDw&R>9643kK#HN`!1vBJHnC+RM&yIh8{gG2q
zA%e*U3|N0XSRa~oX-3EAneep)@{h2vvd3Xvy$7og(sayr@95+e6~Xvi1tUqnIxoIH
zVWo*OwYElb#uyW{Imam6f2rGbjR!Y3`#gPqkv57dB6K^wRGxc9B(t|aYDGS=m$&S!NmCtrMMaUg(c
zc2qC=2Z`EEFMW-me5B)24AqF*bV5Dr-M5ig(l-WPS%CgaPzs6p_gnCIvTJ=Y<6!gT
zVt@AfYCzjjsMEGi=rDQHo0yc;HqoRNnNFeWZgcm?f;cp(6CNylj36DoL(?TS7eU#+
z7&mfr#y))+CJOXQKUMZ7QIdS9@#-}7y2K1{8)cCt0~-X0O!O?Qx#E4Og+;A2SjalQ
zs7r?qn0H044=sDN$SRG$arw~n=+T_DNdSrarmu)V6@|?1-ZB#hRn`uilTGPJ@fqEy
zGt(f0B+^JDP&f=r{#Y_wi#AVDf-y!RIXU^0jXsFpf>=Ji*TeqSY!H~AMbJdCGLhC)
zn7Rx+sXw6uYj;WRYrLd^5IZq@6JI1C^YkgnedZEYy<&4(z%Q$5yv#Boo{AH8n$a
zhb4Y3PWdr269&?V%uI$xMcUrMzl=;w<_nm*qr=c3Rl@i5wWB;e-`t7D&c-mcQl7x!
zZWB`UGcw=Y2=}~wzrfLx=uet<;m3~=8I~ZRuzvMQUQdr+yTV|ATf1Uuomr__nDf=X
zZ3WYJtHp_ri(}SQAPjv+Y+0=fH4krOP@S&=zZ-t1jW1o@}z;xk8
z(Nz1co&El^HK^NrhVHa-_;&88vTU>_J33=%{if;BEY*J#1n59=07jrGQ#IP>@u#3A
z;!q+E1Rj3ZJ+!4bq9F8PXJ@yMgZL;>&gYA0%_Kbi8?S=XGM~dnQZQ!yBSgcZhY96H
zrWnU;k)qy`rX&&xlDyA%(a1Hhi5CWkmg(`Gb%m(HKi-7Z!LKGRP_B8@`7&hdDy5n=
z`OIxqxiVfX@OX1p(mQu>0Ai*v_cTMiw4qRt3~NBvr9oBy0)r>w3p~V0SCm=An6@3n)>@z!|o-$HvDK
z|3D2ZMJkLE5loMKl6R^ez@Zz%S$&mbeoqH5`Bb){Ei21q&VP)hWS2tjShfFtGE+$z
zzCR$P#uktu+#!w)cX!lWN1XU%K-r=s{|j?)Akf@q#3b#{6cZCuJ~gCxuMXRmI$nGtnH+-h
z+GEi!*X=AP<|fG`1>MBdTb?28JYc=fGvAi2I<$B(rs$;eoJCyR6_bc~p!XR@O-+sD
z=eH`-ye})I5ic1eL~TDmtfJ|8`0VJ*Yr=hNCd)G1p2MMz4C3^Mj?7;!w|Ly%JqmuW
zlIEW^Ft%z?*|fpXda>Jr^1noFZEwFgVV%|*XhH@acv8rdGxeEX{M$(vG{Zw+x(ei@
zmfXb22}8-?Fi`vo-YVrTH*C?a8%M=Hv9MqVH7H^J$KsD?>!SFZ;ZsvnHr_gn=7acz
z#W?0eCdVhVMWN12VV^$>WlQ?f;P^{(&pYTops|btm6aj>_Uz+hqpGwB)vWp0Cf5y<
zft8-je~nn?W11plq}N)4A{l8I7$!ks_x$PXW-2XaRFswX_BnF{R#6YIwMhAgd5F9X
zGmwdadS6(a^fjHtXg8=l?Rc0Sm%hk6E9!5cLVloEy4eh(=FwgP`)~I^5~pBEWo+F6
zSf2ncyMurJN91#cJTy_u8Y}@%!bq1RkGC~-bV@SXRd4F{R-*V`bS+6;W5vZ(&+I<9$;-V|eNfLa5n-6%
z2(}&uGRF;p92eS*sE*oR$@pexaqr*meB)VhmIg@h{uzkk$9~qh#cHhw#>O%)b@+(|
z^IQgqzuj~Sk(J;swEM-3TrJAPCq9k^^^`q{IItKBRXYe}e0Tdr=Huf7da3$l4PdpwWDop%^}n;dD#K4s#DYA8SHZ
z&1!riV4W4R7R#C))JH1~axJ)RYnM$$lIR%6fIVA@zV{XVyx}C+a-Dt8Y9M)^KU0+H
zR4IUb2CJ{Hg>CuaXtD50jB(_Tcx=Z$^WYu2u5kubqmwp%drJ6
z?Fo40g!Qd<-l=TQxqHEOuPX0;^z7iX?Ke^a%XT<13TA^5`4Xcw6D@Ur&VT&CUe0d}
z1GjOVF1^L@>O)l@?bD~$wzgf(nxX1OGD8fEV?TdJcZc2KoUe|oP1#=$$7ee|xbY)A
zDZq+cuTpc(fFdj^=!;{k03C69lMQ(|>uhRfRu%+!k&YOi-3|1QKB
z
z?n?eq1XP>p-IM$Z^C;2L3itnbJZAip*Zo0aw2bs8@(s^~*8T9go!%dHcAz2lM;`yp
zD=7&xjFV$S&5uDaiScyD?B-i1ze`+CoRtz`Wn+Zls4&}MO{@N!ufrzjG$B79)Y2d3tBk&)TxUTw@QS0TEL_?njX|@vq?Uz(nBFK5Pq7*xj#u*R&i|?7+6#
z+|r_n#SW&LXhtheZdah{ZVoqwyT{D>MC3nkFF#N)xLi{p7J1jXlmVeb;cP5?e(=f#
zuT7fvjSbjS781v?7{)-X3*?>tq?)Yd)~|1{BDS(pqC
zC}~H#WXlkUW*H5CDOo<)#x7%RY)A;ShGhI5s*#cRDA8YgqG(HeKDx+#(ZQ?386dv!
zlXCO)w91~Vw4AmOcATuV653fa9R$fyK8ul%rG
z-wfS
zihugoZyr38Im?Zuh6@RcF~t1anQu7>#lPpb#}4cOA!EM11`%f*07RqOVkmX{p~KJ9
z^zP;K#|)$`^Rb{rnHGH{~>1(fawV0*Z#)}M`m8-?ZJV<+e}s9wE#
z)l&az?w^5{)`S(%MRzxdNqrs1n*-=jS^_jqE*5XDrA0+VE`5^*p3CuM<&dZEeCjoz
zR;uu_H9ZPZV|fQq`Cyw4nscrVwi!fE6ciMmX$!_hN7uF;jjKG)d2@aC4ropY)8etW=xJvni)8eHi`H$%#zn^WJ5NLc-rqk|u&&4Z6fD_m&JfSI1Bvb?b<*n&sfl0^t
z=HnmRl`XrFvMKB%9}>PaA`m-fK6a0(8=qPkWS5bb4=v?XcWi&hRY?O5HdulRi4?fN
zlsJ*N-0Qw+Yic@s0(2uy%F@ib;GjXt01Fmx5XbRo6+n|pP(&nodMoap^z{~q
ziEeaUT@Mxe3vJSfI6?uLND(CNr=#^W<1b}jzW58bIfyWTDle$mmS(|x-0|2UlX+9k
zQ^EX7Nw}?EzVoBfT(-LT|=9N@^hcn-_p&sqG
z&*oVs2JSU+N4ZD`FhCAWaS;>|wH2G*Id|?pa#@>tyxX`+4HyIArWDvVrX)2WAOQff
z0qyHu&-S@i^MS-+j--!pr4fPBj~_8({~e1bfcl0wI1kaoN>mJL6KUPQm5N7lB(ui1
zE-o%kq)&djzWJ}ob<-GfDlkB;F31j-VHKvQUGQ3sp`CwyGJk_i!y^sD0fqC@$9|jO
zOqN!r!8-p==F@ZVP=U$qSpY(gQ0)59P1&t@y?5rvg<}E+GB}26NYPp4f2YFQrQtot5mn3wu_qprZ=>Ig-$
zbW26Ws~IgY>}^5w`vTB(G`PTZaDiGBo5o(tp)qli|NeV(
z@H_=R8V39rt5J5YB2Ky?4eJJ#b`_iBe2ot~6%7mLt5t8Vwi^Jy7|jWXqa3amOIoRb
zOr}WVFP--DsS`1WpN%~)t3R!arKF^Q$e12KEqU36AWwnCBICpH4XCsfnyrHr>$I$4
z!DpKX$OKLWarN7nv@!uIA+~RNO)l$$w}p(;b>mx8pwYvu;dD_unryX_NhT8*Tj>BTrTTL&!?O+%Rv;b?B??gSzdp?6Uug9{
zd@V08Z$BdI?fpoCS$)t4mg4rT8Q_I}h`0d-vYZ^|dOB*Q^S|xqTV*vIg?@fVFSmMpaw0qtTRbx}
z({Pg?#{2`sc9)M5N$*N|4;^t$+QP?#mov
zGVC@I*lBVrOU-%2y!7%)fAKjpEFsgQc4{amtiHb95KQEwvf<(3T<9-Zm$xIew#P22
zc2Ix|App^>v6(3L_MCU0d3W##AB0M~3D00EWoKZqsJYT(#@w$Y_H7G22M~ApVFTRHMI_3be)Lkn#0F*V8Pq
zc}`Cjy$bE;FJ6H7p=0y#R>`}-m4(0F>%@P|?7fx{=R^uFdISRnZ2W_xQhD{YuR3t<
z{6yxu=4~JkeA;|(J6_nv#>Nvs&FuLA&PW^he@t(UwFFE8)|a!R{`E`K`i^ZnyE4$k
z;(749Ix|oi$c3QbEJ3b~D_kQsPz~fIUKym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp
z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{}
zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N
Xviia!U7SGha1wx#SCgwmn*{w2TRX*I
literal 0
HcmV?d00001
diff --git a/product_fao_fishing/static/description/index.html b/product_fao_fishing/static/description/index.html
new file mode 100644
index 00000000..f857938d
--- /dev/null
+++ b/product_fao_fishing/static/description/index.html
@@ -0,0 +1,124 @@
+
+
+
+
Module name
+
This module was written to extend the functionality of ... to support ... and allow you to ...
+
+
+
+
+
+
+
+
Installation
+
+
+
To install this module, you need to:
+
+
+
+
+
+
+
+
+
+
+
Configuration
+
+
+
To configure this module, you need to:
+
+
+
+
+
+
+
+
+
+
+
Usage
+
+
+
To use this module, you need to:
+
+
+
For further information, please visit:
+
+
+
+
+
+
+
+
+
+
+
Known issues / Roadmap
+
+
+
+
+
+
+
+
+
+
Credits
+
+
+
+
Maintainer
+
+ This module is maintained by the OCA.
+ 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.
+ To contribute to this module, please visit http://odoo-community.org.
+
+
+
+
+
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..5620d263
--- /dev/null
+++ b/product_fao_fishing/tests/test_product_fao_fishing.py
@@ -0,0 +1,28 @@
+# Copyright 2018 Tecnativa - Sergio Teruel
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
+from odoo.tests import SavepointCase
+from odoo.exceptions import ValidationError
+
+
+class TestProductFaoFishing(SavepointCase):
+ @classmethod
+ def setUpClass(cls):
+ super().setUpClass()
+ cls.product = cls.env['product.template'].create({
+ 'name': 'test',
+ })
+ cls.fishing_tech_arrow = cls.env.ref(
+ 'product_fao_fishing.fishing_technique_harrows')
+ cls.my_tech = cls.env['product.fao.fishing.technique'].create({
+ 'name': 'My Tech',
+ 'parent_id': cls.fishing_tech_arrow.id
+ })
+
+ def test_fishing_technique_name(self):
+ self.assertEqual(self.my_tech.complete_name, '{} / {}'.format(
+ self.fishing_tech_arrow.name, self.my_tech.name
+ ))
+
+ def test_recursion(self):
+ with self.assertRaises(ValidationError):
+ self.my_tech.parent_id = self.my_tech
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..b64402c0
--- /dev/null
+++ b/product_fao_fishing/views/product_attribute_views.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+ product.attribute.value
+
+
+
+
+
+
+
+
+
+ product.attribute.value
+
+
+
+
+
+
+
+
+
diff --git a/product_fao_fishing/views/product_fao_techinique_views.xml b/product_fao_fishing/views/product_fao_techinique_views.xml
new file mode 100644
index 00000000..427ed87a
--- /dev/null
+++ b/product_fao_fishing/views/product_fao_techinique_views.xml
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+ product.fao.techique.search
+ product.fao.fishing.technique
+
+
+
+
+
+
+
+
+
+ product.fao.techique.form
+ product.fao.fishing.technique
+
+
+
+
+
+
+ product.fao.techique.list
+ product.fao.fishing.technique
+ 1
+
+
+
+
+
+
+
+
+ Product Fao Techniques
+ ir.actions.act_window
+ product.fao.fishing.technique
+ form
+
+
+
+
+
+
+
+
+
+
diff --git a/product_fao_fishing/views/product_template_views.xml b/product_fao_fishing/views/product_template_views.xml
new file mode 100644
index 00000000..6653aaa0
--- /dev/null
+++ b/product_fao_fishing/views/product_template_views.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ product.template
+
+
+
+
+
+
+
+
+
From ff89a04b0a1fe9caa3eba9cea16a1d42b2507145 Mon Sep 17 00:00:00 2001
From: ernesto
Date: Tue, 29 Oct 2019 12:33:45 -0400
Subject: [PATCH 02/22] [MIG] product_fao_fishing: Migration to 12.0
---
product_fao_fishing/README.rst | 21 +-
product_fao_fishing/__manifest__.py | 2 +-
.../data/product_fao_fishing_data.xml | 2 +-
product_fao_fishing/i18n/es.po | 117 ++--
.../i18n/product_fao_fishing.pot | 339 +++++++++++
.../migrations/12.0.1.0.0/post-migration.py | 9 +
.../models/product_attribute.py | 8 +-
.../models/product_fao_fishing_technique.py | 6 +-
.../models/product_template.py | 1 -
product_fao_fishing/readme/CONFIGURE.rst | 2 +-
product_fao_fishing/readme/CONTRIBUTORS.rst | 1 +
product_fao_fishing/readme/USAGE.rst | 8 +-
.../static/description/index.html | 573 ++++++++++++++----
.../views/product_attribute_views.xml | 16 +-
.../views/product_fao_techinique_views.xml | 5 -
15 files changed, 908 insertions(+), 202 deletions(-)
create mode 100644 product_fao_fishing/i18n/product_fao_fishing.pot
create mode 100644 product_fao_fishing/migrations/12.0.1.0.0/post-migration.py
diff --git a/product_fao_fishing/README.rst b/product_fao_fishing/README.rst
index ecfcdfee..4697a67d 100644
--- a/product_fao_fishing/README.rst
+++ b/product_fao_fishing/README.rst
@@ -14,13 +14,13 @@ Product FAO Fishing
: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/11.0/product_fao_fishing
+ :target: https://github.com/OCA/community-data-files/tree/12.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-11-0/community-data-files-11-0-product_fao_fishing
+ :target: https://translation.odoo-community.org/projects/community-data-files-12-0/community-data-files-12-0-product_fao_fishing
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/101/11.0
+ :target: https://runbot.odoo-community.org/runbot/101/12.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -36,19 +36,19 @@ data related to fishing areas and capture technologies as attributes.
Configuration
=============
-#. Go to Sales > Settings > Attributes or Attribute Values
+#. Go to *Sales > Configuration > Products > Attribute Values*
* Update fish FAO areas if you want
Usage
=====
-#. Go to Sales > Settings
+#. Go to *Sales > Configuration > Settings*
- * Active "Attributes and Variants" option and apply changes
-#. Go to Sales > Catalog > Product
+ * Active "Variants and Options" and apply changes
+#. Go to *Sales > Products > Products*
- * In variant tab you can add fish FAO area attribute ans select an
+ * In *Variants* tab you can add *FAO Fishing Areas* attribute and select an
attribute value.
Bug Tracker
@@ -57,7 +57,7 @@ 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 `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -75,6 +75,7 @@ Contributors
* `Tecnativa `_:
* Sergio Teruel
+ * Ernesto Tejeda
Maintainers
~~~~~~~~~~~
@@ -89,6 +90,6 @@ 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.
+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/__manifest__.py b/product_fao_fishing/__manifest__.py
index 86c3e733..00dd3ed1 100644
--- a/product_fao_fishing/__manifest__.py
+++ b/product_fao_fishing/__manifest__.py
@@ -3,7 +3,7 @@
{
'name': 'Product FAO Fishing',
'summary': 'Set fishing areas and capture technology',
- 'version': '11.0.1.0.0',
+ 'version': '12.0.1.0.0',
'development_status': 'Beta',
'category': 'Fishing',
'website': 'https://github.com/OCA/community-data-files',
diff --git a/product_fao_fishing/data/product_fao_fishing_data.xml b/product_fao_fishing/data/product_fao_fishing_data.xml
index f5212dd6..cce33699 100644
--- a/product_fao_fishing/data/product_fao_fishing_data.xml
+++ b/product_fao_fishing/data/product_fao_fishing_data.xml
@@ -3,7 +3,7 @@
FAO Fishing Areas
- False
+ no_variant
diff --git a/product_fao_fishing/i18n/es.po b/product_fao_fishing/i18n/es.po
index 8bf83274..91cf1d0a 100644
--- a/product_fao_fishing/i18n/es.po
+++ b/product_fao_fishing/i18n/es.po
@@ -8,14 +8,14 @@ msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-07-05 12:01+0200\n"
"PO-Revision-Date: 2018-07-05 12:24+0200\n"
+"Last-Translator: Sergio Teruel \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: Poedit 1.8.7.1\n"
-"Last-Translator: Sergio Teruel \n"
-"Language: es\n"
#. module: product_fao_fishing
#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_1
@@ -33,6 +33,11 @@ msgstr "África - Aguas continentales"
msgid "America, South - Inland waters"
msgstr "América del Sur - Aguas continentales"
+#. module: product_fao_fishing
+#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_angling
+msgid "Angling"
+msgstr ""
+
#. module: product_fao_fishing
#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_98
#, fuzzy
@@ -98,43 +103,43 @@ msgid "Atlantic, Western Central"
msgstr "Sáhara occidental"
#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique_child_id
+#: model:ir.model,name:product_fao_fishing.model_product_attribute_value
+#, fuzzy
+msgid "Attribute Value"
+msgstr "product.attribute.value"
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__child_id
msgid "Child Technique"
msgstr "Subtécnica"
#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique_complete_name
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__complete_name
msgid "Complete Name"
msgstr "Nombre completo"
#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique_create_uid
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__create_uid
msgid "Created by"
msgstr "Creado por"
#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique_create_date
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__create_date
msgid "Created on"
msgstr "Creado en"
#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique_display_name
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__display_name
msgid "Display Name"
msgstr "Mostrar Nombre"
-#. module: product_fao_fishing
-#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_draft_nets
-#, fuzzy
-msgid "Draft nets"
-msgstr "Borrador"
-
#. module: product_fao_fishing
#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_enmanelle_nets
msgid "Enmanelle nets and similar"
msgstr ""
#. module: product_fao_fishing
-#: code:addons/product_fao_fishing/models/product_fao_fishing_technique.py:52
+#: code:addons/product_fao_fishing/models/product_fao_fishing_technique.py:50
#, python-format
msgid "Error ! You cannot create recursive techniques."
msgstr "¡Error! No puede crear técnicas recursivas"
@@ -150,16 +155,23 @@ msgid "FAO Fishing Areas"
msgstr "Areas de pesca FAO"
#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_product_fao_fishing_technique_id
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_template_fao_fishing_technique_id
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_product__fao_fishing_technique_id
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_template__fao_fishing_technique_id
msgid "FAO Fishing Tech."
msgstr ""
#. module: product_fao_fishing
-#: model:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_search_view
+#: model_terms:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_search_view
msgid "FAO Techniques"
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
+#, fuzzy
+msgid "Fao Fishing Area"
+msgstr "Areas de pesca FAO"
+
#. module: product_fao_fishing
#: model:ir.model,name:product_fao_fishing.model_product_fao_fishing_technique
msgid "Fishing Technique"
@@ -176,7 +188,7 @@ msgid "Harrows"
msgstr ""
#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique_id
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__id
msgid "ID"
msgstr "ID"
@@ -199,29 +211,23 @@ msgid "Indian Ocean, Western"
msgstr "Territorio británico del Océano Índico"
#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique___last_update
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique____last_update
#, fuzzy
msgid "Last Modified on"
msgstr "Última modificación en"
#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique_write_uid
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__write_uid
#, fuzzy
msgid "Last Updated by"
msgstr "Última modificación por"
#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique_write_date
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__write_date
#, fuzzy
msgid "Last Updated on"
msgstr "Última actualización en"
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique_parent_left
-#, fuzzy
-msgid "Left Parent"
-msgstr "Padre izquierdo"
-
#. module: product_fao_fishing
#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_99
msgid "Marine areas outside the Antarctic"
@@ -234,14 +240,14 @@ msgid "Mediterranean and Black Sea"
msgstr "Negro"
#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique_name
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__name
#, fuzzy
msgid "Name"
msgstr "Nombre"
#. module: product_fao_fishing
-#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_traps
-msgid "Nasas and traps"
+#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_netting
+msgid "Netting"
msgstr ""
#. module: product_fao_fishing
@@ -287,18 +293,29 @@ msgid "Pacific, Western Central"
msgstr "Sáhara occidental"
#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique_parent_id
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__parent_path
+msgid "Parent Path"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__parent_id
#, fuzzy
msgid "Parent Technique"
msgstr "Padre"
#. module: product_fao_fishing
-#: model:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_search_view
+#: model:ir.model,name:product_fao_fishing.model_product_template_attribute_value
+#, fuzzy
+msgid "Product Attribute Value"
+msgstr "product.attribute.value"
+
+#. module: product_fao_fishing
+#: model_terms:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_search_view
msgid "Product Fao Fishing Techniques"
msgstr ""
#. module: product_fao_fishing
-#: model:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_list_view
+#: model_terms:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_list_view
msgid "Product Fao Techiniques"
msgstr "Técnicas de pesca"
@@ -318,33 +335,39 @@ msgid "Purse seines and nets hoisted"
msgstr ""
#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique_parent_right
-#, fuzzy
-msgid "Right Parent"
-msgstr "Padre derecho"
-
-#. module: product_fao_fishing
-#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_hooks
-msgid "Sedales and hooks"
+#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_spearfishing
+msgid "Spearfishing"
msgstr ""
#. module: product_fao_fishing
-#: model:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_form_view
+#: model_terms:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_form_view
msgid "Technique name"
msgstr "Nombre técnica"
+#. module: product_fao_fishing
+#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_trapping
+msgid "Trapping"
+msgstr ""
+
#. module: product_fao_fishing
#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_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_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"
-#. module: product_fao_fishing
-#: model:ir.model,name:product_fao_fishing.model_product_attribute_value
#, fuzzy
-msgid "product.attribute.value"
-msgstr "product.attribute.value"
+#~ msgid "Draft nets"
+#~ msgstr "Borrador"
+
+#, fuzzy
+#~ msgid "Left Parent"
+#~ msgstr "Padre izquierdo"
+
+#, fuzzy
+#~ msgid "Right Parent"
+#~ msgstr "Padre derecho"
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..6ef51389
--- /dev/null
+++ b/product_fao_fishing/i18n/product_fao_fishing.pot
@@ -0,0 +1,339 @@
+# 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: <>\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.fao.fishing.technique,name:product_fao_fishing.fishing_technique_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.fao.fishing.technique,name:product_fao_fishing.fishing_technique_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:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__child_id
+msgid "Child Technique"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__complete_name
+msgid "Complete Name"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__create_uid
+msgid "Created by"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__create_date
+msgid "Created on"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__display_name
+msgid "Display Name"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_enmanelle_nets
+msgid "Enmanelle nets and similar"
+msgstr ""
+
+#. module: product_fao_fishing
+#: code:addons/product_fao_fishing/models/product_fao_fishing_technique.py:50
+#, python-format
+msgid "Error ! You cannot create recursive techniques."
+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:ir.model.fields,field_description:product_fao_fishing.field_product_product__fao_fishing_technique_id
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_template__fao_fishing_technique_id
+msgid "FAO Fishing Tech."
+msgstr ""
+
+#. module: product_fao_fishing
+#: model_terms:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_search_view
+msgid "FAO Techniques"
+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,name:product_fao_fishing.model_product_fao_fishing_technique
+msgid "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.fao.fishing.technique,name:product_fao_fishing.fishing_technique_harrows
+msgid "Harrows"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__id
+msgid "ID"
+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:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique____last_update
+msgid "Last Modified on"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__write_uid
+msgid "Last Updated by"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__write_date
+msgid "Last Updated on"
+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:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__name
+msgid "Name"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_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.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__parent_path
+msgid "Parent Path"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__parent_id
+msgid "Parent Technique"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:ir.model,name:product_fao_fishing.model_product_template_attribute_value
+msgid "Product Attribute Value"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model_terms:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_search_view
+msgid "Product Fao Fishing Techniques"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model_terms:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_list_view
+msgid "Product Fao Techiniques"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:ir.actions.act_window,name:product_fao_fishing.product_fao_techique_action_form
+msgid "Product Fao Techniques"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:ir.model,name:product_fao_fishing.model_product_template
+msgid "Product Template"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_purse_nets
+msgid "Purse seines and nets hoisted"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_spearfishing
+msgid "Spearfishing"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model_terms:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_form_view
+msgid "Technique name"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_trapping
+msgid "Trapping"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_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/migrations/12.0.1.0.0/post-migration.py b/product_fao_fishing/migrations/12.0.1.0.0/post-migration.py
new file mode 100644
index 00000000..2b5d4e6d
--- /dev/null
+++ b/product_fao_fishing/migrations/12.0.1.0.0/post-migration.py
@@ -0,0 +1,9 @@
+# Copyright 2019 Tecnativa - Ernesto Tejeda
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openupgradelib import openupgrade
+
+
+@openupgrade.migrate(use_env=True)
+def migrate(env, version):
+ env['product.fao.fishing.technique']._parent_store_compute()
diff --git a/product_fao_fishing/models/product_attribute.py b/product_fao_fishing/models/product_attribute.py
index 2555efee..d81e4354 100644
--- a/product_fao_fishing/models/product_attribute.py
+++ b/product_fao_fishing/models/product_attribute.py
@@ -5,7 +5,13 @@
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_fao_fishing_technique.py b/product_fao_fishing/models/product_fao_fishing_technique.py
index cf19c713..d2aa53e6 100644
--- a/product_fao_fishing/models/product_fao_fishing_technique.py
+++ b/product_fao_fishing/models/product_fao_fishing_technique.py
@@ -10,9 +10,8 @@ class ProductFaoFishingTechnique(models.Model):
_description = "Fishing Technique"
_parent_name = "parent_id"
_parent_store = True
- _parent_order = 'name'
_rec_name = 'complete_name'
- _order = 'parent_left'
+ _order = 'parent_path'
name = fields.Char(
string='Name',
@@ -34,8 +33,7 @@ class ProductFaoFishingTechnique(models.Model):
inverse_name='parent_id',
string='Child Technique',
)
- parent_left = fields.Integer('Left Parent', index=1)
- parent_right = fields.Integer('Right Parent', index=1)
+ parent_path = fields.Char(index=True)
@api.depends('name', 'parent_id.complete_name')
def _compute_complete_name(self):
diff --git a/product_fao_fishing/models/product_template.py b/product_fao_fishing/models/product_template.py
index a086ded0..57151a5e 100644
--- a/product_fao_fishing/models/product_template.py
+++ b/product_fao_fishing/models/product_template.py
@@ -5,7 +5,6 @@
class ProductTemplate(models.Model):
-
_inherit = 'product.template'
fao_fishing_technique_id = fields.Many2one(
diff --git a/product_fao_fishing/readme/CONFIGURE.rst b/product_fao_fishing/readme/CONFIGURE.rst
index 5fb1cc1a..57a2f492 100644
--- a/product_fao_fishing/readme/CONFIGURE.rst
+++ b/product_fao_fishing/readme/CONFIGURE.rst
@@ -1,3 +1,3 @@
-#. Go to Sales > Settings > Attributes or Attribute Values
+#. Go to *Sales > Configuration > Products > Attribute Values*
* Update fish FAO areas if you want
diff --git a/product_fao_fishing/readme/CONTRIBUTORS.rst b/product_fao_fishing/readme/CONTRIBUTORS.rst
index e88095e5..d18897b6 100644
--- a/product_fao_fishing/readme/CONTRIBUTORS.rst
+++ b/product_fao_fishing/readme/CONTRIBUTORS.rst
@@ -1,3 +1,4 @@
* `Tecnativa `_:
* Sergio Teruel
+ * Ernesto Tejeda
diff --git a/product_fao_fishing/readme/USAGE.rst b/product_fao_fishing/readme/USAGE.rst
index ee777775..4b5a18eb 100644
--- a/product_fao_fishing/readme/USAGE.rst
+++ b/product_fao_fishing/readme/USAGE.rst
@@ -1,7 +1,7 @@
-#. Go to Sales > Settings
+#. Go to *Sales > Configuration > Settings*
- * Active "Attributes and Variants" option and apply changes
-#. Go to Sales > Catalog > Product
+ * Active "Variants and Options" and apply changes
+#. Go to *Sales > Products > Products*
- * In variant tab you can add fish FAO area attribute ans select an
+ * In *Variants* tab you can add *FAO Fishing Areas* attribute and select an
attribute value.
diff --git a/product_fao_fishing/static/description/index.html b/product_fao_fishing/static/description/index.html
index f857938d..f004ab12 100644
--- a/product_fao_fishing/static/description/index.html
+++ b/product_fao_fishing/static/description/index.html
@@ -1,124 +1,449 @@
-
-
-
-
Module name
-
This module was written to extend the functionality of ... to support ... and allow you to ...
-
-
-
-
-
-
-
-
Installation
-
-
-
To install this module, you need to:
-
-
-
-
-
-
-
-
-
-
-
Configuration
-
-
-
To configure this module, you need to:
-
-
-
-
-
-
-
-
-
-
-
Usage
-
-
-
To use this module, you need to:
-
-
-
For further information, please visit:
-
-
-
-
-
-
-
-
-
-
-
Known issues / Roadmap
-
-
-
-
-
-
-
-
-
-
Credits
-
-
-
-
Maintainer
-
- This module is maintained by the OCA.
- 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.
- To contribute to this module, please visit http://odoo-community.org.
-
-
-
-
-
+
+
+
+
+
+
+Product FAO Fishing
+
+
+
+
+
Product FAO Fishing
+
+
+
+
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
+
+
+
+
+- Go to Sales > Configuration > Products > Attribute Values
+- Update fish FAO areas if you want
+
+
+
+
+
+
+
+- Go to Sales > Configuration > Settings
+- Active “Variants and Options” and apply changes
+
+
+- Go to Sales > Products > Products
+- In Variants tab you can add FAO Fishing Areas attribute and select an
+attribute value.
+
+
+
+
+
+
+
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.
+
+
+
+
+
+
+
+- Tecnativa:
+- Sergio Teruel
+- Ernesto Tejeda
+
+
+
+
+
+
+
This module is maintained by the OCA.
+
+
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/views/product_attribute_views.xml b/product_fao_fishing/views/product_attribute_views.xml
index b64402c0..d8b205e7 100644
--- a/product_fao_fishing/views/product_attribute_views.xml
+++ b/product_fao_fishing/views/product_attribute_views.xml
@@ -4,9 +4,9 @@
-
- product.attribute.value
-
+
+ product.template.attribute.value
+
@@ -14,6 +14,16 @@
+
+ product.template.attribute.value
+
+
+
+
+
+
+
+
product.attribute.value
diff --git a/product_fao_fishing/views/product_fao_techinique_views.xml b/product_fao_fishing/views/product_fao_techinique_views.xml
index 427ed87a..a5a8170b 100644
--- a/product_fao_fishing/views/product_fao_techinique_views.xml
+++ b/product_fao_fishing/views/product_fao_techinique_views.xml
@@ -53,9 +53,4 @@
-
-
-
-
-
From b04220ea041876fa0980f80980e30dbdbc1545d4 Mon Sep 17 00:00:00 2001
From: Rodrigo Macedo
Date: Sun, 24 Nov 2019 17:53:04 +0000
Subject: [PATCH 03/22] Added translation using Weblate (Portuguese (Brazil))
---
product_fao_fishing/i18n/pt_BR.po | 339 ++++++++++++++++++++++++++++++
1 file changed, 339 insertions(+)
create mode 100644 product_fao_fishing/i18n/pt_BR.po
diff --git a/product_fao_fishing/i18n/pt_BR.po b/product_fao_fishing/i18n/pt_BR.po
new file mode 100644
index 00000000..6f4f7d6d
--- /dev/null
+++ b/product_fao_fishing/i18n/pt_BR.po
@@ -0,0 +1,339 @@
+# 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.fao.fishing.technique,name:product_fao_fishing.fishing_technique_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.fao.fishing.technique,name:product_fao_fishing.fishing_technique_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:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__child_id
+msgid "Child Technique"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__complete_name
+msgid "Complete Name"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__create_uid
+msgid "Created by"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__create_date
+msgid "Created on"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__display_name
+msgid "Display Name"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_enmanelle_nets
+msgid "Enmanelle nets and similar"
+msgstr ""
+
+#. module: product_fao_fishing
+#: code:addons/product_fao_fishing/models/product_fao_fishing_technique.py:50
+#, python-format
+msgid "Error ! You cannot create recursive techniques."
+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:ir.model.fields,field_description:product_fao_fishing.field_product_product__fao_fishing_technique_id
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_template__fao_fishing_technique_id
+msgid "FAO Fishing Tech."
+msgstr ""
+
+#. module: product_fao_fishing
+#: model_terms:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_search_view
+msgid "FAO Techniques"
+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,name:product_fao_fishing.model_product_fao_fishing_technique
+msgid "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.fao.fishing.technique,name:product_fao_fishing.fishing_technique_harrows
+msgid "Harrows"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__id
+msgid "ID"
+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:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique____last_update
+msgid "Last Modified on"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__write_uid
+msgid "Last Updated by"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__write_date
+msgid "Last Updated on"
+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:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__name
+msgid "Name"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_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.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__parent_path
+msgid "Parent Path"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__parent_id
+msgid "Parent Technique"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:ir.model,name:product_fao_fishing.model_product_template_attribute_value
+msgid "Product Attribute Value"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model_terms:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_search_view
+msgid "Product Fao Fishing Techniques"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model_terms:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_list_view
+msgid "Product Fao Techiniques"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:ir.actions.act_window,name:product_fao_fishing.product_fao_techique_action_form
+msgid "Product Fao Techniques"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:ir.model,name:product_fao_fishing.model_product_template
+msgid "Product Template"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_purse_nets
+msgid "Purse seines and nets hoisted"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_spearfishing
+msgid "Spearfishing"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model_terms:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_form_view
+msgid "Technique name"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_trapping
+msgid "Trapping"
+msgstr ""
+
+#. module: product_fao_fishing
+#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_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 ""
From c0699f5618261e7578f6c1613855bbec924bde7c Mon Sep 17 00:00:00 2001
From: Sergio Teruel
Date: Fri, 20 Dec 2019 12:47:32 +0100
Subject: [PATCH 04/22] [FIX] product_fao_fishing: product.attribute.line not
exists
---
product_fao_fishing/__manifest__.py | 2 +-
.../models/product_template.py | 3 ++-
.../tests/test_product_fao_fishing.py | 21 +++++++++++++++++++
3 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/product_fao_fishing/__manifest__.py b/product_fao_fishing/__manifest__.py
index 00dd3ed1..ec4a4d26 100644
--- a/product_fao_fishing/__manifest__.py
+++ b/product_fao_fishing/__manifest__.py
@@ -3,7 +3,7 @@
{
'name': 'Product FAO Fishing',
'summary': 'Set fishing areas and capture technology',
- 'version': '12.0.1.0.0',
+ 'version': '12.0.1.0.1',
'development_status': 'Beta',
'category': 'Fishing',
'website': 'https://github.com/OCA/community-data-files',
diff --git a/product_fao_fishing/models/product_template.py b/product_fao_fishing/models/product_template.py
index 57151a5e..daa32fd4 100644
--- a/product_fao_fishing/models/product_template.py
+++ b/product_fao_fishing/models/product_template.py
@@ -23,8 +23,9 @@ def _compute_fao_fishing_area_ids(self):
"""
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 = self.env['product.attribute.line'].search([
+ attribute_line = ptal_obj.search([
('product_tmpl_id', '=', template.id),
('attribute_id', '=', fao_fishing_area_attribute.id),
])
diff --git a/product_fao_fishing/tests/test_product_fao_fishing.py b/product_fao_fishing/tests/test_product_fao_fishing.py
index 5620d263..e57bd1c7 100644
--- a/product_fao_fishing/tests/test_product_fao_fishing.py
+++ b/product_fao_fishing/tests/test_product_fao_fishing.py
@@ -8,8 +8,23 @@ class TestProductFaoFishing(SavepointCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
+ cls.product_attribute = cls.env.ref(
+ 'product_fao_fishing.fao_fishing_area')
+ 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.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),
+ ],
+ }),
+ ],
})
cls.fishing_tech_arrow = cls.env.ref(
'product_fao_fishing.fishing_technique_harrows')
@@ -26,3 +41,9 @@ def test_fishing_technique_name(self):
def test_recursion(self):
with self.assertRaises(ValidationError):
self.my_tech.parent_id = self.my_tech
+
+ 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)
From 8db669dd586f3a92e60791342e374ce47e20ce95 Mon Sep 17 00:00:00 2001
From: Sergio Teruel
Date: Thu, 20 Feb 2020 21:34:40 +0100
Subject: [PATCH 05/22] [IMP] product_fao_fishing: black, isort
---
product_fao_fishing/__manifest__.py | 36 ++++++------
.../migrations/12.0.1.0.0/post-migration.py | 2 +-
.../models/product_attribute.py | 9 ++-
.../models/product_fao_fishing_technique.py | 41 ++++++-------
.../models/product_template.py | 26 +++++----
.../tests/test_product_fao_fishing.py | 58 +++++++++++--------
6 files changed, 87 insertions(+), 85 deletions(-)
diff --git a/product_fao_fishing/__manifest__.py b/product_fao_fishing/__manifest__.py
index ec4a4d26..95e61835 100644
--- a/product_fao_fishing/__manifest__.py
+++ b/product_fao_fishing/__manifest__.py
@@ -1,24 +1,22 @@
# 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': '12.0.1.0.1',
- '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': [
- 'security/ir.model.access.csv',
- 'data/product_fao_fishing_data.xml',
- 'data/product_fao_fishing_techique_data.xml',
- 'views/product_attribute_views.xml',
- 'views/product_fao_techinique_views.xml',
- 'views/product_template_views.xml',
+ "name": "Product FAO Fishing",
+ "summary": "Set fishing areas and capture technology",
+ "version": "12.0.1.0.1",
+ "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": [
+ "security/ir.model.access.csv",
+ "data/product_fao_fishing_data.xml",
+ "data/product_fao_fishing_techique_data.xml",
+ "views/product_attribute_views.xml",
+ "views/product_fao_techinique_views.xml",
+ "views/product_template_views.xml",
],
}
diff --git a/product_fao_fishing/migrations/12.0.1.0.0/post-migration.py b/product_fao_fishing/migrations/12.0.1.0.0/post-migration.py
index 2b5d4e6d..0e14c001 100644
--- a/product_fao_fishing/migrations/12.0.1.0.0/post-migration.py
+++ b/product_fao_fishing/migrations/12.0.1.0.0/post-migration.py
@@ -6,4 +6,4 @@
@openupgrade.migrate(use_env=True)
def migrate(env, version):
- env['product.fao.fishing.technique']._parent_store_compute()
+ env["product.fao.fishing.technique"]._parent_store_compute()
diff --git a/product_fao_fishing/models/product_attribute.py b/product_fao_fishing/models/product_attribute.py
index d81e4354..9994ec89 100644
--- a/product_fao_fishing/models/product_attribute.py
+++ b/product_fao_fishing/models/product_attribute.py
@@ -5,13 +5,12 @@
class ProductAttributeValue(models.Model):
- _inherit = 'product.attribute.value'
+ _inherit = "product.attribute.value"
- fao_zone_code = fields.Char(string='Zone Code')
+ fao_zone_code = fields.Char(string="Zone Code")
class ProductTemplateAttributeValue(models.Model):
- _inherit = 'product.template.attribute.value'
+ _inherit = "product.template.attribute.value"
- fao_zone_code = fields.Char(
- related="product_attribute_value_id.fao_zone_code")
+ fao_zone_code = fields.Char(related="product_attribute_value_id.fao_zone_code")
diff --git a/product_fao_fishing/models/product_fao_fishing_technique.py b/product_fao_fishing/models/product_fao_fishing_technique.py
index d2aa53e6..e83ffd44 100644
--- a/product_fao_fishing/models/product_fao_fishing_technique.py
+++ b/product_fao_fishing/models/product_fao_fishing_technique.py
@@ -6,47 +6,42 @@
class ProductFaoFishingTechnique(models.Model):
- _name = 'product.fao.fishing.technique'
+ _name = "product.fao.fishing.technique"
_description = "Fishing Technique"
_parent_name = "parent_id"
_parent_store = True
- _rec_name = 'complete_name'
- _order = 'parent_path'
+ _rec_name = "complete_name"
+ _order = "parent_path"
- name = fields.Char(
- string='Name',
- index=True,
- required=True,
- translate=True,
- )
+ name = fields.Char(string="Name", index=True, required=True, translate=True)
complete_name = fields.Char(
- 'Complete Name', compute='_compute_complete_name',
- store=True)
+ "Complete Name", compute="_compute_complete_name", store=True
+ )
parent_id = fields.Many2one(
- comodel_name='product.fao.fishing.technique',
- string='Parent Technique',
+ comodel_name="product.fao.fishing.technique",
+ string="Parent Technique",
index=True,
- ondelete='cascade',
+ ondelete="cascade",
)
child_id = fields.One2many(
- comodel_name='product.fao.fishing.technique',
- inverse_name='parent_id',
- string='Child Technique',
+ comodel_name="product.fao.fishing.technique",
+ inverse_name="parent_id",
+ string="Child Technique",
)
parent_path = fields.Char(index=True)
- @api.depends('name', 'parent_id.complete_name')
+ @api.depends("name", "parent_id.complete_name")
def _compute_complete_name(self):
for tech in self:
if tech.parent_id:
- tech.complete_name = '{} / {}'.format(
- tech.parent_id.complete_name, tech.name)
+ tech.complete_name = "{} / {}".format(
+ tech.parent_id.complete_name, tech.name
+ )
else:
tech.complete_name = tech.name
- @api.constrains('parent_id')
+ @api.constrains("parent_id")
def _check_technique_recursion(self):
if not self._check_recursion():
- raise ValidationError(_(
- 'Error ! You cannot create recursive techniques.'))
+ raise ValidationError(_("Error ! You cannot create recursive techniques."))
return True
diff --git a/product_fao_fishing/models/product_template.py b/product_fao_fishing/models/product_template.py
index daa32fd4..6736d738 100644
--- a/product_fao_fishing/models/product_template.py
+++ b/product_fao_fishing/models/product_template.py
@@ -5,16 +5,15 @@
class ProductTemplate(models.Model):
- _inherit = 'product.template'
+ _inherit = "product.template"
fao_fishing_technique_id = fields.Many2one(
- comodel_name='product.fao.fishing.technique',
- string='FAO Fishing Tech.',
- ondelete='restrict',
+ comodel_name="product.fao.fishing.technique",
+ string="FAO Fishing Tech.",
+ ondelete="restrict",
)
fao_fishing_area_ids = fields.Many2many(
- comodel_name='product.attribute.value',
- compute='_compute_fao_fishing_area_ids'
+ comodel_name="product.attribute.value", compute="_compute_fao_fishing_area_ids"
)
def _compute_fao_fishing_area_ids(self):
@@ -22,11 +21,14 @@ 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']
+ "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),
- ])
+ 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
diff --git a/product_fao_fishing/tests/test_product_fao_fishing.py b/product_fao_fishing/tests/test_product_fao_fishing.py
index e57bd1c7..4ca463ac 100644
--- a/product_fao_fishing/tests/test_product_fao_fishing.py
+++ b/product_fao_fishing/tests/test_product_fao_fishing.py
@@ -1,42 +1,50 @@
# Copyright 2018 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-from odoo.tests import SavepointCase
from odoo.exceptions import ValidationError
+from odoo.tests import SavepointCase
class TestProductFaoFishing(SavepointCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
- cls.product_attribute = cls.env.ref(
- 'product_fao_fishing.fao_fishing_area')
+ cls.product_attribute = cls.env.ref("product_fao_fishing.fao_fishing_area")
cls.product_attribute_value_1 = cls.env.ref(
- 'product_fao_fishing.fao_fishing_area_1')
+ "product_fao_fishing.fao_fishing_area_1"
+ )
cls.product_attribute_value_2 = cls.env.ref(
- 'product_fao_fishing.fao_fishing_area_2')
- 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),
- ],
- }),
- ],
- })
+ "product_fao_fishing.fao_fishing_area_2"
+ )
+ 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),
+ ],
+ },
+ )
+ ],
+ }
+ )
cls.fishing_tech_arrow = cls.env.ref(
- 'product_fao_fishing.fishing_technique_harrows')
- cls.my_tech = cls.env['product.fao.fishing.technique'].create({
- 'name': 'My Tech',
- 'parent_id': cls.fishing_tech_arrow.id
- })
+ "product_fao_fishing.fishing_technique_harrows"
+ )
+ cls.my_tech = cls.env["product.fao.fishing.technique"].create(
+ {"name": "My Tech", "parent_id": cls.fishing_tech_arrow.id}
+ )
def test_fishing_technique_name(self):
- self.assertEqual(self.my_tech.complete_name, '{} / {}'.format(
- self.fishing_tech_arrow.name, self.my_tech.name
- ))
+ self.assertEqual(
+ self.my_tech.complete_name,
+ "{} / {}".format(self.fishing_tech_arrow.name, self.my_tech.name),
+ )
def test_recursion(self):
with self.assertRaises(ValidationError):
From b178b298b608b340cc5f81f4c0f53ccd31efbeae Mon Sep 17 00:00:00 2001
From: Sergio Teruel
Date: Thu, 20 Feb 2020 21:34:41 +0100
Subject: [PATCH 06/22] [MIG] product_fao_fishing: Migration to v13.0
---
product_fao_fishing/README.rst | 10 +-
product_fao_fishing/__manifest__.py | 2 +-
.../data/product_fao_fishing_data.xml | 149 +++++++-----------
.../product_fao_fishing_techique_data.xml | 12 +-
product_fao_fishing/i18n/es.po | 14 +-
.../i18n/product_fao_fishing.pot | 19 ++-
product_fao_fishing/i18n/pt_BR.po | 14 +-
.../migrations/12.0.1.0.0/post-migration.py | 9 --
.../static/description/index.html | 6 +-
.../tests/test_product_fao_fishing.py | 4 +-
.../views/product_attribute_views.xml | 30 ++--
.../views/product_fao_techinique_views.xml | 31 ++--
.../views/product_template_views.xml | 9 +-
13 files changed, 123 insertions(+), 186 deletions(-)
delete mode 100644 product_fao_fishing/migrations/12.0.1.0.0/post-migration.py
diff --git a/product_fao_fishing/README.rst b/product_fao_fishing/README.rst
index 4697a67d..a59b939b 100644
--- a/product_fao_fishing/README.rst
+++ b/product_fao_fishing/README.rst
@@ -14,13 +14,13 @@ Product FAO Fishing
: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/12.0/product_fao_fishing
+ :target: https://github.com/OCA/community-data-files/tree/13.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-12-0/community-data-files-12-0-product_fao_fishing
+ :target: https://translation.odoo-community.org/projects/community-data-files-13-0/community-data-files-13-0-product_fao_fishing
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/101/12.0
+ :target: https://runbot.odoo-community.org/runbot/101/13.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -57,7 +57,7 @@ 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 `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -90,6 +90,6 @@ 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.
+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/__manifest__.py b/product_fao_fishing/__manifest__.py
index 95e61835..25d4d39c 100644
--- a/product_fao_fishing/__manifest__.py
+++ b/product_fao_fishing/__manifest__.py
@@ -3,7 +3,7 @@
{
"name": "Product FAO Fishing",
"summary": "Set fishing areas and capture technology",
- "version": "12.0.1.0.1",
+ "version": "13.0.1.0.0",
"development_status": "Beta",
"category": "Fishing",
"website": "https://github.com/OCA/community-data-files",
diff --git a/product_fao_fishing/data/product_fao_fishing_data.xml b/product_fao_fishing/data/product_fao_fishing_data.xml
index cce33699..4d8747bf 100644
--- a/product_fao_fishing/data/product_fao_fishing_data.xml
+++ b/product_fao_fishing/data/product_fao_fishing_data.xml
@@ -1,183 +1,152 @@
-
+
-
FAO Fishing Areas
no_variant
-
-
+
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_techique_data.xml b/product_fao_fishing/data/product_fao_fishing_techique_data.xml
index d0468cfb..c1ea59f5 100644
--- a/product_fao_fishing/data/product_fao_fishing_techique_data.xml
+++ b/product_fao_fishing/data/product_fao_fishing_techique_data.xml
@@ -1,40 +1,30 @@
-
+
-
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
index 91cf1d0a..fbd76c67 100644
--- a/product_fao_fishing/i18n/es.po
+++ b/product_fao_fishing/i18n/es.po
@@ -139,7 +139,7 @@ msgid "Enmanelle nets and similar"
msgstr ""
#. module: product_fao_fishing
-#: code:addons/product_fao_fishing/models/product_fao_fishing_technique.py:50
+#: code:addons/product_fao_fishing/models/product_fao_fishing_technique.py:0
#, python-format
msgid "Error ! You cannot create recursive techniques."
msgstr "¡Error! No puede crear técnicas recursivas"
@@ -303,12 +303,6 @@ msgstr ""
msgid "Parent Technique"
msgstr "Padre"
-#. module: product_fao_fishing
-#: model:ir.model,name:product_fao_fishing.model_product_template_attribute_value
-#, fuzzy
-msgid "Product Attribute Value"
-msgstr "product.attribute.value"
-
#. module: product_fao_fishing
#: model_terms:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_search_view
msgid "Product Fao Fishing Techniques"
@@ -329,6 +323,12 @@ msgstr "Técnicas de pesca"
msgid "Product Template"
msgstr "Plantilla de producto"
+#. module: product_fao_fishing
+#: model:ir.model,name:product_fao_fishing.model_product_template_attribute_value
+#, fuzzy
+msgid "Product Template Attribute Value"
+msgstr "product.attribute.value"
+
#. module: product_fao_fishing
#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_purse_nets
msgid "Purse seines and nets hoisted"
diff --git a/product_fao_fishing/i18n/product_fao_fishing.pot b/product_fao_fishing/i18n/product_fao_fishing.pot
index 6ef51389..81089b14 100644
--- a/product_fao_fishing/i18n/product_fao_fishing.pot
+++ b/product_fao_fishing/i18n/product_fao_fishing.pot
@@ -1,12 +1,12 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
-# * product_fao_fishing
+# * product_fao_fishing
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 12.0\n"
+"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
-"Last-Translator: <>\n"
+"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -129,7 +129,7 @@ msgid "Enmanelle nets and similar"
msgstr ""
#. module: product_fao_fishing
-#: code:addons/product_fao_fishing/models/product_fao_fishing_technique.py:50
+#: code:addons/product_fao_fishing/models/product_fao_fishing_technique.py:0
#, python-format
msgid "Error ! You cannot create recursive techniques."
msgstr ""
@@ -281,11 +281,6 @@ msgstr ""
msgid "Parent Technique"
msgstr ""
-#. module: product_fao_fishing
-#: model:ir.model,name:product_fao_fishing.model_product_template_attribute_value
-msgid "Product Attribute Value"
-msgstr ""
-
#. module: product_fao_fishing
#: model_terms:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_search_view
msgid "Product Fao Fishing Techniques"
@@ -306,6 +301,11 @@ msgstr ""
msgid "Product Template"
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.fao.fishing.technique,name:product_fao_fishing.fishing_technique_purse_nets
msgid "Purse seines and nets hoisted"
@@ -336,4 +336,3 @@ msgstr ""
#: 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
index 6f4f7d6d..68d361d0 100644
--- a/product_fao_fishing/i18n/pt_BR.po
+++ b/product_fao_fishing/i18n/pt_BR.po
@@ -1,6 +1,6 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
-# * product_fao_fishing
+# * product_fao_fishing
#
msgid ""
msgstr ""
@@ -130,7 +130,7 @@ msgid "Enmanelle nets and similar"
msgstr ""
#. module: product_fao_fishing
-#: code:addons/product_fao_fishing/models/product_fao_fishing_technique.py:50
+#: code:addons/product_fao_fishing/models/product_fao_fishing_technique.py:0
#, python-format
msgid "Error ! You cannot create recursive techniques."
msgstr ""
@@ -282,11 +282,6 @@ msgstr ""
msgid "Parent Technique"
msgstr ""
-#. module: product_fao_fishing
-#: model:ir.model,name:product_fao_fishing.model_product_template_attribute_value
-msgid "Product Attribute Value"
-msgstr ""
-
#. module: product_fao_fishing
#: model_terms:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_search_view
msgid "Product Fao Fishing Techniques"
@@ -307,6 +302,11 @@ msgstr ""
msgid "Product Template"
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.fao.fishing.technique,name:product_fao_fishing.fishing_technique_purse_nets
msgid "Purse seines and nets hoisted"
diff --git a/product_fao_fishing/migrations/12.0.1.0.0/post-migration.py b/product_fao_fishing/migrations/12.0.1.0.0/post-migration.py
deleted file mode 100644
index 0e14c001..00000000
--- a/product_fao_fishing/migrations/12.0.1.0.0/post-migration.py
+++ /dev/null
@@ -1,9 +0,0 @@
-# Copyright 2019 Tecnativa - Ernesto Tejeda
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-
-from openupgradelib import openupgrade
-
-
-@openupgrade.migrate(use_env=True)
-def migrate(env, version):
- env["product.fao.fishing.technique"]._parent_store_compute()
diff --git a/product_fao_fishing/static/description/index.html b/product_fao_fishing/static/description/index.html
index f004ab12..78fbbfe5 100644
--- a/product_fao_fishing/static/description/index.html
+++ b/product_fao_fishing/static/description/index.html
@@ -367,7 +367,7 @@ Product FAO Fishing
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
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
@@ -412,7 +412,7 @@
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.
+feedback.
Do not contact contributors directly about support or help with technical issues.
diff --git a/product_fao_fishing/tests/test_product_fao_fishing.py b/product_fao_fishing/tests/test_product_fao_fishing.py
index 4ca463ac..e9014cd4 100644
--- a/product_fao_fishing/tests/test_product_fao_fishing.py
+++ b/product_fao_fishing/tests/test_product_fao_fishing.py
@@ -1,6 +1,6 @@
# Copyright 2018 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-from odoo.exceptions import ValidationError
+from odoo.exceptions import UserError
from odoo.tests import SavepointCase
@@ -47,7 +47,7 @@ def test_fishing_technique_name(self):
)
def test_recursion(self):
- with self.assertRaises(ValidationError):
+ with self.assertRaises(UserError):
self.my_tech.parent_id = self.my_tech
def test_fishing_areas_from_attribute(self):
diff --git a/product_fao_fishing/views/product_attribute_views.xml b/product_fao_fishing/views/product_attribute_views.xml
index d8b205e7..9b0aa031 100644
--- a/product_fao_fishing/views/product_attribute_views.xml
+++ b/product_fao_fishing/views/product_attribute_views.xml
@@ -1,37 +1,29 @@
-
+
-
-
product.template.attribute.value
-
+
-
+
-
product.template.attribute.value
-
+
-
+
-
-
- product.attribute.value
-
-
-
-
-
-
-
-
diff --git a/product_fao_fishing/views/product_fao_techinique_views.xml b/product_fao_fishing/views/product_fao_techinique_views.xml
index a5a8170b..cc4469d4 100644
--- a/product_fao_fishing/views/product_fao_techinique_views.xml
+++ b/product_fao_fishing/views/product_fao_techinique_views.xml
@@ -1,20 +1,17 @@
-
+
-
-
product.fao.techique.search
product.fao.fishing.technique
-
-
+
+
-
product.fao.techique.form
product.fao.fishing.technique
@@ -22,35 +19,37 @@
-
product.fao.techique.list
product.fao.fishing.technique
1
-
+
-
Product Fao Techniques
ir.actions.act_window
product.fao.fishing.technique
- form
-
-
+
+
-
diff --git a/product_fao_fishing/views/product_template_views.xml b/product_fao_fishing/views/product_template_views.xml
index 6653aaa0..167cdb3b 100644
--- a/product_fao_fishing/views/product_template_views.xml
+++ b/product_fao_fishing/views/product_template_views.xml
@@ -1,17 +1,14 @@
-
+
-
-
product.template
-
+
-
+
-
From d72bb583cd227e24bf0899d208efa989a361096f Mon Sep 17 00:00:00 2001
From: sergio-teruel
Date: Mon, 24 Oct 2022 14:03:32 +0200
Subject: [PATCH 07/22] [MIG] product_fao_fishing: Migration to v15.0
---
product_fao_fishing/README.rst | 10 +++++-----
product_fao_fishing/__manifest__.py | 2 +-
.../models/product_fao_fishing_technique.py | 6 ++----
product_fao_fishing/static/description/index.html | 6 +++---
.../views/product_fao_techinique_views.xml | 2 +-
5 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/product_fao_fishing/README.rst b/product_fao_fishing/README.rst
index a59b939b..cddcf5e6 100644
--- a/product_fao_fishing/README.rst
+++ b/product_fao_fishing/README.rst
@@ -14,13 +14,13 @@ Product FAO Fishing
: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/13.0/product_fao_fishing
+ :target: https://github.com/OCA/community-data-files/tree/15.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-13-0/community-data-files-13-0-product_fao_fishing
+ :target: https://translation.odoo-community.org/projects/community-data-files-15-0/community-data-files-15-0-product_fao_fishing
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/101/13.0
+ :target: https://runbot.odoo-community.org/runbot/101/15.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -57,7 +57,7 @@ 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 `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -90,6 +90,6 @@ 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.
+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/__manifest__.py b/product_fao_fishing/__manifest__.py
index 25d4d39c..99da14a9 100644
--- a/product_fao_fishing/__manifest__.py
+++ b/product_fao_fishing/__manifest__.py
@@ -3,7 +3,7 @@
{
"name": "Product FAO Fishing",
"summary": "Set fishing areas and capture technology",
- "version": "13.0.1.0.0",
+ "version": "15.0.1.0.0",
"development_status": "Beta",
"category": "Fishing",
"website": "https://github.com/OCA/community-data-files",
diff --git a/product_fao_fishing/models/product_fao_fishing_technique.py b/product_fao_fishing/models/product_fao_fishing_technique.py
index e83ffd44..23f2f4fb 100644
--- a/product_fao_fishing/models/product_fao_fishing_technique.py
+++ b/product_fao_fishing/models/product_fao_fishing_technique.py
@@ -13,10 +13,8 @@ class ProductFaoFishingTechnique(models.Model):
_rec_name = "complete_name"
_order = "parent_path"
- name = fields.Char(string="Name", index=True, required=True, translate=True)
- complete_name = fields.Char(
- "Complete Name", compute="_compute_complete_name", store=True
- )
+ name = fields.Char(index=True, required=True, translate=True)
+ complete_name = fields.Char(compute="_compute_complete_name", store=True)
parent_id = fields.Many2one(
comodel_name="product.fao.fishing.technique",
string="Parent Technique",
diff --git a/product_fao_fishing/static/description/index.html b/product_fao_fishing/static/description/index.html
index 78fbbfe5..c1ce458b 100644
--- a/product_fao_fishing/static/description/index.html
+++ b/product_fao_fishing/static/description/index.html
@@ -367,7 +367,7 @@ Product FAO Fishing
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
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
@@ -412,7 +412,7 @@
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.
+feedback.
Do not contact contributors directly about support or help with technical issues.
diff --git a/product_fao_fishing/views/product_fao_techinique_views.xml b/product_fao_fishing/views/product_fao_techinique_views.xml
index cc4469d4..661a48de 100644
--- a/product_fao_fishing/views/product_fao_techinique_views.xml
+++ b/product_fao_fishing/views/product_fao_techinique_views.xml
@@ -40,7 +40,7 @@
product.fao.fishing.technique
1
-
+
From efe2b2d2b9f205055cbb17b826187aa212bfd631 Mon Sep 17 00:00:00 2001
From: sergio-teruel
Date: Mon, 24 Oct 2022 20:17:36 +0200
Subject: [PATCH 08/22] [IMP] product_fao_fishing: Remove FAO technique as a
model. Use attribute values like as fishing areas
---
product_fao_fishing/__manifest__.py | 5 +-
.../data/product_fao_fishing_data.xml | 1 +
.../product_fao_fishing_techique_data.xml | 30 -----
.../product_fao_fishing_technique_data.xml | 53 ++++++++
product_fao_fishing/i18n/.empty | 0
product_fao_fishing/i18n/es.po | 16 +--
.../i18n/product_fao_fishing.pot | 123 +++---------------
product_fao_fishing/models/__init__.py | 1 -
.../models/product_fao_fishing_technique.py | 45 -------
.../models/product_template.py | 26 +++-
.../security/ir.model.access.csv | 2 -
.../tests/test_product_fao_fishing.py | 37 +++---
.../views/product_fao_techinique_views.xml | 55 --------
.../views/product_template_views.xml | 14 --
14 files changed, 117 insertions(+), 291 deletions(-)
delete mode 100644 product_fao_fishing/data/product_fao_fishing_techique_data.xml
create mode 100644 product_fao_fishing/data/product_fao_fishing_technique_data.xml
delete mode 100644 product_fao_fishing/i18n/.empty
delete mode 100644 product_fao_fishing/models/product_fao_fishing_technique.py
delete mode 100644 product_fao_fishing/security/ir.model.access.csv
delete mode 100644 product_fao_fishing/views/product_fao_techinique_views.xml
delete mode 100644 product_fao_fishing/views/product_template_views.xml
diff --git a/product_fao_fishing/__manifest__.py b/product_fao_fishing/__manifest__.py
index 99da14a9..f572aeb8 100644
--- a/product_fao_fishing/__manifest__.py
+++ b/product_fao_fishing/__manifest__.py
@@ -12,11 +12,8 @@
"installable": True,
"depends": ["product"],
"data": [
- "security/ir.model.access.csv",
"data/product_fao_fishing_data.xml",
- "data/product_fao_fishing_techique_data.xml",
+ "data/product_fao_fishing_technique_data.xml",
"views/product_attribute_views.xml",
- "views/product_fao_techinique_views.xml",
- "views/product_template_views.xml",
],
}
diff --git a/product_fao_fishing/data/product_fao_fishing_data.xml b/product_fao_fishing/data/product_fao_fishing_data.xml
index 4d8747bf..e1885678 100644
--- a/product_fao_fishing/data/product_fao_fishing_data.xml
+++ b/product_fao_fishing/data/product_fao_fishing_data.xml
@@ -3,6 +3,7 @@
FAO Fishing Areas
no_variant
+ select
diff --git a/product_fao_fishing/data/product_fao_fishing_techique_data.xml b/product_fao_fishing/data/product_fao_fishing_techique_data.xml
deleted file mode 100644
index c1ea59f5..00000000
--- a/product_fao_fishing/data/product_fao_fishing_techique_data.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
- Spearfishing
-
-
- Netting
-
-
- Trawl nets
-
-
- Enmanelle nets and similar
-
-
- Purse seines and nets hoisted
-
-
- Angling
-
-
- Harrows
-
-
- Trapping
-
-
- Aquaculture
-
-
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/.empty b/product_fao_fishing/i18n/.empty
deleted file mode 100644
index e69de29b..00000000
diff --git a/product_fao_fishing/i18n/es.po b/product_fao_fishing/i18n/es.po
index fbd76c67..f1f7f4e1 100644
--- a/product_fao_fishing/i18n/es.po
+++ b/product_fao_fishing/i18n/es.po
@@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-07-05 12:01+0200\n"
-"PO-Revision-Date: 2018-07-05 12:24+0200\n"
+"PO-Revision-Date: 2022-10-25 08:45+0200\n"
"Last-Translator: Sergio Teruel \n"
"Language-Team: \n"
"Language: es\n"
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Poedit 1.8.7.1\n"
+"X-Generator: Poedit 3.0.1\n"
#. module: product_fao_fishing
#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_1
@@ -359,15 +359,3 @@ msgstr ""
#: model:ir.model.fields,field_description:product_fao_fishing.field_product_template_attribute_value__fao_zone_code
msgid "Zone Code"
msgstr "Código Zona"
-
-#, fuzzy
-#~ msgid "Draft nets"
-#~ msgstr "Borrador"
-
-#, fuzzy
-#~ msgid "Left Parent"
-#~ msgstr "Padre izquierdo"
-
-#, fuzzy
-#~ msgid "Right Parent"
-#~ msgstr "Padre derecho"
diff --git a/product_fao_fishing/i18n/product_fao_fishing.pot b/product_fao_fishing/i18n/product_fao_fishing.pot
index 81089b14..16ead7ea 100644
--- a/product_fao_fishing/i18n/product_fao_fishing.pot
+++ b/product_fao_fishing/i18n/product_fao_fishing.pot
@@ -4,8 +4,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 13.0\n"
+"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2022-10-24 13:56+0000\n"
+"PO-Revision-Date: 2022-10-24 13:56+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -29,7 +31,7 @@ msgid "America, South - Inland waters"
msgstr ""
#. module: product_fao_fishing
-#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_angling
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_angling
msgid "Angling"
msgstr ""
@@ -44,7 +46,7 @@ msgid "Antarctica - Inland waters"
msgstr ""
#. module: product_fao_fishing
-#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_aquaculture
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_aquaculture
msgid "Aquaculture"
msgstr ""
@@ -99,41 +101,10 @@ msgid "Attribute Value"
msgstr ""
#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__child_id
-msgid "Child Technique"
-msgstr ""
-
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__complete_name
-msgid "Complete Name"
-msgstr ""
-
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__create_uid
-msgid "Created by"
-msgstr ""
-
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__create_date
-msgid "Created on"
-msgstr ""
-
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__display_name
-msgid "Display Name"
-msgstr ""
-
-#. module: product_fao_fishing
-#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_enmanelle_nets
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_enmanelle_nets
msgid "Enmanelle nets and similar"
msgstr ""
-#. module: product_fao_fishing
-#: code:addons/product_fao_fishing/models/product_fao_fishing_technique.py:0
-#, python-format
-msgid "Error ! You cannot create recursive techniques."
-msgstr ""
-
#. module: product_fao_fishing
#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_5
msgid "Europe - Inland waters"
@@ -145,14 +116,8 @@ msgid "FAO Fishing Areas"
msgstr ""
#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_product__fao_fishing_technique_id
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_template__fao_fishing_technique_id
-msgid "FAO Fishing Tech."
-msgstr ""
-
-#. module: product_fao_fishing
-#: model_terms:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_search_view
-msgid "FAO Techniques"
+#: model:product.attribute,name:product_fao_fishing.fao_fishing_technique
+msgid "FAO Fishing Technique"
msgstr ""
#. module: product_fao_fishing
@@ -162,8 +127,9 @@ msgid "Fao Fishing Area"
msgstr ""
#. module: product_fao_fishing
-#: model:ir.model,name:product_fao_fishing.model_product_fao_fishing_technique
-msgid "Fishing Technique"
+#: 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
@@ -172,15 +138,10 @@ msgid "Former USSR area - Inland waters"
msgstr ""
#. module: product_fao_fishing
-#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_harrows
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_harrows
msgid "Harrows"
msgstr ""
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__id
-msgid "ID"
-msgstr ""
-
#. module: product_fao_fishing
#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_58
msgid "Indian Ocean, Antarctic"
@@ -196,21 +157,6 @@ msgstr ""
msgid "Indian Ocean, Western"
msgstr ""
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique____last_update
-msgid "Last Modified on"
-msgstr ""
-
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__write_uid
-msgid "Last Updated by"
-msgstr ""
-
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__write_date
-msgid "Last Updated on"
-msgstr ""
-
#. module: product_fao_fishing
#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_99
msgid "Marine areas outside the Antarctic"
@@ -222,12 +168,7 @@ msgid "Mediterranean and Black Sea"
msgstr ""
#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__name
-msgid "Name"
-msgstr ""
-
-#. module: product_fao_fishing
-#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_netting
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_netting
msgid "Netting"
msgstr ""
@@ -271,31 +212,6 @@ msgstr ""
msgid "Pacific, Western Central"
msgstr ""
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__parent_path
-msgid "Parent Path"
-msgstr ""
-
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__parent_id
-msgid "Parent Technique"
-msgstr ""
-
-#. module: product_fao_fishing
-#: model_terms:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_search_view
-msgid "Product Fao Fishing Techniques"
-msgstr ""
-
-#. module: product_fao_fishing
-#: model_terms:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_list_view
-msgid "Product Fao Techiniques"
-msgstr ""
-
-#. module: product_fao_fishing
-#: model:ir.actions.act_window,name:product_fao_fishing.product_fao_techique_action_form
-msgid "Product Fao Techniques"
-msgstr ""
-
#. module: product_fao_fishing
#: model:ir.model,name:product_fao_fishing.model_product_template
msgid "Product Template"
@@ -307,27 +223,22 @@ msgid "Product Template Attribute Value"
msgstr ""
#. module: product_fao_fishing
-#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_purse_nets
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_purse_nets
msgid "Purse seines and nets hoisted"
msgstr ""
#. module: product_fao_fishing
-#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_spearfishing
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_spearfishing
msgid "Spearfishing"
msgstr ""
#. module: product_fao_fishing
-#: model_terms:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_form_view
-msgid "Technique name"
-msgstr ""
-
-#. module: product_fao_fishing
-#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_trapping
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_trapping
msgid "Trapping"
msgstr ""
#. module: product_fao_fishing
-#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_trawl_nets
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_trawl_nets
msgid "Trawl nets"
msgstr ""
diff --git a/product_fao_fishing/models/__init__.py b/product_fao_fishing/models/__init__.py
index 4905833f..45784799 100644
--- a/product_fao_fishing/models/__init__.py
+++ b/product_fao_fishing/models/__init__.py
@@ -1,5 +1,4 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import product_attribute
-from . import product_fao_fishing_technique
from . import product_template
diff --git a/product_fao_fishing/models/product_fao_fishing_technique.py b/product_fao_fishing/models/product_fao_fishing_technique.py
deleted file mode 100644
index 23f2f4fb..00000000
--- a/product_fao_fishing/models/product_fao_fishing_technique.py
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 2018 Tecnativa - Sergio Teruel
-# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-
-from odoo import _, api, fields, models
-from odoo.exceptions import ValidationError
-
-
-class ProductFaoFishingTechnique(models.Model):
- _name = "product.fao.fishing.technique"
- _description = "Fishing Technique"
- _parent_name = "parent_id"
- _parent_store = True
- _rec_name = "complete_name"
- _order = "parent_path"
-
- name = fields.Char(index=True, required=True, translate=True)
- complete_name = fields.Char(compute="_compute_complete_name", store=True)
- parent_id = fields.Many2one(
- comodel_name="product.fao.fishing.technique",
- string="Parent Technique",
- index=True,
- ondelete="cascade",
- )
- child_id = fields.One2many(
- comodel_name="product.fao.fishing.technique",
- inverse_name="parent_id",
- string="Child Technique",
- )
- parent_path = fields.Char(index=True)
-
- @api.depends("name", "parent_id.complete_name")
- def _compute_complete_name(self):
- for tech in self:
- if tech.parent_id:
- tech.complete_name = "{} / {}".format(
- tech.parent_id.complete_name, tech.name
- )
- else:
- tech.complete_name = tech.name
-
- @api.constrains("parent_id")
- def _check_technique_recursion(self):
- if not self._check_recursion():
- raise ValidationError(_("Error ! You cannot create recursive techniques."))
- return True
diff --git a/product_fao_fishing/models/product_template.py b/product_fao_fishing/models/product_template.py
index 6736d738..ed0c7b3f 100644
--- a/product_fao_fishing/models/product_template.py
+++ b/product_fao_fishing/models/product_template.py
@@ -7,14 +7,13 @@
class ProductTemplate(models.Model):
_inherit = "product.template"
- fao_fishing_technique_id = fields.Many2one(
- comodel_name="product.fao.fishing.technique",
- string="FAO Fishing Tech.",
- ondelete="restrict",
- )
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):
"""
@@ -32,3 +31,20 @@ def _compute_fao_fishing_area_ids(self):
]
)
template.fao_fishing_area_ids = attribute_line.value_ids
+
+ def _compute_fao_fishing_technique_ids(self):
+ """
+ Helper method to retrieve the fishing areas 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/security/ir.model.access.csv b/product_fao_fishing/security/ir.model.access.csv
deleted file mode 100644
index fa51e221..00000000
--- a/product_fao_fishing/security/ir.model.access.csv
+++ /dev/null
@@ -1,2 +0,0 @@
-id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_product_fao_fishing_technique_employee,product_fao_fishing_technique_employee,model_product_fao_fishing_technique,base.group_user,1,1,1,1
diff --git a/product_fao_fishing/tests/test_product_fao_fishing.py b/product_fao_fishing/tests/test_product_fao_fishing.py
index e9014cd4..b3e60d9d 100644
--- a/product_fao_fishing/tests/test_product_fao_fishing.py
+++ b/product_fao_fishing/tests/test_product_fao_fishing.py
@@ -1,6 +1,5 @@
# Copyright 2018 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-from odoo.exceptions import UserError
from odoo.tests import SavepointCase
@@ -9,12 +8,21 @@ class TestProductFaoFishing(SavepointCase):
def setUpClass(cls):
super().setUpClass()
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_spearfishing"
+ )
+ cls.technique_attribute_value_2 = cls.env.ref(
+ "product_fao_fishing.fishing_technique_harrows"
+ )
cls.product = cls.env["product.template"].create(
{
"name": "test",
@@ -29,29 +37,28 @@ def setUpClass(cls):
(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_harrows"
)
- cls.my_tech = cls.env["product.fao.fishing.technique"].create(
- {"name": "My Tech", "parent_id": cls.fishing_tech_arrow.id}
- )
-
- def test_fishing_technique_name(self):
- self.assertEqual(
- self.my_tech.complete_name,
- "{} / {}".format(self.fishing_tech_arrow.name, self.my_tech.name),
- )
-
- def test_recursion(self):
- with self.assertRaises(UserError):
- self.my_tech.parent_id = self.my_tech
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_fao_techinique_views.xml b/product_fao_fishing/views/product_fao_techinique_views.xml
deleted file mode 100644
index 661a48de..00000000
--- a/product_fao_fishing/views/product_fao_techinique_views.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
- product.fao.techique.search
- product.fao.fishing.technique
-
-
-
-
-
-
-
-
- product.fao.techique.form
- product.fao.fishing.technique
-
-
-
-
-
- product.fao.techique.list
- product.fao.fishing.technique
- 1
-
-
-
-
-
-
-
- Product Fao Techniques
- ir.actions.act_window
- product.fao.fishing.technique
-
-
-
-
diff --git a/product_fao_fishing/views/product_template_views.xml b/product_fao_fishing/views/product_template_views.xml
deleted file mode 100644
index 167cdb3b..00000000
--- a/product_fao_fishing/views/product_template_views.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
- product.template
-
-
-
-
-
-
-
-
From f17bfbbff15b3ba8b9762eb7983ff32ff3b04218 Mon Sep 17 00:00:00 2001
From: sergio-teruel
Date: Mon, 12 Dec 2022 19:08:07 +0100
Subject: [PATCH 09/22] [MIG] product_fao_fishing: Migration script to change
old fao_fishing_technique_id field by new attribute value
---
.../migrations/15.0.1.0.1/post-migration.py | 77 +++++++++++++++++++
.../migrations/15.0.1.0.1/pre-migration.py | 19 +++++
.../tests/test_product_fao_fishing.py | 6 +-
3 files changed, 99 insertions(+), 3 deletions(-)
create mode 100644 product_fao_fishing/migrations/15.0.1.0.1/post-migration.py
create mode 100644 product_fao_fishing/migrations/15.0.1.0.1/pre-migration.py
diff --git a/product_fao_fishing/migrations/15.0.1.0.1/post-migration.py b/product_fao_fishing/migrations/15.0.1.0.1/post-migration.py
new file mode 100644
index 00000000..67e378be
--- /dev/null
+++ b/product_fao_fishing/migrations/15.0.1.0.1/post-migration.py
@@ -0,0 +1,77 @@
+# Copyright 2022 Tecnativa - Sergio Teruel
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openupgradelib import openupgrade # pylint: disable=W7936
+from psycopg2 import sql
+
+
+def _map_fao_technic_values_to_attributes_values(env):
+ """Search old product.fao.fishing.technique values for attributes values.
+ If the attr has not been found. We create new one
+ """
+ tech_attribute = env.ref("product_fao_fishing.fao_fishing_technique")
+ query = sql.SQL("SELECT id, name FROM {table}").format(
+ table=sql.Identifier(
+ openupgrade.get_legacy_name("product_fao_fishing_technique")
+ )
+ )
+ env.cr.execute(query)
+ results = env.cr.dictfetchall()
+ att_values_name = tech_attribute.value_ids.mapped("name")
+ values_to_create = {r["name"] for r in results if r["name"] not in att_values_name}
+ env["product.attribute.value"].create(
+ [{"name": name, "attribute_id": tech_attribute.id} for name in values_to_create]
+ )
+
+
+def _assign_att_value_to_product_template(env):
+ """Assign the attribute value to product template based on older
+ fao_fishing_technique_id field
+ """
+ tech_attribute = env.ref("product_fao_fishing.fao_fishing_technique")
+ query = sql.SQL(
+ """
+ select pt.id, pt.name AS product_name, pfft.name AS technic_name
+ FROM product_template pt LEFT JOIN {legacy_table} pfft
+ ON pt.{legacy_field} = pfft.id
+ WHERE pt.{legacy_field} IS NOT NULL
+ """
+ ).format(
+ legacy_table=sql.Identifier(
+ openupgrade.get_legacy_name("product_fao_fishing_technique")
+ ),
+ legacy_field=sql.Identifier(
+ openupgrade.get_legacy_name("fao_fishing_technique_id")
+ ),
+ )
+ env.cr.execute(query)
+ vals_list = []
+ for row in env.cr.dictfetchall():
+ attribute_value = tech_attribute.value_ids.filtered(
+ lambda atv: atv.name == row["technic_name"]
+ )
+ if attribute_value:
+ vals_list.append(
+ {
+ "product_tmpl_id": row["id"],
+ "attribute_id": tech_attribute.id,
+ "value_ids": [(4, attribute_value.id)],
+ "product_template_value_ids": [
+ (
+ 0,
+ 0,
+ {
+ "product_attribute_value_id": attribute_value.id,
+ "attribute_id": tech_attribute.id,
+ },
+ )
+ ],
+ }
+ )
+ env["product.template.attribute.line"].create(vals_list)
+
+
+@openupgrade.migrate()
+def migrate(env, version):
+ _map_fao_technic_values_to_attributes_values(env)
+ _assign_att_value_to_product_template(env)
diff --git a/product_fao_fishing/migrations/15.0.1.0.1/pre-migration.py b/product_fao_fishing/migrations/15.0.1.0.1/pre-migration.py
new file mode 100644
index 00000000..b8a8d5dc
--- /dev/null
+++ b/product_fao_fishing/migrations/15.0.1.0.1/pre-migration.py
@@ -0,0 +1,19 @@
+# Copyright 2022 Tecnativa - Sergio Teruel
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openupgradelib import openupgrade
+
+_column_renames = {
+ "product_template": [
+ ("fao_fishing_technique_id", None),
+ ],
+}
+_table_renames = [
+ ("product_fao_fishing_technique", None),
+]
+
+
+@openupgrade.migrate()
+def migrate(env, version):
+ openupgrade.rename_columns(env.cr, _column_renames)
+ openupgrade.rename_tables(env.cr, _table_renames)
diff --git a/product_fao_fishing/tests/test_product_fao_fishing.py b/product_fao_fishing/tests/test_product_fao_fishing.py
index b3e60d9d..b06f1b6d 100644
--- a/product_fao_fishing/tests/test_product_fao_fishing.py
+++ b/product_fao_fishing/tests/test_product_fao_fishing.py
@@ -18,10 +18,10 @@ def setUpClass(cls):
"product_fao_fishing.fao_fishing_area_2"
)
cls.technique_attribute_value_1 = cls.env.ref(
- "product_fao_fishing.fishing_technique_spearfishing"
+ "product_fao_fishing.fishing_technique_att_value_spearfishing"
)
cls.technique_attribute_value_2 = cls.env.ref(
- "product_fao_fishing.fishing_technique_harrows"
+ "product_fao_fishing.fishing_technique_att_value_harrows"
)
cls.product = cls.env["product.template"].create(
{
@@ -53,7 +53,7 @@ def setUpClass(cls):
}
)
cls.fishing_tech_arrow = cls.env.ref(
- "product_fao_fishing.fishing_technique_harrows"
+ "product_fao_fishing.fishing_technique_att_value_harrows"
)
def test_fishing_areas_from_attribute(self):
From 7db0f1429b4a68fc2e4973e4bb09b5c58326aa03 Mon Sep 17 00:00:00 2001
From: sergio-teruel
Date: Mon, 12 Dec 2022 19:29:31 +0100
Subject: [PATCH 10/22] [IMP] product_fao_fishing: Translate
---
product_fao_fishing/i18n/es.po | 218 +++++-------------
.../i18n/product_fao_fishing.pot | 20 +-
2 files changed, 63 insertions(+), 175 deletions(-)
diff --git a/product_fao_fishing/i18n/es.po b/product_fao_fishing/i18n/es.po
index f1f7f4e1..aec8368c 100644
--- a/product_fao_fishing/i18n/es.po
+++ b/product_fao_fishing/i18n/es.po
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-07-05 12:01+0200\n"
-"PO-Revision-Date: 2022-10-25 08:45+0200\n"
+"POT-Creation-Date: 2022-12-12 18:18+0000\n"
+"PO-Revision-Date: 2022-12-12 19:28+0100\n"
"Last-Translator: Sergio Teruel \n"
"Language-Team: \n"
"Language: es\n"
@@ -19,39 +19,36 @@ msgstr ""
#. module: product_fao_fishing
#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_1
-#, fuzzy
msgid "Africa - Inland waters"
-msgstr "Sudáfrica"
+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 "África - Aguas continentales"
+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 del Sur - Aguas continentales"
+msgstr "América, Sur - Aguas continentales"
#. module: product_fao_fishing
-#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_angling
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_angling
msgid "Angling"
-msgstr ""
+msgstr "Pesca con caña"
#. module: product_fao_fishing
#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_98
-#, fuzzy
msgid "Antarctic areas nei"
-msgstr "Areas / Departamentos"
+msgstr "Áreas antárticas"
#. module: product_fao_fishing
#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_8
-#, fuzzy
msgid "Antarctica - Inland waters"
-msgstr "Antártida"
+msgstr "Antártida - Aguas continentales"
#. module: product_fao_fishing
-#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_aquaculture
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_aquaculture
msgid "Aquaculture"
msgstr "Acuicultura"
@@ -72,82 +69,48 @@ msgstr "Atlántico, Antártico"
#. module: product_fao_fishing
#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_34
-#, fuzzy
msgid "Atlantic, Eastern Central"
-msgstr "República Centro Africana"
+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, nordeste"
+msgstr "Atlántico, Noreste"
#. module: product_fao_fishing
#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_21
msgid "Atlantic, Northwest"
-msgstr ""
+msgstr "Atlántico, Noroeste"
#. module: product_fao_fishing
#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_47
msgid "Atlantic, Southeast"
-msgstr ""
+msgstr "Atlántico, Sudeste"
#. module: product_fao_fishing
#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_41
msgid "Atlantic, Southwest"
-msgstr ""
+msgstr "Atlántico, suroeste"
#. module: product_fao_fishing
#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_31
-#, fuzzy
msgid "Atlantic, Western Central"
-msgstr "Sáhara occidental"
+msgstr "Atlántico, centro occidental"
#. module: product_fao_fishing
#: model:ir.model,name:product_fao_fishing.model_product_attribute_value
-#, fuzzy
msgid "Attribute Value"
-msgstr "product.attribute.value"
-
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__child_id
-msgid "Child Technique"
-msgstr "Subtécnica"
-
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__complete_name
-msgid "Complete Name"
-msgstr "Nombre completo"
-
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__create_uid
-msgid "Created by"
-msgstr "Creado por"
-
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__create_date
-msgid "Created on"
-msgstr "Creado en"
-
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__display_name
-msgid "Display Name"
-msgstr "Mostrar Nombre"
+msgstr "Valor del Atributo"
#. module: product_fao_fishing
-#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_enmanelle_nets
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_enmanelle_nets
msgid "Enmanelle nets and similar"
-msgstr ""
-
-#. module: product_fao_fishing
-#: code:addons/product_fao_fishing/models/product_fao_fishing_technique.py:0
-#, python-format
-msgid "Error ! You cannot create recursive techniques."
-msgstr "¡Error! No puede crear técnicas recursivas"
+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 ""
+msgstr "Europa - Aguas continentales"
#. module: product_fao_fishing
#: model:product.attribute,name:product_fao_fishing.fao_fishing_area
@@ -155,168 +118,101 @@ msgid "FAO Fishing Areas"
msgstr "Areas de pesca FAO"
#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_product__fao_fishing_technique_id
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_template__fao_fishing_technique_id
-msgid "FAO Fishing Tech."
-msgstr ""
-
-#. module: product_fao_fishing
-#: model_terms:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_search_view
-msgid "FAO Techniques"
-msgstr ""
+#: 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
-#, fuzzy
msgid "Fao Fishing Area"
msgstr "Areas de pesca FAO"
#. module: product_fao_fishing
-#: model:ir.model,name:product_fao_fishing.model_product_fao_fishing_technique
-msgid "Fishing Technique"
-msgstr ""
+#: 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 ""
+msgstr "Zona de la antigua URSS - Aguas continentales"
#. module: product_fao_fishing
-#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_harrows
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_harrows
msgid "Harrows"
-msgstr ""
-
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__id
-msgid "ID"
-msgstr "ID"
+msgstr "Gradas"
#. module: product_fao_fishing
#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_58
-#, fuzzy
msgid "Indian Ocean, Antarctic"
-msgstr "Territorio británico del Océano Índico"
+msgstr "Océano Índico, Antártida"
#. module: product_fao_fishing
#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_57
-#, fuzzy
msgid "Indian Ocean, Eastern"
-msgstr "Territorio británico del Océano Índico"
+msgstr "Océano Índico, Este"
#. module: product_fao_fishing
#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_51
-#, fuzzy
msgid "Indian Ocean, Western"
-msgstr "Territorio británico del Océano Índico"
-
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique____last_update
-#, fuzzy
-msgid "Last Modified on"
-msgstr "Última modificación en"
-
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__write_uid
-#, fuzzy
-msgid "Last Updated by"
-msgstr "Última modificación por"
-
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__write_date
-#, fuzzy
-msgid "Last Updated on"
-msgstr "Última actualización en"
+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 ""
+msgstr "Áreas marinas fuera de la Antártida"
#. module: product_fao_fishing
#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_37
-#, fuzzy
msgid "Mediterranean and Black Sea"
-msgstr "Negro"
+msgstr "Mediterráneo y Mar Negro"
#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__name
-#, fuzzy
-msgid "Name"
-msgstr "Nombre"
-
-#. module: product_fao_fishing
-#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_netting
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_netting
msgid "Netting"
-msgstr ""
+msgstr "Redes"
#. module: product_fao_fishing
#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_6
msgid "Oceania - Inland waters"
-msgstr ""
+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 ""
+msgstr "Pacífico, Antártida"
#. module: product_fao_fishing
#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_77
-#, fuzzy
msgid "Pacific, Eastern Central"
-msgstr "República Centro Africana"
+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 ""
+msgstr "Pacífico, Noreste"
#. module: product_fao_fishing
#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_61
msgid "Pacific, Northwest"
-msgstr ""
+msgstr "Noroeste pacífico"
#. module: product_fao_fishing
#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_87
msgid "Pacific, Southeast"
-msgstr ""
+msgstr "Pacífico, Sudeste"
#. module: product_fao_fishing
#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_81
msgid "Pacific, Southwest"
-msgstr ""
+msgstr "Pacífico, suroeste"
#. module: product_fao_fishing
#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_71
-#, fuzzy
msgid "Pacific, Western Central"
-msgstr "Sáhara occidental"
-
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__parent_path
-msgid "Parent Path"
-msgstr ""
-
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__parent_id
-#, fuzzy
-msgid "Parent Technique"
-msgstr "Padre"
-
-#. module: product_fao_fishing
-#: model_terms:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_search_view
-msgid "Product Fao Fishing Techniques"
-msgstr ""
-
-#. module: product_fao_fishing
-#: model_terms:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_list_view
-msgid "Product Fao Techiniques"
-msgstr "Técnicas de pesca"
-
-#. module: product_fao_fishing
-#: model:ir.actions.act_window,name:product_fao_fishing.product_fao_techique_action_form
-msgid "Product Fao Techniques"
-msgstr "Técnicas de pesca"
+msgstr "Pacífico, centro occidental"
#. module: product_fao_fishing
#: model:ir.model,name:product_fao_fishing.model_product_template
@@ -325,34 +221,28 @@ msgstr "Plantilla de producto"
#. module: product_fao_fishing
#: model:ir.model,name:product_fao_fishing.model_product_template_attribute_value
-#, fuzzy
msgid "Product Template Attribute Value"
-msgstr "product.attribute.value"
+msgstr "Valor personalizado del atributo del producto"
#. module: product_fao_fishing
-#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_purse_nets
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_purse_nets
msgid "Purse seines and nets hoisted"
-msgstr ""
+msgstr "Izado de redes y redes de cerco"
#. module: product_fao_fishing
-#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_spearfishing
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_spearfishing
msgid "Spearfishing"
-msgstr ""
+msgstr "Pesca submarina"
#. module: product_fao_fishing
-#: model_terms:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_form_view
-msgid "Technique name"
-msgstr "Nombre técnica"
-
-#. module: product_fao_fishing
-#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_trapping
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_trapping
msgid "Trapping"
-msgstr ""
+msgstr "Captura"
#. module: product_fao_fishing
-#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_trawl_nets
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_trawl_nets
msgid "Trawl nets"
-msgstr ""
+msgstr "Redes de arrastre"
#. module: product_fao_fishing
#: model:ir.model.fields,field_description:product_fao_fishing.field_product_attribute_value__fao_zone_code
diff --git a/product_fao_fishing/i18n/product_fao_fishing.pot b/product_fao_fishing/i18n/product_fao_fishing.pot
index 16ead7ea..1171997d 100644
--- a/product_fao_fishing/i18n/product_fao_fishing.pot
+++ b/product_fao_fishing/i18n/product_fao_fishing.pot
@@ -6,8 +6,6 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-10-24 13:56+0000\n"
-"PO-Revision-Date: 2022-10-24 13:56+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -31,7 +29,7 @@ msgid "America, South - Inland waters"
msgstr ""
#. module: product_fao_fishing
-#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_angling
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_angling
msgid "Angling"
msgstr ""
@@ -46,7 +44,7 @@ msgid "Antarctica - Inland waters"
msgstr ""
#. module: product_fao_fishing
-#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_aquaculture
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_aquaculture
msgid "Aquaculture"
msgstr ""
@@ -101,7 +99,7 @@ msgid "Attribute Value"
msgstr ""
#. module: product_fao_fishing
-#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_enmanelle_nets
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_enmanelle_nets
msgid "Enmanelle nets and similar"
msgstr ""
@@ -138,7 +136,7 @@ msgid "Former USSR area - Inland waters"
msgstr ""
#. module: product_fao_fishing
-#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_harrows
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_harrows
msgid "Harrows"
msgstr ""
@@ -168,7 +166,7 @@ msgid "Mediterranean and Black Sea"
msgstr ""
#. module: product_fao_fishing
-#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_netting
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_netting
msgid "Netting"
msgstr ""
@@ -223,22 +221,22 @@ msgid "Product Template Attribute Value"
msgstr ""
#. module: product_fao_fishing
-#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_purse_nets
+#: 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_spearfishing
+#: 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_trapping
+#: 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_trawl_nets
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_trawl_nets
msgid "Trawl nets"
msgstr ""
From f3e9f1a3bee8be316d6300139192778b330a1564 Mon Sep 17 00:00:00 2001
From: sergio-teruel
Date: Thu, 22 Dec 2022 09:27:54 +0100
Subject: [PATCH 11/22] [FIX] product_fao_fishing: Rename migration folder
version
---
.../migrations/{15.0.1.0.1 => 15.0.1.0.0}/post-migration.py | 0
.../migrations/{15.0.1.0.1 => 15.0.1.0.0}/pre-migration.py | 0
2 files changed, 0 insertions(+), 0 deletions(-)
rename product_fao_fishing/migrations/{15.0.1.0.1 => 15.0.1.0.0}/post-migration.py (100%)
rename product_fao_fishing/migrations/{15.0.1.0.1 => 15.0.1.0.0}/pre-migration.py (100%)
diff --git a/product_fao_fishing/migrations/15.0.1.0.1/post-migration.py b/product_fao_fishing/migrations/15.0.1.0.0/post-migration.py
similarity index 100%
rename from product_fao_fishing/migrations/15.0.1.0.1/post-migration.py
rename to product_fao_fishing/migrations/15.0.1.0.0/post-migration.py
diff --git a/product_fao_fishing/migrations/15.0.1.0.1/pre-migration.py b/product_fao_fishing/migrations/15.0.1.0.0/pre-migration.py
similarity index 100%
rename from product_fao_fishing/migrations/15.0.1.0.1/pre-migration.py
rename to product_fao_fishing/migrations/15.0.1.0.0/pre-migration.py
From 7e7e075bf12e963a1d37a48f10b396299b0bb028 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?=
Date: Tue, 2 May 2023 13:19:42 +0200
Subject: [PATCH 12/22] [FIX] product_fao_fishing: Change SavepointCase to
TransactionCase
---
product_fao_fishing/__manifest__.py | 2 +-
product_fao_fishing/tests/test_product_fao_fishing.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/product_fao_fishing/__manifest__.py b/product_fao_fishing/__manifest__.py
index f572aeb8..858c7387 100644
--- a/product_fao_fishing/__manifest__.py
+++ b/product_fao_fishing/__manifest__.py
@@ -3,7 +3,7 @@
{
"name": "Product FAO Fishing",
"summary": "Set fishing areas and capture technology",
- "version": "15.0.1.0.0",
+ "version": "15.0.1.0.1",
"development_status": "Beta",
"category": "Fishing",
"website": "https://github.com/OCA/community-data-files",
diff --git a/product_fao_fishing/tests/test_product_fao_fishing.py b/product_fao_fishing/tests/test_product_fao_fishing.py
index b06f1b6d..c8d5c645 100644
--- a/product_fao_fishing/tests/test_product_fao_fishing.py
+++ b/product_fao_fishing/tests/test_product_fao_fishing.py
@@ -1,9 +1,9 @@
# Copyright 2018 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-from odoo.tests import SavepointCase
+from odoo.tests import TransactionCase
-class TestProductFaoFishing(SavepointCase):
+class TestProductFaoFishing(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
From e09d621bfabcb7e069e1fc75a23e82fd0ae003ab Mon Sep 17 00:00:00 2001
From: Stefan
Date: Mon, 8 May 2023 12:57:28 +0200
Subject: [PATCH 13/22] [MIG] product_fao_fishing: Migration to 16.0
---
product_fao_fishing/__manifest__.py | 2 +-
.../migrations/15.0.1.0.0/post-migration.py | 77 -------------------
.../migrations/15.0.1.0.0/pre-migration.py | 19 -----
.../models/product_template.py | 2 +-
4 files changed, 2 insertions(+), 98 deletions(-)
delete mode 100644 product_fao_fishing/migrations/15.0.1.0.0/post-migration.py
delete mode 100644 product_fao_fishing/migrations/15.0.1.0.0/pre-migration.py
diff --git a/product_fao_fishing/__manifest__.py b/product_fao_fishing/__manifest__.py
index 858c7387..81ffa1b5 100644
--- a/product_fao_fishing/__manifest__.py
+++ b/product_fao_fishing/__manifest__.py
@@ -3,7 +3,7 @@
{
"name": "Product FAO Fishing",
"summary": "Set fishing areas and capture technology",
- "version": "15.0.1.0.1",
+ "version": "16.0.1.0.0",
"development_status": "Beta",
"category": "Fishing",
"website": "https://github.com/OCA/community-data-files",
diff --git a/product_fao_fishing/migrations/15.0.1.0.0/post-migration.py b/product_fao_fishing/migrations/15.0.1.0.0/post-migration.py
deleted file mode 100644
index 67e378be..00000000
--- a/product_fao_fishing/migrations/15.0.1.0.0/post-migration.py
+++ /dev/null
@@ -1,77 +0,0 @@
-# Copyright 2022 Tecnativa - Sergio Teruel
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-
-from openupgradelib import openupgrade # pylint: disable=W7936
-from psycopg2 import sql
-
-
-def _map_fao_technic_values_to_attributes_values(env):
- """Search old product.fao.fishing.technique values for attributes values.
- If the attr has not been found. We create new one
- """
- tech_attribute = env.ref("product_fao_fishing.fao_fishing_technique")
- query = sql.SQL("SELECT id, name FROM {table}").format(
- table=sql.Identifier(
- openupgrade.get_legacy_name("product_fao_fishing_technique")
- )
- )
- env.cr.execute(query)
- results = env.cr.dictfetchall()
- att_values_name = tech_attribute.value_ids.mapped("name")
- values_to_create = {r["name"] for r in results if r["name"] not in att_values_name}
- env["product.attribute.value"].create(
- [{"name": name, "attribute_id": tech_attribute.id} for name in values_to_create]
- )
-
-
-def _assign_att_value_to_product_template(env):
- """Assign the attribute value to product template based on older
- fao_fishing_technique_id field
- """
- tech_attribute = env.ref("product_fao_fishing.fao_fishing_technique")
- query = sql.SQL(
- """
- select pt.id, pt.name AS product_name, pfft.name AS technic_name
- FROM product_template pt LEFT JOIN {legacy_table} pfft
- ON pt.{legacy_field} = pfft.id
- WHERE pt.{legacy_field} IS NOT NULL
- """
- ).format(
- legacy_table=sql.Identifier(
- openupgrade.get_legacy_name("product_fao_fishing_technique")
- ),
- legacy_field=sql.Identifier(
- openupgrade.get_legacy_name("fao_fishing_technique_id")
- ),
- )
- env.cr.execute(query)
- vals_list = []
- for row in env.cr.dictfetchall():
- attribute_value = tech_attribute.value_ids.filtered(
- lambda atv: atv.name == row["technic_name"]
- )
- if attribute_value:
- vals_list.append(
- {
- "product_tmpl_id": row["id"],
- "attribute_id": tech_attribute.id,
- "value_ids": [(4, attribute_value.id)],
- "product_template_value_ids": [
- (
- 0,
- 0,
- {
- "product_attribute_value_id": attribute_value.id,
- "attribute_id": tech_attribute.id,
- },
- )
- ],
- }
- )
- env["product.template.attribute.line"].create(vals_list)
-
-
-@openupgrade.migrate()
-def migrate(env, version):
- _map_fao_technic_values_to_attributes_values(env)
- _assign_att_value_to_product_template(env)
diff --git a/product_fao_fishing/migrations/15.0.1.0.0/pre-migration.py b/product_fao_fishing/migrations/15.0.1.0.0/pre-migration.py
deleted file mode 100644
index b8a8d5dc..00000000
--- a/product_fao_fishing/migrations/15.0.1.0.0/pre-migration.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# Copyright 2022 Tecnativa - Sergio Teruel
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-
-from openupgradelib import openupgrade
-
-_column_renames = {
- "product_template": [
- ("fao_fishing_technique_id", None),
- ],
-}
-_table_renames = [
- ("product_fao_fishing_technique", None),
-]
-
-
-@openupgrade.migrate()
-def migrate(env, version):
- openupgrade.rename_columns(env.cr, _column_renames)
- openupgrade.rename_tables(env.cr, _table_renames)
diff --git a/product_fao_fishing/models/product_template.py b/product_fao_fishing/models/product_template.py
index ed0c7b3f..1e489f65 100644
--- a/product_fao_fishing/models/product_template.py
+++ b/product_fao_fishing/models/product_template.py
@@ -34,7 +34,7 @@ def _compute_fao_fishing_area_ids(self):
def _compute_fao_fishing_technique_ids(self):
"""
- Helper method to retrieve the fishing areas from product attributes
+ Helper method to retrieve the fishing techniques from product attributes
"""
fao_fishing_technique_attribute = self.env.ref(
"product_fao_fishing.fao_fishing_technique"
From 5a6170832142ad7d51f3ad9504e4aff679276d45 Mon Sep 17 00:00:00 2001
From: oca-ci
Date: Mon, 15 May 2023 08:07:02 +0000
Subject: [PATCH 14/22] [UPD] Update product_fao_fishing.pot
---
product_fao_fishing/i18n/product_fao_fishing.pot | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/product_fao_fishing/i18n/product_fao_fishing.pot b/product_fao_fishing/i18n/product_fao_fishing.pot
index 1171997d..ce1acae0 100644
--- a/product_fao_fishing/i18n/product_fao_fishing.pot
+++ b/product_fao_fishing/i18n/product_fao_fishing.pot
@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 15.0\n"
+"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -212,7 +212,7 @@ msgstr ""
#. module: product_fao_fishing
#: model:ir.model,name:product_fao_fishing.model_product_template
-msgid "Product Template"
+msgid "Product"
msgstr ""
#. module: product_fao_fishing
From ca93f5cdba234e2b7fae29caff4236adb196aeae Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Mon, 15 May 2023 08:10:36 +0000
Subject: [PATCH 15/22] [UPD] README.rst
---
product_fao_fishing/README.rst | 10 +++++-----
product_fao_fishing/static/description/index.html | 6 +++---
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/product_fao_fishing/README.rst b/product_fao_fishing/README.rst
index cddcf5e6..567f646b 100644
--- a/product_fao_fishing/README.rst
+++ b/product_fao_fishing/README.rst
@@ -14,13 +14,13 @@ Product FAO Fishing
: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/15.0/product_fao_fishing
+ :target: https://github.com/OCA/community-data-files/tree/16.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-15-0/community-data-files-15-0-product_fao_fishing
+ :target: https://translation.odoo-community.org/projects/community-data-files-16-0/community-data-files-16-0-product_fao_fishing
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/101/15.0
+ :target: https://runbot.odoo-community.org/runbot/101/16.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -57,7 +57,7 @@ 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 `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -90,6 +90,6 @@ 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.
+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/static/description/index.html b/product_fao_fishing/static/description/index.html
index c1ce458b..88163416 100644
--- a/product_fao_fishing/static/description/index.html
+++ b/product_fao_fishing/static/description/index.html
@@ -367,7 +367,7 @@ Product FAO Fishing
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
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
@@ -412,7 +412,7 @@
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.
+feedback.
Do not contact contributors directly about support or help with technical issues.
From 227d10cd1053324040d5c6558a5cfd99b5df6e2b Mon Sep 17 00:00:00 2001
From: Weblate
Date: Mon, 15 May 2023 12:11:51 +0000
Subject: [PATCH 16/22] Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
Translation: community-data-files-16.0/community-data-files-16.0-product_fao_fishing
Translate-URL: https://translation.odoo-community.org/projects/community-data-files-16-0/community-data-files-16-0-product_fao_fishing/
---
product_fao_fishing/i18n/es.po | 7 +-
product_fao_fishing/i18n/pt_BR.po | 121 ++++--------------------------
2 files changed, 20 insertions(+), 108 deletions(-)
diff --git a/product_fao_fishing/i18n/es.po b/product_fao_fishing/i18n/es.po
index aec8368c..b0305dea 100644
--- a/product_fao_fishing/i18n/es.po
+++ b/product_fao_fishing/i18n/es.po
@@ -216,8 +216,8 @@ msgstr "Pacífico, centro occidental"
#. module: product_fao_fishing
#: model:ir.model,name:product_fao_fishing.model_product_template
-msgid "Product Template"
-msgstr "Plantilla de producto"
+msgid "Product"
+msgstr ""
#. module: product_fao_fishing
#: model:ir.model,name:product_fao_fishing.model_product_template_attribute_value
@@ -249,3 +249,6 @@ msgstr "Redes de arrastre"
#: 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/pt_BR.po b/product_fao_fishing/i18n/pt_BR.po
index 68d361d0..526061eb 100644
--- a/product_fao_fishing/i18n/pt_BR.po
+++ b/product_fao_fishing/i18n/pt_BR.po
@@ -30,7 +30,7 @@ msgid "America, South - Inland waters"
msgstr ""
#. module: product_fao_fishing
-#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_angling
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_angling
msgid "Angling"
msgstr ""
@@ -45,7 +45,7 @@ msgid "Antarctica - Inland waters"
msgstr ""
#. module: product_fao_fishing
-#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_aquaculture
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_aquaculture
msgid "Aquaculture"
msgstr ""
@@ -100,41 +100,10 @@ msgid "Attribute Value"
msgstr ""
#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__child_id
-msgid "Child Technique"
-msgstr ""
-
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__complete_name
-msgid "Complete Name"
-msgstr ""
-
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__create_uid
-msgid "Created by"
-msgstr ""
-
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__create_date
-msgid "Created on"
-msgstr ""
-
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__display_name
-msgid "Display Name"
-msgstr ""
-
-#. module: product_fao_fishing
-#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_enmanelle_nets
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_enmanelle_nets
msgid "Enmanelle nets and similar"
msgstr ""
-#. module: product_fao_fishing
-#: code:addons/product_fao_fishing/models/product_fao_fishing_technique.py:0
-#, python-format
-msgid "Error ! You cannot create recursive techniques."
-msgstr ""
-
#. module: product_fao_fishing
#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_5
msgid "Europe - Inland waters"
@@ -146,14 +115,8 @@ msgid "FAO Fishing Areas"
msgstr ""
#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_product__fao_fishing_technique_id
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_template__fao_fishing_technique_id
-msgid "FAO Fishing Tech."
-msgstr ""
-
-#. module: product_fao_fishing
-#: model_terms:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_search_view
-msgid "FAO Techniques"
+#: model:product.attribute,name:product_fao_fishing.fao_fishing_technique
+msgid "FAO Fishing Technique"
msgstr ""
#. module: product_fao_fishing
@@ -163,8 +126,9 @@ msgid "Fao Fishing Area"
msgstr ""
#. module: product_fao_fishing
-#: model:ir.model,name:product_fao_fishing.model_product_fao_fishing_technique
-msgid "Fishing Technique"
+#: 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
@@ -173,15 +137,10 @@ msgid "Former USSR area - Inland waters"
msgstr ""
#. module: product_fao_fishing
-#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_harrows
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_harrows
msgid "Harrows"
msgstr ""
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__id
-msgid "ID"
-msgstr ""
-
#. module: product_fao_fishing
#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_58
msgid "Indian Ocean, Antarctic"
@@ -197,21 +156,6 @@ msgstr ""
msgid "Indian Ocean, Western"
msgstr ""
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique____last_update
-msgid "Last Modified on"
-msgstr ""
-
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__write_uid
-msgid "Last Updated by"
-msgstr ""
-
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__write_date
-msgid "Last Updated on"
-msgstr ""
-
#. module: product_fao_fishing
#: model:product.attribute.value,name:product_fao_fishing.fao_fishing_area_99
msgid "Marine areas outside the Antarctic"
@@ -223,12 +167,7 @@ msgid "Mediterranean and Black Sea"
msgstr ""
#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__name
-msgid "Name"
-msgstr ""
-
-#. module: product_fao_fishing
-#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_netting
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_netting
msgid "Netting"
msgstr ""
@@ -272,34 +211,9 @@ msgstr ""
msgid "Pacific, Western Central"
msgstr ""
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__parent_path
-msgid "Parent Path"
-msgstr ""
-
-#. module: product_fao_fishing
-#: model:ir.model.fields,field_description:product_fao_fishing.field_product_fao_fishing_technique__parent_id
-msgid "Parent Technique"
-msgstr ""
-
-#. module: product_fao_fishing
-#: model_terms:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_search_view
-msgid "Product Fao Fishing Techniques"
-msgstr ""
-
-#. module: product_fao_fishing
-#: model_terms:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_list_view
-msgid "Product Fao Techiniques"
-msgstr ""
-
-#. module: product_fao_fishing
-#: model:ir.actions.act_window,name:product_fao_fishing.product_fao_techique_action_form
-msgid "Product Fao Techniques"
-msgstr ""
-
#. module: product_fao_fishing
#: model:ir.model,name:product_fao_fishing.model_product_template
-msgid "Product Template"
+msgid "Product"
msgstr ""
#. module: product_fao_fishing
@@ -308,27 +222,22 @@ msgid "Product Template Attribute Value"
msgstr ""
#. module: product_fao_fishing
-#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_purse_nets
+#: 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.fao.fishing.technique,name:product_fao_fishing.fishing_technique_spearfishing
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_spearfishing
msgid "Spearfishing"
msgstr ""
#. module: product_fao_fishing
-#: model_terms:ir.ui.view,arch_db:product_fao_fishing.product_fao_techique_form_view
-msgid "Technique name"
-msgstr ""
-
-#. module: product_fao_fishing
-#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_trapping
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_trapping
msgid "Trapping"
msgstr ""
#. module: product_fao_fishing
-#: model:product.fao.fishing.technique,name:product_fao_fishing.fishing_technique_trawl_nets
+#: model:product.attribute.value,name:product_fao_fishing.fishing_technique_att_value_trawl_nets
msgid "Trawl nets"
msgstr ""
From 3f58ff9ddbbe0c75e71f576e3f31791ef7a4305d Mon Sep 17 00:00:00 2001
From: Ivorra78
Date: Wed, 2 Aug 2023 09:44:15 +0000
Subject: [PATCH 17/22] Translated using Weblate (Spanish)
Currently translated at 100.0% (46 of 46 strings)
Translation: community-data-files-16.0/community-data-files-16.0-product_fao_fishing
Translate-URL: https://translation.odoo-community.org/projects/community-data-files-16-0/community-data-files-16-0-product_fao_fishing/es/
---
product_fao_fishing/i18n/es.po | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/product_fao_fishing/i18n/es.po b/product_fao_fishing/i18n/es.po
index b0305dea..fc8a92a8 100644
--- a/product_fao_fishing/i18n/es.po
+++ b/product_fao_fishing/i18n/es.po
@@ -7,15 +7,15 @@ 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: 2022-12-12 19:28+0100\n"
-"Last-Translator: Sergio Teruel \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: Poedit 3.0.1\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
@@ -217,7 +217,7 @@ msgstr "Pacífico, centro occidental"
#. module: product_fao_fishing
#: model:ir.model,name:product_fao_fishing.model_product_template
msgid "Product"
-msgstr ""
+msgstr "Producto"
#. module: product_fao_fishing
#: model:ir.model,name:product_fao_fishing.model_product_template_attribute_value
From 9a819a0f25b4026c1dc5cf43075d7293754b4954 Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Sun, 3 Sep 2023 12:02:15 +0000
Subject: [PATCH 18/22] [UPD] README.rst
---
product_fao_fishing/README.rst | 15 ++++---
.../static/description/index.html | 42 ++++++++++---------
2 files changed, 31 insertions(+), 26 deletions(-)
diff --git a/product_fao_fishing/README.rst b/product_fao_fishing/README.rst
index 567f646b..e0f6a0c5 100644
--- a/product_fao_fishing/README.rst
+++ b/product_fao_fishing/README.rst
@@ -2,10 +2,13 @@
Product FAO Fishing
===================
-.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+..
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ !! source digest: sha256:e975a2f113227895cfef0998239c183096dda4445bd35b6253ff5311eb22ab0f
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
@@ -19,11 +22,11 @@ Product FAO Fishing
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/community-data-files-16-0/community-data-files-16-0-product_fao_fishing
:alt: Translate me on Weblate
-.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/101/16.0
- :alt: Try me on Runbot
+.. |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=16.0
+ :alt: Try me on Runboat
-|badge1| |badge2| |badge3| |badge4| |badge5|
+|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.
@@ -56,7 +59,7 @@ 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
+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.
diff --git a/product_fao_fishing/static/description/index.html b/product_fao_fishing/static/description/index.html
index 88163416..29b7e290 100644
--- a/product_fao_fishing/static/description/index.html
+++ b/product_fao_fishing/static/description/index.html
@@ -1,20 +1,20 @@
-
+
-
+
Product FAO Fishing