From 958d7f14d8dc741ac80014a7459e4a1926ad28b8 Mon Sep 17 00:00:00 2001
From: Divya Modi
Date: Fri, 31 Aug 2018 19:26:08 +0530
Subject: [PATCH 01/23] [ADD] apps_download
---
apps_download/README.rst | 57 ++++++++
apps_download/__init__.py | 2 +
apps_download/__manifest__.py | 29 +++++
apps_download/data/cron_scheduler.xml | 21 +++
apps_download/demo/product_template_demo.xml | 86 ++++++++++++
apps_download/i18n/apps_download.pot | 91 +++++++++++++
apps_download/i18n/es.po | 101 +++++++++++++++
apps_download/i18n/fr.po | 101 +++++++++++++++
apps_download/models/__init__.py | 1 +
apps_download/models/product_product.py | 122 ++++++++++++++++++
apps_download/static/description/icon.png | Bin 0 -> 9455 bytes
apps_download/tests/__init__.py | 1 +
apps_download/tests/test_app_download.py | 58 +++++++++
.../test_modules/broken_lint/__init__.py | 3 +
.../test_modules/broken_lint/__manifest__.py | 10 ++
.../broken_lint/case_deprecated.py | 17 +++
.../test_modules/broken_lint/case_fields.py | 22 ++++
.../test_modules/broken_lint/case_import.py | 48 +++++++
.../broken_lint/eval_referenced.py | 19 +++
.../test_modules/second_module/__init__.py | 1 +
.../second_module/__manifest__.py | 10 ++
.../tests/test_modules/test_module/README.rst | 9 ++
.../test_modules/test_module/__init__.py | 1 +
.../test_modules/test_module/__manifest__.py | 13 ++
.../test_modules/test_module/doc/index.rst | 9 ++
.../test_modules/test_module/dummy_model.py | 15 +++
.../test_module/security/ir.model.access.csv | 2 +
.../test_module/static/description/icon.png | Bin 0 -> 9455 bytes
apps_download/views/product_template_view.xml | 24 ++++
29 files changed, 873 insertions(+)
create mode 100644 apps_download/README.rst
create mode 100644 apps_download/__init__.py
create mode 100644 apps_download/__manifest__.py
create mode 100644 apps_download/data/cron_scheduler.xml
create mode 100644 apps_download/demo/product_template_demo.xml
create mode 100644 apps_download/i18n/apps_download.pot
create mode 100644 apps_download/i18n/es.po
create mode 100644 apps_download/i18n/fr.po
create mode 100644 apps_download/models/__init__.py
create mode 100644 apps_download/models/product_product.py
create mode 100644 apps_download/static/description/icon.png
create mode 100644 apps_download/tests/__init__.py
create mode 100644 apps_download/tests/test_app_download.py
create mode 100644 apps_download/tests/test_modules/broken_lint/__init__.py
create mode 100644 apps_download/tests/test_modules/broken_lint/__manifest__.py
create mode 100644 apps_download/tests/test_modules/broken_lint/case_deprecated.py
create mode 100644 apps_download/tests/test_modules/broken_lint/case_fields.py
create mode 100644 apps_download/tests/test_modules/broken_lint/case_import.py
create mode 100644 apps_download/tests/test_modules/broken_lint/eval_referenced.py
create mode 100644 apps_download/tests/test_modules/second_module/__init__.py
create mode 100644 apps_download/tests/test_modules/second_module/__manifest__.py
create mode 100644 apps_download/tests/test_modules/test_module/README.rst
create mode 100644 apps_download/tests/test_modules/test_module/__init__.py
create mode 100644 apps_download/tests/test_modules/test_module/__manifest__.py
create mode 100644 apps_download/tests/test_modules/test_module/doc/index.rst
create mode 100644 apps_download/tests/test_modules/test_module/dummy_model.py
create mode 100644 apps_download/tests/test_modules/test_module/security/ir.model.access.csv
create mode 100644 apps_download/tests/test_modules/test_module/static/description/icon.png
create mode 100644 apps_download/views/product_template_view.xml
diff --git a/apps_download/README.rst b/apps_download/README.rst
new file mode 100644
index 00000000..ef452bea
--- /dev/null
+++ b/apps_download/README.rst
@@ -0,0 +1,57 @@
+.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
+ :target: https://www.gnu.org/licenses/agpl
+ :alt: License: AGPL-3
+
+=============================
+Product Download for Appstore
+=============================
+
+Providing facility for the maintain dependency of Module at level of product
+and creating Zip file with all dependent modules.
+
+.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
+ :alt: Try me on Runbot
+ :target: https://runbot.odoo-community.org/runbot/249/10.0
+
+Known issues / Roadmap
+======================
+
+* Creation of an error queue if the exception occurs while generating zip file of the product
+
+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 smash it by providing detailed and welcomed feedback.
+
+Credits
+=======
+
+Images
+------
+
+* Odoo Community Association: `Icon `_.
+
+Contributors
+------------
+
+* Ruchir Shukla
+* Georg Nottere
+* Eric Caudal
+
+Maintainer
+----------
+
+.. image:: https://odoo-community.org/logo.png
+ :alt: Odoo Community Association
+ :target: https://odoo-community.org
+
+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 https://odoo-community.org.
diff --git a/apps_download/__init__.py b/apps_download/__init__.py
new file mode 100644
index 00000000..0ee8b507
--- /dev/null
+++ b/apps_download/__init__.py
@@ -0,0 +1,2 @@
+from . import models
+from . import tests
diff --git a/apps_download/__manifest__.py b/apps_download/__manifest__.py
new file mode 100644
index 00000000..555e7691
--- /dev/null
+++ b/apps_download/__manifest__.py
@@ -0,0 +1,29 @@
+# Copyright 2017-2018 BizzAppDev
+# Copyright 2017 AgentERP
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
+{
+ "name": "Product Download for Appstore",
+ "version": "11.0.1.0.0",
+ "author": "BizzAppDev, AgentERP, Elico Corp, "
+ "Odoo Community Association (OCA)",
+ "website": "https://github.com/OCA/apps-store",
+ "license": "AGPL-3",
+ "category": "Sales",
+ "depends": [
+ 'base',
+ 'website_sale_digital',
+ 'github_connector_odoo',
+ 'apps_product_creator',
+ ],
+ "summary": "Product Download for Appstore",
+ "data": [
+ 'views/product_template_view.xml',
+ 'data/cron_scheduler.xml'
+ ],
+ 'demo': [
+ 'demo/product_template_demo.xml',
+ ],
+ 'installable': True,
+ 'auto_install': False,
+ 'application': False
+}
diff --git a/apps_download/data/cron_scheduler.xml b/apps_download/data/cron_scheduler.xml
new file mode 100644
index 00000000..26070280
--- /dev/null
+++ b/apps_download/data/cron_scheduler.xml
@@ -0,0 +1,21 @@
+
+
+
+
+ Generate ZIP files for all products
+
+ 1
+
+ days
+ -1
+
+
+ code
+ model.generate_zip_file_batch()
+
+
+
diff --git a/apps_download/demo/product_template_demo.xml b/apps_download/demo/product_template_demo.xml
new file mode 100644
index 00000000..e22f99a3
--- /dev/null
+++ b/apps_download/demo/product_template_demo.xml
@@ -0,0 +1,86 @@
+
+
+
+
+
+ Category1
+
+
+
+ Organization1
+ login
+
+
+
+ Repository1
+
+
+
+
+ Master
+
+
+
+
+ odoo_module1
+
+
+
+ odoo_module2
+
+
+
+ Odoo Module 1
+ odoo_module1
+
+
+ AGPL-3
+ Summary Test
+ Website Test
+ Description Test
+ 10.0
+ OCA
+ base
+ {}
+
+
+
+ Odoo Module 2
+ odoo_module2
+
+
+ AGPL-3
+ Summary Test
+ Website Test
+ Description Test
+ 11.0
+ OCA
+ base
+ {}
+
+
+
+ Odoo Module 1
+ service
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps_download/i18n/apps_download.pot b/apps_download/i18n/apps_download.pot
new file mode 100644
index 00000000..ba6b50da
--- /dev/null
+++ b/apps_download/i18n/apps_download.pot
@@ -0,0 +1,91 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * apps_download
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 11.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: apps_download
+#: model:product.public.category,name:apps_download.website_category1
+msgid "Category1"
+msgstr ""
+
+#. module: apps_download
+#: model:ir.model.fields,field_description:apps_download.field_product_product_dependent_product_ids
+msgid "Dependent Products"
+msgstr ""
+
+#. module: apps_download
+#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:9
+#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:16
+#, python-format
+msgid "Description"
+msgstr ""
+
+#. module: apps_download
+#: code:addons/apps_download/models/product_product.py:31
+#, python-format
+msgid "Error: You cannot create recursive dependency."
+msgstr ""
+
+#. module: apps_download
+#: model:ir.actions.server,name:apps_download.ir_cron_scheduler_generate_zip_ir_actions_server
+#: model:ir.cron,cron_name:apps_download.ir_cron_scheduler_generate_zip
+#: model:ir.cron,name:apps_download.ir_cron_scheduler_generate_zip
+msgid "Generate ZIP files for all products"
+msgstr ""
+
+#. module: apps_download
+#: model:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
+msgid "Get all Dependencies"
+msgstr ""
+
+#. module: apps_download
+#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:22
+#, python-format
+msgid "Hello world"
+msgstr ""
+
+#. module: apps_download
+#: model:ir.model.fields,field_description:apps_download.field_product_product_module_path
+msgid "Local Path"
+msgstr ""
+
+#. module: apps_download
+#: model:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
+msgid "Module Dependencies"
+msgstr ""
+
+#. module: apps_download
+#: model:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
+msgid "Modules Dependencies"
+msgstr ""
+
+#. module: apps_download
+#: model:product.product,name:apps_download.product_product100_b
+#: model:product.product,name:apps_download.product_product_100
+#: model:product.template,name:apps_download.product_product100_b_product_template
+#: model:product.template,name:apps_download.product_product_100_product_template
+msgid "Odoo Module 1"
+msgstr ""
+
+#. module: apps_download
+#: model:ir.model,name:apps_download.model_product_product
+msgid "Product"
+msgstr ""
+
+#. module: apps_download
+#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:8
+#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:15
+#, python-format
+msgid "Title"
+msgstr ""
+
diff --git a/apps_download/i18n/es.po b/apps_download/i18n/es.po
new file mode 100644
index 00000000..2a7bf9d1
--- /dev/null
+++ b/apps_download/i18n/es.po
@@ -0,0 +1,101 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * apps_download
+#
+# Translators:
+# enjolras , 2018
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 10.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2018-02-10 01:37+0000\n"
+"PO-Revision-Date: 2018-02-10 01:37+0000\n"
+"Last-Translator: enjolras , 2018\n"
+"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
+"Language: es\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: apps_download
+#: model:product.public.category,name:apps_download.website_category1
+msgid "Category1"
+msgstr ""
+
+#. module: apps_download
+#: model:ir.model.fields,field_description:apps_download.field_product_product_dependent_product_ids
+msgid "Dependent Products"
+msgstr "Productos dependientes"
+
+#. module: apps_download
+#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:9
+#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:16
+#, python-format
+msgid "Description"
+msgstr "Descripción"
+
+#. module: apps_download
+#: code:addons/apps_download/models/product_product.py:31
+#, python-format
+msgid "Error: You cannot create recursive dependency."
+msgstr "Error: No se puede crear una dependencia recursiva."
+
+#. module: apps_download
+#: model:ir.actions.server,name:apps_download.ir_cron_scheduler_generate_zip_ir_actions_server
+#: model:ir.cron,cron_name:apps_download.ir_cron_scheduler_generate_zip
+#: model:ir.cron,name:apps_download.ir_cron_scheduler_generate_zip
+msgid "Generate ZIP files for all products"
+msgstr ""
+
+#. module: apps_download
+#: model:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
+#, fuzzy
+msgid "Get all Dependencies"
+msgstr "Obtener todas las dependencias"
+
+#. module: apps_download
+#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:22
+#, python-format
+msgid "Hello world"
+msgstr "Hola mundo"
+
+#. module: apps_download
+#: model:ir.model.fields,field_description:apps_download.field_product_product_module_path
+msgid "Local Path"
+msgstr ""
+
+#. module: apps_download
+#: model:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
+#, fuzzy
+msgid "Module Dependencies"
+msgstr "Dependencia del módulo"
+
+#. module: apps_download
+#: model:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
+#, fuzzy
+msgid "Modules Dependencies"
+msgstr "Dependencia de módulos"
+
+#. module: apps_download
+#: model:product.product,name:apps_download.product_product100_b
+#: model:product.product,name:apps_download.product_product_100
+#: model:product.template,name:apps_download.product_product100_b_product_template
+#: model:product.template,name:apps_download.product_product_100_product_template
+msgid "Odoo Module 1"
+msgstr ""
+
+#. module: apps_download
+#: model:ir.model,name:apps_download.model_product_product
+msgid "Product"
+msgstr "Producto"
+
+#. module: apps_download
+#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:8
+#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:15
+#, python-format
+msgid "Title"
+msgstr "Título"
+
+#~ msgid "Module path"
+#~ msgstr "Ruta del módulo"
diff --git a/apps_download/i18n/fr.po b/apps_download/i18n/fr.po
new file mode 100644
index 00000000..2afbea4a
--- /dev/null
+++ b/apps_download/i18n/fr.po
@@ -0,0 +1,101 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * apps_download
+#
+# Translators:
+# Quentin THEURET , 2018
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 10.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2018-02-08 01:39+0000\n"
+"PO-Revision-Date: 2018-02-08 01:39+0000\n"
+"Last-Translator: Quentin THEURET , 2018\n"
+"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n"
+"Language: fr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#. module: apps_download
+#: model:product.public.category,name:apps_download.website_category1
+msgid "Category1"
+msgstr ""
+
+#. module: apps_download
+#: model:ir.model.fields,field_description:apps_download.field_product_product_dependent_product_ids
+msgid "Dependent Products"
+msgstr "Produits dépendants"
+
+#. module: apps_download
+#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:9
+#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:16
+#, python-format
+msgid "Description"
+msgstr "Description"
+
+#. module: apps_download
+#: code:addons/apps_download/models/product_product.py:31
+#, python-format
+msgid "Error: You cannot create recursive dependency."
+msgstr "Erreur : Vous ne pouvez pas créer de dépendance récursive."
+
+#. module: apps_download
+#: model:ir.actions.server,name:apps_download.ir_cron_scheduler_generate_zip_ir_actions_server
+#: model:ir.cron,cron_name:apps_download.ir_cron_scheduler_generate_zip
+#: model:ir.cron,name:apps_download.ir_cron_scheduler_generate_zip
+msgid "Generate ZIP files for all products"
+msgstr ""
+
+#. module: apps_download
+#: model:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
+#, fuzzy
+msgid "Get all Dependencies"
+msgstr "Récupérer tous les dépendances"
+
+#. module: apps_download
+#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:22
+#, python-format
+msgid "Hello world"
+msgstr "Hello world"
+
+#. module: apps_download
+#: model:ir.model.fields,field_description:apps_download.field_product_product_module_path
+msgid "Local Path"
+msgstr ""
+
+#. module: apps_download
+#: model:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
+#, fuzzy
+msgid "Module Dependencies"
+msgstr "Dépendances du module"
+
+#. module: apps_download
+#: model:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
+#, fuzzy
+msgid "Modules Dependencies"
+msgstr "Dépendances des modules"
+
+#. module: apps_download
+#: model:product.product,name:apps_download.product_product100_b
+#: model:product.product,name:apps_download.product_product_100
+#: model:product.template,name:apps_download.product_product100_b_product_template
+#: model:product.template,name:apps_download.product_product_100_product_template
+msgid "Odoo Module 1"
+msgstr ""
+
+#. module: apps_download
+#: model:ir.model,name:apps_download.model_product_product
+msgid "Product"
+msgstr "Produit"
+
+#. module: apps_download
+#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:8
+#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:15
+#, python-format
+msgid "Title"
+msgstr "Titre"
+
+#~ msgid "Module path"
+#~ msgstr "Chemin du module"
diff --git a/apps_download/models/__init__.py b/apps_download/models/__init__.py
new file mode 100644
index 00000000..5c74c8c3
--- /dev/null
+++ b/apps_download/models/__init__.py
@@ -0,0 +1 @@
+from . import product_product
diff --git a/apps_download/models/product_product.py b/apps_download/models/product_product.py
new file mode 100644
index 00000000..a61b15f8
--- /dev/null
+++ b/apps_download/models/product_product.py
@@ -0,0 +1,122 @@
+# Copyright (C) 2017-Today: Odoo Community Association (OCA)
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+
+import os
+import tempfile
+import shutil
+import logging
+import base64
+import time
+from odoo.exceptions import ValidationError
+from odoo import models, fields, api, _
+_logger = logging.getLogger(__name__)
+
+
+class ProductProduct(models.Model):
+ _inherit = 'product.product'
+
+ dependent_product_ids = fields.Many2many(
+ 'product.product', 'product_product_dependent_rel',
+ 'src_id', 'dest_id', string='Dependent Products'
+ )
+ module_path = fields.Char(
+ related="odoo_module_version_id.repository_branch_id.local_path",
+ readonly=True)
+
+ @api.constrains('dependent_product_ids')
+ def check_dependent_recursion(self):
+ if not self._check_m2m_recursion('dependent_product_ids'):
+ raise ValidationError(
+ _('Error: You cannot create recursive dependency.')
+ )
+
+ @api.model
+ def child_dependency(self, children):
+ res = self.env['product.product']
+ for child in children:
+ if not child.dependent_product_ids:
+ continue
+ res |= child.dependent_product_ids
+ res |= self.child_dependency(child.dependent_product_ids)
+ return res
+
+ @api.multi
+ def create_dependency_list(self):
+ ret_val = {}
+ for product in self:
+ ret_val[product.id] = product.dependent_product_ids
+ if product.dependent_product_ids:
+ ret_val[product.id] |= self.child_dependency(
+ product.dependent_product_ids)
+ return ret_val
+
+ @api.multi
+ def _get_module_path(self):
+ return (self.module_path + '/' +
+ self.odoo_module_version_id.technical_name)
+
+ @api.multi
+ def generate_zip_file(self):
+ for product in self.filtered('module_path'):
+ tmp_dir = tempfile.mkdtemp()
+ tmp_dir_2 = tempfile.mkdtemp()
+ dependent_products = product.create_dependency_list()
+ dependent_products = dependent_products[product.id]
+
+ for dependent_pro in dependent_products.filtered('module_path'):
+ tmp_module_path = os.path.join(
+ tmp_dir,
+ dependent_pro.odoo_module_version_id.technical_name)
+ shutil.copytree(
+ dependent_pro.module_path + '/' +
+ dependent_pro.odoo_module_version_id.technical_name,
+ tmp_module_path)
+
+ tmp_module_path = os.path.join(
+ tmp_dir, product.odoo_module_version_id.technical_name)
+ module_path = product._get_module_path()
+ shutil.copytree(module_path, tmp_module_path)
+ time_version_value = time.strftime(
+ '_%y%m%d_%H%M%S')
+ if product.attribute_value_ids:
+ time_version_value = '_%s%s' % (
+ '_'.join([name.replace('.', '_') for name in
+ product.attribute_value_ids.mapped('name')]),
+ time_version_value)
+
+ tmp_zip_file = (os.path.join(tmp_dir_2, product.name) +
+ time_version_value)
+ shutil.make_archive(tmp_zip_file, 'zip', tmp_dir)
+ tmp_zip_file = '%s.zip' % tmp_zip_file
+ with open(tmp_zip_file, "rb") as file_obj:
+ try:
+ data_encode = base64.encodestring(file_obj.read())
+ self.env['ir.attachment'].create({
+ 'datas': data_encode,
+ 'datas_fname': (product.name + time_version_value +
+ '.zip'),
+ 'type': 'binary',
+ 'name': product.name + time_version_value + '.zip',
+ 'res_model': product._name,
+ 'res_id': product.id,
+ 'product_downloadable': True,
+ })
+ except Exception as exc:
+ _logger.error('Error creating attachment %s Error is: %s' %
+ (tmp_zip_file, exc.message))
+ try:
+ shutil.rmtree(tmp_dir)
+ except OSError as exc:
+ _logger.warning('Could not remove Tempdir %s, Errormsg %s' % (
+ tmp_dir, exc.message))
+ try:
+ shutil.rmtree(tmp_dir_2)
+ except OSError as exc:
+ _logger.warning(
+ 'Could not remove Tempdir 2 %s, Errormsg %s' % (
+ tmp_dir, exc.message))
+
+ @api.model
+ def generate_zip_file_batch(self):
+ self.search([]).generate_zip_file()
diff --git a/apps_download/static/description/icon.png b/apps_download/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<~R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_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/apps_download/tests/__init__.py b/apps_download/tests/__init__.py
new file mode 100644
index 00000000..d8d05d7a
--- /dev/null
+++ b/apps_download/tests/__init__.py
@@ -0,0 +1 @@
+from . import test_app_download
diff --git a/apps_download/tests/test_app_download.py b/apps_download/tests/test_app_download.py
new file mode 100644
index 00000000..ee537a71
--- /dev/null
+++ b/apps_download/tests/test_app_download.py
@@ -0,0 +1,58 @@
+# Copyright (C) 2017-Today: Odoo Community Association (OCA)
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+# Part of Odoo. See LICENSE file for full copyright and licensing details.
+
+from odoo.tests.common import TransactionCase
+from odoo.exceptions import ValidationError
+import os
+
+
+class TestAppDownload(TransactionCase):
+ """Test for the Add download"""
+
+ def setUp(self):
+ super(TestAppDownload, self).setUp()
+ test_path = os.path.dirname(os.path.realpath(__file__))
+ module_path = os.path.join(
+ test_path, 'test_modules', 'broken_lint')
+ self.sub_child_product = self.env['product.product'].create(
+ {
+ 'name': 'business_requirement',
+ 'module_path': module_path
+ }
+ )
+ module_path = os.path.join(
+ test_path, 'test_modules', 'second_module')
+ self.child_product = self.env['product.product'].create(
+ {
+ 'name': 'business_requirement_deliverable',
+ 'dependent_product_ids': [(6, 0, self.sub_child_product.ids)],
+ 'module_path': module_path
+ }
+ )
+ module_path = os.path.join(
+ test_path, 'test_modules', 'test_module')
+ self.main_app_product = self.env['product.product'].create(
+ {
+ 'name': 'business_requirement_deliverable_project',
+ 'module_path': module_path
+ }
+ )
+
+ def test_dependency(self):
+ self.main_app_product.write(
+ {
+ 'dependent_product_ids': [(6, 0, self.child_product.ids)]
+ }
+ )
+ self.assertEqual(
+ len(self.main_app_product.dependent_product_ids.ids), 1,
+ 'Dependency: App Dependency does not set properlly')
+ self.main_app_product.generate_zip_file()
+ with self.assertRaises(ValidationError):
+ self.main_app_product.write(
+ {
+ 'dependent_product_ids': [
+ (6, 0, self.main_app_product.ids)]
+ }
+ )
diff --git a/apps_download/tests/test_modules/broken_lint/__init__.py b/apps_download/tests/test_modules/broken_lint/__init__.py
new file mode 100644
index 00000000..07093ef7
--- /dev/null
+++ b/apps_download/tests/test_modules/broken_lint/__init__.py
@@ -0,0 +1,3 @@
+from . import case_import
+from . import case_fields
+from . import eval_referenced
diff --git a/apps_download/tests/test_modules/broken_lint/__manifest__.py b/apps_download/tests/test_modules/broken_lint/__manifest__.py
new file mode 100644
index 00000000..9a2b8d7e
--- /dev/null
+++ b/apps_download/tests/test_modules/broken_lint/__manifest__.py
@@ -0,0 +1,10 @@
+{
+ 'name': 'Broken module for lint tests',
+ 'license': 'AGPL-3',
+ 'author': 'Odoo Community Association (OCA)',
+ 'version': '1.0',
+ 'depends': [],
+ 'data': [],
+ 'test': [],
+ 'installable': True,
+}
diff --git a/apps_download/tests/test_modules/broken_lint/case_deprecated.py b/apps_download/tests/test_modules/broken_lint/case_deprecated.py
new file mode 100644
index 00000000..349a129c
--- /dev/null
+++ b/apps_download/tests/test_modules/broken_lint/case_deprecated.py
@@ -0,0 +1,17 @@
+
+# w0402 - deprecated module
+import ipdb # pylint: disable=W0403
+import pdb # pylint: disable=W0403
+import pudb # pylint: disable=W0403
+
+from openerp.osv import osv # pylint: disable=W0403
+
+
+def avoid_imported_but_unused(self):
+ # avoid imported but unused
+ all_imports = (
+ pdb, pudb, ipdb,
+ osv,
+ )
+ eval("Not use eval")
+ return all_imports
diff --git a/apps_download/tests/test_modules/broken_lint/case_fields.py b/apps_download/tests/test_modules/broken_lint/case_fields.py
new file mode 100644
index 00000000..e9109708
--- /dev/null
+++ b/apps_download/tests/test_modules/broken_lint/case_fields.py
@@ -0,0 +1,22 @@
+
+from openerp import fields, models
+from openerp.tools.translate import _
+
+
+class MyExampleField(models.Model):
+ _name = "my.example.field"
+ name = fields.Char(_('Title'), size=100)
+ description = fields.Char(string=_('Description'), size=100)
+
+
+class MyExampleField2(models.Model):
+ _name = "my.example.field2"
+
+ name = fields.Char(_('Title'), size=100)
+ description = fields.Char(name=_('Description'), size=100)
+
+ def my_method1(self, var):
+ pass
+
+ def my_method2(self):
+ return self.my_method1(_('Hello world'))
diff --git a/apps_download/tests/test_modules/broken_lint/case_import.py b/apps_download/tests/test_modules/broken_lint/case_import.py
new file mode 100644
index 00000000..ef71b045
--- /dev/null
+++ b/apps_download/tests/test_modules/broken_lint/case_import.py
@@ -0,0 +1,48 @@
+
+import openerp
+
+from openerp import api
+from openerp.api import one
+
+from openerp.exceptions import Warning as UserError
+from openerp.exceptions import Warning as OtherName
+from openerp.exceptions import Warning
+from openerp.exceptions import AccessError as AE, \
+ ValidationError, Warning as UserError2
+
+
+class UseUnusedImport(object):
+ def method1(self):
+ return UserError, OtherName, Warning, AE, ValidationError, UserError2
+
+
+class ApiOne(object):
+ @api.one
+ def copy():
+ pass
+
+
+class One(object):
+ @one
+ def copy():
+ pass
+
+
+class OpenerpApiOne(object):
+ @openerp.api.one
+ def copy():
+ pass
+
+
+class WOApiOne(object):
+ # copy without api.one decorator
+ def copy():
+ pass
+
+
+class ApiOneMultiTogether(object):
+
+ @api.multi
+ @api.one
+ def copy():
+ pass
diff --git a/apps_download/tests/test_modules/broken_lint/eval_referenced.py b/apps_download/tests/test_modules/broken_lint/eval_referenced.py
new file mode 100644
index 00000000..00bc5433
--- /dev/null
+++ b/apps_download/tests/test_modules/broken_lint/eval_referenced.py
@@ -0,0 +1,19 @@
+
+
+def eval_from_param(param):
+ """eval used from param"""
+ param("c = 2")
+
+
+def eval_from_other():
+ """eval used from many ways"""
+ my_dict = {
+ 'my_eval': eval, # [eval-used]
+ }
+ my_list = [eval] # [eval-used]
+
+ my_var = eval # [eval-used]
+ # inferred case
+ my_var('d = 3') # [eval-used]
+ eval_from_param(eval) # [eval-used]
+ return my_dict, my_list
diff --git a/apps_download/tests/test_modules/second_module/__init__.py b/apps_download/tests/test_modules/second_module/__init__.py
new file mode 100644
index 00000000..6305ed30
--- /dev/null
+++ b/apps_download/tests/test_modules/second_module/__init__.py
@@ -0,0 +1 @@
+# none
diff --git a/apps_download/tests/test_modules/second_module/__manifest__.py b/apps_download/tests/test_modules/second_module/__manifest__.py
new file mode 100644
index 00000000..79dc3b91
--- /dev/null
+++ b/apps_download/tests/test_modules/second_module/__manifest__.py
@@ -0,0 +1,10 @@
+{
+ 'name': 'Second empty module for tests',
+ 'version': '8.0.1.0.0',
+ 'author': 'Odoo Community Association (OCA)',
+ 'license': 'AGPL-3',
+ 'depends': [
+ 'base',
+ 'test_module',
+ ],
+}
diff --git a/apps_download/tests/test_modules/test_module/README.rst b/apps_download/tests/test_modules/test_module/README.rst
new file mode 100644
index 00000000..d00cd1be
--- /dev/null
+++ b/apps_download/tests/test_modules/test_module/README.rst
@@ -0,0 +1,9 @@
+.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
+ :alt: License: AGPL-3
+
+Test module
+===========
+
+This module was written to check the test of rst syntax.
+This is a rst file without syntax error.
+
diff --git a/apps_download/tests/test_modules/test_module/__init__.py b/apps_download/tests/test_modules/test_module/__init__.py
new file mode 100644
index 00000000..c8c7b553
--- /dev/null
+++ b/apps_download/tests/test_modules/test_module/__init__.py
@@ -0,0 +1 @@
+from . import dummy_model
diff --git a/apps_download/tests/test_modules/test_module/__manifest__.py b/apps_download/tests/test_modules/test_module/__manifest__.py
new file mode 100644
index 00000000..8abe881d
--- /dev/null
+++ b/apps_download/tests/test_modules/test_module/__manifest__.py
@@ -0,0 +1,13 @@
+{
+ 'name': 'Empty module for tests',
+ 'license': 'AGPL-3',
+ 'author': 'Odoo Community Association (OCA)',
+ 'version': '1.0',
+ 'depends': [
+ 'base',
+ 'dependency_module', # test dependency repo installation
+ ],
+ 'data': [
+ 'security/ir.model.access.csv',
+ ],
+}
diff --git a/apps_download/tests/test_modules/test_module/doc/index.rst b/apps_download/tests/test_modules/test_module/doc/index.rst
new file mode 100644
index 00000000..d00cd1be
--- /dev/null
+++ b/apps_download/tests/test_modules/test_module/doc/index.rst
@@ -0,0 +1,9 @@
+.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
+ :alt: License: AGPL-3
+
+Test module
+===========
+
+This module was written to check the test of rst syntax.
+This is a rst file without syntax error.
+
diff --git a/apps_download/tests/test_modules/test_module/dummy_model.py b/apps_download/tests/test_modules/test_module/dummy_model.py
new file mode 100644
index 00000000..1285ad42
--- /dev/null
+++ b/apps_download/tests/test_modules/test_module/dummy_model.py
@@ -0,0 +1,15 @@
+
+from openerp.osv import orm
+from openerp import fields
+import sys
+
+
+class DummyModel(orm.Model):
+ _name = 'dummy.model'
+ name = fields.Char('Dummy', size=100)
+
+
+# printout non-ASCII text to check unicode issues
+# (from Monty Python's "Italian Lesson"...)
+sys.stdout.write("Eeeeeee! Milano è tanto meglio di Napoli. "
+ "Milano è la citta la più bella di tutti ... nel mondo...\n")
diff --git a/apps_download/tests/test_modules/test_module/security/ir.model.access.csv b/apps_download/tests/test_modules/test_module/security/ir.model.access.csv
new file mode 100644
index 00000000..63685ca6
--- /dev/null
+++ b/apps_download/tests/test_modules/test_module/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_dummy_model","access_dummy_model","model_dummy_model","base.group_user",1,1,1,1
diff --git a/apps_download/tests/test_modules/test_module/static/description/icon.png b/apps_download/tests/test_modules/test_module/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)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39rt5J5YB2Ky?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/apps_download/views/product_template_view.xml b/apps_download/views/product_template_view.xml
new file mode 100644
index 00000000..e8a6b290
--- /dev/null
+++ b/apps_download/views/product_template_view.xml
@@ -0,0 +1,24 @@
+
+
+
+
+ product.product.form
+ product.product
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
From 1921a212d15922c0c556cbd5c3355f85d5195925 Mon Sep 17 00:00:00 2001
From: BizzAppDev
Date: Tue, 2 Oct 2018 11:39:43 +0530
Subject: [PATCH 02/23] [FIX] apps_download: several fixes
* Download file name Fix (#18)
* update products attributes and create attribute values (#40)
* [FIX]update the product for the new version
* [FIX]max version problem and also rewrite logic so the from fronend if the version is not selected manually then the default(with less sequence) will be downloaded
* [IMP]added technical name search functionality
* [IMP]Merged create and update product cron job
* [FIX]fix variable names
* 11.0 issue #50 add the module technical name in front page (#52)
* [FIX][49] solve pager with search parameter
* [IMP]website_apps_store : add technical name in front page
* [IMP]website_apps_store : add website tour to search technical name
* [FIX]website_apps_store : add demo/product_template_demo.xml in menifest.py
---
apps_download/__manifest__.py | 4 ++--
apps_download/models/product_product.py | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/apps_download/__manifest__.py b/apps_download/__manifest__.py
index 555e7691..f470fd24 100644
--- a/apps_download/__manifest__.py
+++ b/apps_download/__manifest__.py
@@ -3,7 +3,7 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Product Download for Appstore",
- "version": "11.0.1.0.0",
+ "version": "11.0.2.0.1",
"author": "BizzAppDev, AgentERP, Elico Corp, "
"Odoo Community Association (OCA)",
"website": "https://github.com/OCA/apps-store",
@@ -18,7 +18,7 @@
"summary": "Product Download for Appstore",
"data": [
'views/product_template_view.xml',
- 'data/cron_scheduler.xml'
+ 'data/cron_scheduler.xml',
],
'demo': [
'demo/product_template_demo.xml',
diff --git a/apps_download/models/product_product.py b/apps_download/models/product_product.py
index a61b15f8..e0e02dce 100644
--- a/apps_download/models/product_product.py
+++ b/apps_download/models/product_product.py
@@ -94,8 +94,8 @@ def generate_zip_file(self):
data_encode = base64.encodestring(file_obj.read())
self.env['ir.attachment'].create({
'datas': data_encode,
- 'datas_fname': (product.name + time_version_value +
- '.zip'),
+ 'datas_fname': (product.name.replace(" ", '-') +
+ time_version_value + '.zip'),
'type': 'binary',
'name': product.name + time_version_value + '.zip',
'res_model': product._name,
From ab3515026fd0cfa86cd444acb1da7fda6e95599b Mon Sep 17 00:00:00 2001
From: Victor Martin
Date: Mon, 22 Apr 2019 11:31:59 +0200
Subject: [PATCH 03/23] [MIG] apps_download: Migration to 12.0
---
apps_download/README.rst | 69 ++-
apps_download/__init__.py | 1 -
apps_download/__manifest__.py | 7 +-
apps_download/demo/product_template_demo.xml | 32 +-
apps_download/i18n/apps_download.pot | 25 +-
apps_download/i18n/es.po | 25 +-
apps_download/i18n/fr.po | 25 +-
apps_download/readme/CONTRIBUTORS.rst | 6 +
apps_download/readme/DESCRIPTION.rst | 2 +
apps_download/readme/ROADMAP.rst | 1 +
apps_download/static/description/index.html | 435 ++++++++++++++++++
apps_download/views/product_template_view.xml | 1 +
12 files changed, 564 insertions(+), 65 deletions(-)
create mode 100644 apps_download/readme/CONTRIBUTORS.rst
create mode 100644 apps_download/readme/DESCRIPTION.rst
create mode 100644 apps_download/readme/ROADMAP.rst
create mode 100644 apps_download/static/description/index.html
diff --git a/apps_download/README.rst b/apps_download/README.rst
index ef452bea..aab52fd7 100644
--- a/apps_download/README.rst
+++ b/apps_download/README.rst
@@ -1,17 +1,37 @@
-.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
- :target: https://www.gnu.org/licenses/agpl
- :alt: License: AGPL-3
-
=============================
Product Download for Appstore
=============================
+.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ !! 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%2Fapps--store-lightgray.png?logo=github
+ :target: https://github.com/OCA/apps-store/tree/12.0/apps_download
+ :alt: OCA/apps-store
+.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
+ :target: https://translation.odoo-community.org/projects/apps-store-12-0/apps-store-12-0-apps_download
+ :alt: Translate me on Weblate
+.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
+ :target: https://runbot.odoo-community.org/runbot/249/12.0
+ :alt: Try me on Runbot
+
+|badge1| |badge2| |badge3| |badge4| |badge5|
+
Providing facility for the maintain dependency of Module at level of product
and creating Zip file with all dependent modules.
-.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
- :alt: Try me on Runbot
- :target: https://runbot.odoo-community.org/runbot/249/10.0
+**Table of contents**
+
+.. contents::
+ :local:
Known issues / Roadmap
======================
@@ -21,37 +41,46 @@ Known issues / Roadmap
Bug Tracker
===========
-Bugs are tracked on `GitHub Issues
-`_. In case of trouble, please
-check there if your issue has already been reported. If you spotted it first,
-help us smash it by providing detailed and welcomed feedback.
+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
=======
-Images
-------
+Authors
+~~~~~~~
-* Odoo Community Association: `Icon `_.
+* BizzAppDev
+* AgentERP
+* Elico Corp
Contributors
-------------
+~~~~~~~~~~~~
* Ruchir Shukla
* Georg Nottere
* Eric Caudal
+* `Tecnativa `_:
+
+ * Víctor M.M. Torres
-Maintainer
-----------
+Maintainers
+~~~~~~~~~~~
+
+This module is maintained by the OCA.
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
-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 https://odoo-community.org.
+This module is part of the `OCA/apps-store `_ project on GitHub.
+
+You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/apps_download/__init__.py b/apps_download/__init__.py
index 0ee8b507..0650744f 100644
--- a/apps_download/__init__.py
+++ b/apps_download/__init__.py
@@ -1,2 +1 @@
from . import models
-from . import tests
diff --git a/apps_download/__manifest__.py b/apps_download/__manifest__.py
index f470fd24..105bee3d 100644
--- a/apps_download/__manifest__.py
+++ b/apps_download/__manifest__.py
@@ -1,9 +1,10 @@
-# Copyright 2017-2018 BizzAppDev
-# Copyright 2017 AgentERP
+# Copyright 2017-2019 BizzAppDev
+# Copyright 2017-2019 AgentERP
+# Copyright 2017-2019 Elico Corp
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Product Download for Appstore",
- "version": "11.0.2.0.1",
+ "version": "12.0.1.0.0",
"author": "BizzAppDev, AgentERP, Elico Corp, "
"Odoo Community Association (OCA)",
"website": "https://github.com/OCA/apps-store",
diff --git a/apps_download/demo/product_template_demo.xml b/apps_download/demo/product_template_demo.xml
index e22f99a3..6414fa0c 100644
--- a/apps_download/demo/product_template_demo.xml
+++ b/apps_download/demo/product_template_demo.xml
@@ -1,6 +1,10 @@
-
-
+
Category1
@@ -64,23 +68,31 @@
service
-
+
-
+
-
+
-
-
-
-
+
+
+
+
+
-
+
diff --git a/apps_download/i18n/apps_download.pot b/apps_download/i18n/apps_download.pot
index ba6b50da..86e05137 100644
--- a/apps_download/i18n/apps_download.pot
+++ b/apps_download/i18n/apps_download.pot
@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 11.0\n"
+"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
@@ -14,12 +14,7 @@ msgstr ""
"Plural-Forms: \n"
#. module: apps_download
-#: model:product.public.category,name:apps_download.website_category1
-msgid "Category1"
-msgstr ""
-
-#. module: apps_download
-#: model:ir.model.fields,field_description:apps_download.field_product_product_dependent_product_ids
+#: model:ir.model.fields,field_description:apps_download.field_product_product__dependent_product_ids
msgid "Dependent Products"
msgstr ""
@@ -44,7 +39,7 @@ msgid "Generate ZIP files for all products"
msgstr ""
#. module: apps_download
-#: model:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
+#: model_terms:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
msgid "Get all Dependencies"
msgstr ""
@@ -55,28 +50,20 @@ msgid "Hello world"
msgstr ""
#. module: apps_download
-#: model:ir.model.fields,field_description:apps_download.field_product_product_module_path
+#: model:ir.model.fields,field_description:apps_download.field_product_product__module_path
msgid "Local Path"
msgstr ""
#. module: apps_download
-#: model:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
+#: model_terms:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
msgid "Module Dependencies"
msgstr ""
#. module: apps_download
-#: model:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
+#: model_terms:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
msgid "Modules Dependencies"
msgstr ""
-#. module: apps_download
-#: model:product.product,name:apps_download.product_product100_b
-#: model:product.product,name:apps_download.product_product_100
-#: model:product.template,name:apps_download.product_product100_b_product_template
-#: model:product.template,name:apps_download.product_product_100_product_template
-msgid "Odoo Module 1"
-msgstr ""
-
#. module: apps_download
#: model:ir.model,name:apps_download.model_product_product
msgid "Product"
diff --git a/apps_download/i18n/es.po b/apps_download/i18n/es.po
index 2a7bf9d1..f4bc4339 100644
--- a/apps_download/i18n/es.po
+++ b/apps_download/i18n/es.po
@@ -24,7 +24,7 @@ msgid "Category1"
msgstr ""
#. module: apps_download
-#: model:ir.model.fields,field_description:apps_download.field_product_product_dependent_product_ids
+#: model:ir.model.fields,field_description:apps_download.field_product_product__dependent_product_ids
msgid "Dependent Products"
msgstr "Productos dependientes"
@@ -49,7 +49,7 @@ msgid "Generate ZIP files for all products"
msgstr ""
#. module: apps_download
-#: model:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
+#: model_terms:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
#, fuzzy
msgid "Get all Dependencies"
msgstr "Obtener todas las dependencias"
@@ -61,18 +61,18 @@ msgid "Hello world"
msgstr "Hola mundo"
#. module: apps_download
-#: model:ir.model.fields,field_description:apps_download.field_product_product_module_path
+#: model:ir.model.fields,field_description:apps_download.field_product_product__module_path
msgid "Local Path"
msgstr ""
#. module: apps_download
-#: model:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
+#: model_terms:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
#, fuzzy
msgid "Module Dependencies"
msgstr "Dependencia del módulo"
#. module: apps_download
-#: model:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
+#: model_terms:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
#, fuzzy
msgid "Modules Dependencies"
msgstr "Dependencia de módulos"
@@ -81,7 +81,6 @@ msgstr "Dependencia de módulos"
#: model:product.product,name:apps_download.product_product100_b
#: model:product.product,name:apps_download.product_product_100
#: model:product.template,name:apps_download.product_product100_b_product_template
-#: model:product.template,name:apps_download.product_product_100_product_template
msgid "Odoo Module 1"
msgstr ""
@@ -97,5 +96,19 @@ msgstr "Producto"
msgid "Title"
msgstr "Título"
+#. module: apps_download
+#: model:product.product,uom_name:apps_download.product_product100_b
+#: model:product.product,uom_name:apps_download.product_product_100
+#: model:product.template,uom_name:apps_download.product_product100_b_product_template
+msgid "Unit(s)"
+msgstr ""
+
+#. module: apps_download
+#: model:product.product,weight_uom_name:apps_download.product_product100_b
+#: model:product.product,weight_uom_name:apps_download.product_product_100
+#: model:product.template,weight_uom_name:apps_download.product_product100_b_product_template
+msgid "kg"
+msgstr ""
+
#~ msgid "Module path"
#~ msgstr "Ruta del módulo"
diff --git a/apps_download/i18n/fr.po b/apps_download/i18n/fr.po
index 2afbea4a..6d2e020f 100644
--- a/apps_download/i18n/fr.po
+++ b/apps_download/i18n/fr.po
@@ -24,7 +24,7 @@ msgid "Category1"
msgstr ""
#. module: apps_download
-#: model:ir.model.fields,field_description:apps_download.field_product_product_dependent_product_ids
+#: model:ir.model.fields,field_description:apps_download.field_product_product__dependent_product_ids
msgid "Dependent Products"
msgstr "Produits dépendants"
@@ -49,7 +49,7 @@ msgid "Generate ZIP files for all products"
msgstr ""
#. module: apps_download
-#: model:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
+#: model_terms:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
#, fuzzy
msgid "Get all Dependencies"
msgstr "Récupérer tous les dépendances"
@@ -61,18 +61,18 @@ msgid "Hello world"
msgstr "Hello world"
#. module: apps_download
-#: model:ir.model.fields,field_description:apps_download.field_product_product_module_path
+#: model:ir.model.fields,field_description:apps_download.field_product_product__module_path
msgid "Local Path"
msgstr ""
#. module: apps_download
-#: model:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
+#: model_terms:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
#, fuzzy
msgid "Module Dependencies"
msgstr "Dépendances du module"
#. module: apps_download
-#: model:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
+#: model_terms:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
#, fuzzy
msgid "Modules Dependencies"
msgstr "Dépendances des modules"
@@ -81,7 +81,6 @@ msgstr "Dépendances des modules"
#: model:product.product,name:apps_download.product_product100_b
#: model:product.product,name:apps_download.product_product_100
#: model:product.template,name:apps_download.product_product100_b_product_template
-#: model:product.template,name:apps_download.product_product_100_product_template
msgid "Odoo Module 1"
msgstr ""
@@ -97,5 +96,19 @@ msgstr "Produit"
msgid "Title"
msgstr "Titre"
+#. module: apps_download
+#: model:product.product,uom_name:apps_download.product_product100_b
+#: model:product.product,uom_name:apps_download.product_product_100
+#: model:product.template,uom_name:apps_download.product_product100_b_product_template
+msgid "Unit(s)"
+msgstr ""
+
+#. module: apps_download
+#: model:product.product,weight_uom_name:apps_download.product_product100_b
+#: model:product.product,weight_uom_name:apps_download.product_product_100
+#: model:product.template,weight_uom_name:apps_download.product_product100_b_product_template
+msgid "kg"
+msgstr ""
+
#~ msgid "Module path"
#~ msgstr "Chemin du module"
diff --git a/apps_download/readme/CONTRIBUTORS.rst b/apps_download/readme/CONTRIBUTORS.rst
new file mode 100644
index 00000000..2af0070d
--- /dev/null
+++ b/apps_download/readme/CONTRIBUTORS.rst
@@ -0,0 +1,6 @@
+* Ruchir Shukla
+* Georg Nottere
+* Eric Caudal
+* `Tecnativa `_:
+
+ * Víctor M.M. Torres
diff --git a/apps_download/readme/DESCRIPTION.rst b/apps_download/readme/DESCRIPTION.rst
new file mode 100644
index 00000000..23ecc70f
--- /dev/null
+++ b/apps_download/readme/DESCRIPTION.rst
@@ -0,0 +1,2 @@
+Providing facility for the maintain dependency of Module at level of product
+and creating Zip file with all dependent modules.
diff --git a/apps_download/readme/ROADMAP.rst b/apps_download/readme/ROADMAP.rst
new file mode 100644
index 00000000..d7d17d9f
--- /dev/null
+++ b/apps_download/readme/ROADMAP.rst
@@ -0,0 +1 @@
+* Creation of an error queue if the exception occurs while generating zip file of the product
diff --git a/apps_download/static/description/index.html b/apps_download/static/description/index.html
new file mode 100644
index 00000000..93b674e0
--- /dev/null
+++ b/apps_download/static/description/index.html
@@ -0,0 +1,435 @@
+
+
+
+
+
+
+Product Download for Appstore
+
+
+
+
+
Product Download for Appstore
+
+
+
+
Providing facility for the maintain dependency of Module at level of product
+and creating Zip file with all dependent modules.
+
Table of contents
+
+
+
+
+Creation of an error queue if the exception occurs while generating zip file of the product
+
+
+
+
+
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.
+
+
+
+
+
+
+BizzAppDev
+AgentERP
+Elico Corp
+
+
+
+
+
+
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/apps-store project on GitHub.
+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute .
+
+
+
+
+
diff --git a/apps_download/views/product_template_view.xml b/apps_download/views/product_template_view.xml
index e8a6b290..2330ff10 100644
--- a/apps_download/views/product_template_view.xml
+++ b/apps_download/views/product_template_view.xml
@@ -2,6 +2,7 @@
From 735730ecaad36d9d30663e05050ba3b30188eefc Mon Sep 17 00:00:00 2001
From: Rodrigo Macedo
Date: Sun, 24 Nov 2019 17:48:51 +0000
Subject: [PATCH 04/23] Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (15 of 15 strings)
Translation: apps-store-12.0/apps-store-12.0-apps_download
Translate-URL: https://translation.odoo-community.org/projects/apps-store-12-0/apps-store-12-0-apps_download/pt_BR/
---
apps_download/i18n/es.po | 26 -----------
apps_download/i18n/fr.po | 26 -----------
apps_download/i18n/pt_BR.po | 92 +++++++++++++++++++++++++++++++++++++
3 files changed, 92 insertions(+), 52 deletions(-)
create mode 100644 apps_download/i18n/pt_BR.po
diff --git a/apps_download/i18n/es.po b/apps_download/i18n/es.po
index f4bc4339..b5ab5ce3 100644
--- a/apps_download/i18n/es.po
+++ b/apps_download/i18n/es.po
@@ -18,11 +18,6 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#. module: apps_download
-#: model:product.public.category,name:apps_download.website_category1
-msgid "Category1"
-msgstr ""
-
#. module: apps_download
#: model:ir.model.fields,field_description:apps_download.field_product_product__dependent_product_ids
msgid "Dependent Products"
@@ -77,13 +72,6 @@ msgstr "Dependencia del módulo"
msgid "Modules Dependencies"
msgstr "Dependencia de módulos"
-#. module: apps_download
-#: model:product.product,name:apps_download.product_product100_b
-#: model:product.product,name:apps_download.product_product_100
-#: model:product.template,name:apps_download.product_product100_b_product_template
-msgid "Odoo Module 1"
-msgstr ""
-
#. module: apps_download
#: model:ir.model,name:apps_download.model_product_product
msgid "Product"
@@ -96,19 +84,5 @@ msgstr "Producto"
msgid "Title"
msgstr "Título"
-#. module: apps_download
-#: model:product.product,uom_name:apps_download.product_product100_b
-#: model:product.product,uom_name:apps_download.product_product_100
-#: model:product.template,uom_name:apps_download.product_product100_b_product_template
-msgid "Unit(s)"
-msgstr ""
-
-#. module: apps_download
-#: model:product.product,weight_uom_name:apps_download.product_product100_b
-#: model:product.product,weight_uom_name:apps_download.product_product_100
-#: model:product.template,weight_uom_name:apps_download.product_product100_b_product_template
-msgid "kg"
-msgstr ""
-
#~ msgid "Module path"
#~ msgstr "Ruta del módulo"
diff --git a/apps_download/i18n/fr.po b/apps_download/i18n/fr.po
index 6d2e020f..e7e4c8c2 100644
--- a/apps_download/i18n/fr.po
+++ b/apps_download/i18n/fr.po
@@ -18,11 +18,6 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-#. module: apps_download
-#: model:product.public.category,name:apps_download.website_category1
-msgid "Category1"
-msgstr ""
-
#. module: apps_download
#: model:ir.model.fields,field_description:apps_download.field_product_product__dependent_product_ids
msgid "Dependent Products"
@@ -77,13 +72,6 @@ msgstr "Dépendances du module"
msgid "Modules Dependencies"
msgstr "Dépendances des modules"
-#. module: apps_download
-#: model:product.product,name:apps_download.product_product100_b
-#: model:product.product,name:apps_download.product_product_100
-#: model:product.template,name:apps_download.product_product100_b_product_template
-msgid "Odoo Module 1"
-msgstr ""
-
#. module: apps_download
#: model:ir.model,name:apps_download.model_product_product
msgid "Product"
@@ -96,19 +84,5 @@ msgstr "Produit"
msgid "Title"
msgstr "Titre"
-#. module: apps_download
-#: model:product.product,uom_name:apps_download.product_product100_b
-#: model:product.product,uom_name:apps_download.product_product_100
-#: model:product.template,uom_name:apps_download.product_product100_b_product_template
-msgid "Unit(s)"
-msgstr ""
-
-#. module: apps_download
-#: model:product.product,weight_uom_name:apps_download.product_product100_b
-#: model:product.product,weight_uom_name:apps_download.product_product_100
-#: model:product.template,weight_uom_name:apps_download.product_product100_b_product_template
-msgid "kg"
-msgstr ""
-
#~ msgid "Module path"
#~ msgstr "Chemin du module"
diff --git a/apps_download/i18n/pt_BR.po b/apps_download/i18n/pt_BR.po
new file mode 100644
index 00000000..2a20d40f
--- /dev/null
+++ b/apps_download/i18n/pt_BR.po
@@ -0,0 +1,92 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * apps_download
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 12.0\n"
+"Report-Msgid-Bugs-To: \n"
+"PO-Revision-Date: 2019-11-24 18:09+0000\n"
+"Last-Translator: Rodrigo Macedo \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"
+"X-Generator: Weblate 3.8\n"
+
+#. module: apps_download
+#: model:ir.model.fields,field_description:apps_download.field_product_product__dependent_product_ids
+msgid "Dependent Products"
+msgstr "Produtos dependentes"
+
+#. module: apps_download
+#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:9
+#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:16
+#, python-format
+msgid "Description"
+msgstr "Descrição"
+
+#. module: apps_download
+#: code:addons/apps_download/models/product_product.py:31
+#, python-format
+msgid "Error: You cannot create recursive dependency."
+msgstr "Erro: você não pode criar dependência recursiva."
+
+#. module: apps_download
+#: model:ir.actions.server,name:apps_download.ir_cron_scheduler_generate_zip_ir_actions_server
+#: model:ir.cron,cron_name:apps_download.ir_cron_scheduler_generate_zip
+#: model:ir.cron,name:apps_download.ir_cron_scheduler_generate_zip
+msgid "Generate ZIP files for all products"
+msgstr "Gere arquivos ZIP para todos os produtos"
+
+#. module: apps_download
+#: model_terms:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
+msgid "Get all Dependencies"
+msgstr "Obter todas as dependências"
+
+#. module: apps_download
+#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:22
+#, python-format
+msgid "Hello world"
+msgstr "Olá mundo"
+
+#. module: apps_download
+#: model:ir.model.fields,field_description:apps_download.field_product_product__module_path
+msgid "Local Path"
+msgstr "Caminho Local"
+
+#. module: apps_download
+#: model_terms:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
+msgid "Module Dependencies"
+msgstr "Dependências dos módulos"
+
+#. module: apps_download
+#: model_terms:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
+msgid "Modules Dependencies"
+msgstr "Dependências dos módulos"
+
+#. module: apps_download
+#: model:ir.model,name:apps_download.model_product_product
+msgid "Product"
+msgstr "Produto"
+
+#. module: apps_download
+#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:8
+#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:15
+#, python-format
+msgid "Title"
+msgstr "Título"
+
+#~ msgid "Category1"
+#~ msgstr "Categoria1"
+
+#~ msgid "Odoo Module 1"
+#~ msgstr "Módulo Odoo 1"
+
+#~ msgid "Unit(s)"
+#~ msgstr "Unidade(s)"
+
+#~ msgid "kg"
+#~ msgstr "kg"
From a475b26904c03ad9665a71e9687fd93729385446 Mon Sep 17 00:00:00 2001
From: Carles Antoli
Date: Wed, 15 Jan 2020 19:14:49 +0000
Subject: [PATCH 05/23] Translated using Weblate (Spanish)
Currently translated at 72.7% (8 of 11 strings)
Translation: apps-store-12.0/apps-store-12.0-apps_download
Translate-URL: https://translation.odoo-community.org/projects/apps-store-12-0/apps-store-12-0-apps_download/es/
---
apps_download/i18n/es.po | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/apps_download/i18n/es.po b/apps_download/i18n/es.po
index b5ab5ce3..80911d07 100644
--- a/apps_download/i18n/es.po
+++ b/apps_download/i18n/es.po
@@ -9,14 +9,15 @@ msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-10 01:37+0000\n"
-"PO-Revision-Date: 2018-02-10 01:37+0000\n"
-"Last-Translator: enjolras , 2018\n"
+"PO-Revision-Date: 2020-01-15 22:13+0000\n"
+"Last-Translator: Carles Antoli \n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Weblate 3.10\n"
#. module: apps_download
#: model:ir.model.fields,field_description:apps_download.field_product_product__dependent_product_ids
@@ -41,7 +42,7 @@ msgstr "Error: No se puede crear una dependencia recursiva."
#: model:ir.cron,cron_name:apps_download.ir_cron_scheduler_generate_zip
#: model:ir.cron,name:apps_download.ir_cron_scheduler_generate_zip
msgid "Generate ZIP files for all products"
-msgstr ""
+msgstr "Generar archivos ZIP para todos los productos"
#. module: apps_download
#: model_terms:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
@@ -58,7 +59,7 @@ msgstr "Hola mundo"
#. module: apps_download
#: model:ir.model.fields,field_description:apps_download.field_product_product__module_path
msgid "Local Path"
-msgstr ""
+msgstr "Ruta local"
#. module: apps_download
#: model_terms:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
From 49b606a7bfe4f172fd664cef1bad259ad5986983 Mon Sep 17 00:00:00 2001
From: Sergio Zanchetta
Date: Mon, 8 Jun 2020 19:31:29 +0000
Subject: [PATCH 06/23] Added translation using Weblate (Italian)
---
apps_download/i18n/it.po | 78 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 78 insertions(+)
create mode 100644 apps_download/i18n/it.po
diff --git a/apps_download/i18n/it.po b/apps_download/i18n/it.po
new file mode 100644
index 00000000..964b7fe5
--- /dev/null
+++ b/apps_download/i18n/it.po
@@ -0,0 +1,78 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * apps_download
+#
+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: it\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+
+#. module: apps_download
+#: model:ir.model.fields,field_description:apps_download.field_product_product__dependent_product_ids
+msgid "Dependent Products"
+msgstr ""
+
+#. module: apps_download
+#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:9
+#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:16
+#, python-format
+msgid "Description"
+msgstr ""
+
+#. module: apps_download
+#: code:addons/apps_download/models/product_product.py:31
+#, python-format
+msgid "Error: You cannot create recursive dependency."
+msgstr ""
+
+#. module: apps_download
+#: model:ir.actions.server,name:apps_download.ir_cron_scheduler_generate_zip_ir_actions_server
+#: model:ir.cron,cron_name:apps_download.ir_cron_scheduler_generate_zip
+#: model:ir.cron,name:apps_download.ir_cron_scheduler_generate_zip
+msgid "Generate ZIP files for all products"
+msgstr ""
+
+#. module: apps_download
+#: model_terms:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
+msgid "Get all Dependencies"
+msgstr ""
+
+#. module: apps_download
+#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:22
+#, python-format
+msgid "Hello world"
+msgstr ""
+
+#. module: apps_download
+#: model:ir.model.fields,field_description:apps_download.field_product_product__module_path
+msgid "Local Path"
+msgstr ""
+
+#. module: apps_download
+#: model_terms:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
+msgid "Module Dependencies"
+msgstr ""
+
+#. module: apps_download
+#: model_terms:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
+msgid "Modules Dependencies"
+msgstr ""
+
+#. module: apps_download
+#: model:ir.model,name:apps_download.model_product_product
+msgid "Product"
+msgstr ""
+
+#. module: apps_download
+#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:8
+#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:15
+#, python-format
+msgid "Title"
+msgstr ""
From 441cf156405dca387c1d79387101a3ffc98a2911 Mon Sep 17 00:00:00 2001
From: Sergio Zanchetta
Date: Mon, 8 Jun 2020 19:31:59 +0000
Subject: [PATCH 07/23] Translated using Weblate (Italian)
Currently translated at 72.7% (8 of 11 strings)
Translation: apps-store-12.0/apps-store-12.0-apps_download
Translate-URL: https://translation.odoo-community.org/projects/apps-store-12-0/apps-store-12-0-apps_download/it/
---
apps_download/i18n/it.po | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/apps_download/i18n/it.po b/apps_download/i18n/it.po
index 964b7fe5..cd763905 100644
--- a/apps_download/i18n/it.po
+++ b/apps_download/i18n/it.po
@@ -6,13 +6,15 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2020-06-08 22:19+0000\n"
+"Last-Translator: Sergio Zanchetta \n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Weblate 3.10\n"
#. module: apps_download
#: model:ir.model.fields,field_description:apps_download.field_product_product__dependent_product_ids
@@ -24,20 +26,20 @@ msgstr ""
#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:16
#, python-format
msgid "Description"
-msgstr ""
+msgstr "Descrizione"
#. module: apps_download
#: code:addons/apps_download/models/product_product.py:31
#, python-format
msgid "Error: You cannot create recursive dependency."
-msgstr ""
+msgstr "Errore: impossibile creare dipendenze ricorsive."
#. module: apps_download
#: model:ir.actions.server,name:apps_download.ir_cron_scheduler_generate_zip_ir_actions_server
#: model:ir.cron,cron_name:apps_download.ir_cron_scheduler_generate_zip
#: model:ir.cron,name:apps_download.ir_cron_scheduler_generate_zip
msgid "Generate ZIP files for all products"
-msgstr ""
+msgstr "Genera file ZIP per tutti i prodotti"
#. module: apps_download
#: model_terms:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
@@ -53,26 +55,26 @@ msgstr ""
#. module: apps_download
#: model:ir.model.fields,field_description:apps_download.field_product_product__module_path
msgid "Local Path"
-msgstr ""
+msgstr "Percorso locale"
#. module: apps_download
#: model_terms:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
msgid "Module Dependencies"
-msgstr ""
+msgstr "Dipendenze modulo"
#. module: apps_download
#: model_terms:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
msgid "Modules Dependencies"
-msgstr ""
+msgstr "Dipendenze moduli"
#. module: apps_download
#: model:ir.model,name:apps_download.model_product_product
msgid "Product"
-msgstr ""
+msgstr "Prodotto"
#. module: apps_download
#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:8
#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:15
#, python-format
msgid "Title"
-msgstr ""
+msgstr "Titolo"
From 3ed867cdfb57957423d763e2ed67cdf5f3a0ef4c Mon Sep 17 00:00:00 2001
From: "Pedro M. Baeza"
Date: Wed, 5 Aug 2020 18:52:01 +0200
Subject: [PATCH 08/23] [IMP] apps_download: black, isort, prettier
---
apps_download/__manifest__.py | 26 +--
apps_download/data/cron_scheduler.xml | 27 ++-
apps_download/demo/product_template_demo.xml | 177 +++++++++---------
apps_download/models/product_product.py | 124 ++++++------
apps_download/tests/test_app_download.py | 50 +++--
.../test_modules/broken_lint/__manifest__.py | 16 +-
.../broken_lint/case_deprecated.py | 9 +-
.../test_modules/broken_lint/case_fields.py | 11 +-
.../test_modules/broken_lint/case_import.py | 10 +-
.../broken_lint/eval_referenced.py | 6 +-
.../second_module/__manifest__.py | 13 +-
.../test_modules/test_module/__manifest__.py | 17 +-
.../test_modules/test_module/doc/index.rst | 1 -
.../test_modules/test_module/dummy_model.py | 14 +-
apps_download/views/product_template_view.xml | 38 ++--
15 files changed, 263 insertions(+), 276 deletions(-)
diff --git a/apps_download/__manifest__.py b/apps_download/__manifest__.py
index 105bee3d..418cf8b2 100644
--- a/apps_download/__manifest__.py
+++ b/apps_download/__manifest__.py
@@ -5,26 +5,20 @@
{
"name": "Product Download for Appstore",
"version": "12.0.1.0.0",
- "author": "BizzAppDev, AgentERP, Elico Corp, "
- "Odoo Community Association (OCA)",
+ "author": "BizzAppDev, AgentERP, Elico Corp, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/apps-store",
"license": "AGPL-3",
"category": "Sales",
"depends": [
- 'base',
- 'website_sale_digital',
- 'github_connector_odoo',
- 'apps_product_creator',
+ "base",
+ "website_sale_digital",
+ "github_connector_odoo",
+ "apps_product_creator",
],
"summary": "Product Download for Appstore",
- "data": [
- 'views/product_template_view.xml',
- 'data/cron_scheduler.xml',
- ],
- 'demo': [
- 'demo/product_template_demo.xml',
- ],
- 'installable': True,
- 'auto_install': False,
- 'application': False
+ "data": ["views/product_template_view.xml", "data/cron_scheduler.xml",],
+ "demo": ["demo/product_template_demo.xml",],
+ "installable": True,
+ "auto_install": False,
+ "application": False,
}
diff --git a/apps_download/data/cron_scheduler.xml b/apps_download/data/cron_scheduler.xml
index 26070280..b7d47378 100644
--- a/apps_download/data/cron_scheduler.xml
+++ b/apps_download/data/cron_scheduler.xml
@@ -1,21 +1,20 @@
-
+
-
- Generate ZIP files for all products
-
- 1
-
- days
- -1
-
-
- code
- model.generate_zip_file_batch()
-
-
+
+ Generate ZIP files for all products
+
+ 1
+
+ days
+ -1
+
+
+ code
+ model.generate_zip_file_batch()
+
diff --git a/apps_download/demo/product_template_demo.xml b/apps_download/demo/product_template_demo.xml
index 6414fa0c..a3305e48 100644
--- a/apps_download/demo/product_template_demo.xml
+++ b/apps_download/demo/product_template_demo.xml
@@ -1,4 +1,4 @@
-
+
-
- Category1
-
-
-
- Organization1
- login
-
-
-
- Repository1
-
-
-
-
- Master
-
-
-
-
- odoo_module1
-
-
-
- odoo_module2
-
-
-
- Odoo Module 1
- odoo_module1
-
-
- AGPL-3
- Summary Test
- Website Test
- Description Test
- 10.0
- OCA
- base
- {}
-
-
-
- Odoo Module 2
- odoo_module2
-
-
- AGPL-3
- Summary Test
- Website Test
- Description Test
- 11.0
- OCA
- base
- {}
-
-
-
- Odoo Module 1
- service
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ Category1
+
+
+ Organization1
+ login
+
+
+ Repository1
+
+
+
+ Master
+
+
+
+ odoo_module1
+
+
+ odoo_module2
+
+
+ Odoo Module 1
+ odoo_module1
+
+
+ AGPL-3
+ Summary Test
+ Website Test
+ Description Test
+ 10.0
+ OCA
+ base
+ {}
+
+
+ Odoo Module 2
+ odoo_module2
+
+
+ AGPL-3
+ Summary Test
+ Website Test
+ Description Test
+ 11.0
+ OCA
+ base
+ {}
+
+
+ Odoo Module 1
+ service
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps_download/models/product_product.py b/apps_download/models/product_product.py
index e0e02dce..3604b724 100644
--- a/apps_download/models/product_product.py
+++ b/apps_download/models/product_product.py
@@ -2,38 +2,41 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+import base64
+import logging
import os
-import tempfile
import shutil
-import logging
-import base64
+import tempfile
import time
+
+from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
-from odoo import models, fields, api, _
+
_logger = logging.getLogger(__name__)
class ProductProduct(models.Model):
- _inherit = 'product.product'
+ _inherit = "product.product"
dependent_product_ids = fields.Many2many(
- 'product.product', 'product_product_dependent_rel',
- 'src_id', 'dest_id', string='Dependent Products'
+ "product.product",
+ "product_product_dependent_rel",
+ "src_id",
+ "dest_id",
+ string="Dependent Products",
)
module_path = fields.Char(
- related="odoo_module_version_id.repository_branch_id.local_path",
- readonly=True)
+ related="odoo_module_version_id.repository_branch_id.local_path", readonly=True
+ )
- @api.constrains('dependent_product_ids')
+ @api.constrains("dependent_product_ids")
def check_dependent_recursion(self):
- if not self._check_m2m_recursion('dependent_product_ids'):
- raise ValidationError(
- _('Error: You cannot create recursive dependency.')
- )
+ if not self._check_m2m_recursion("dependent_product_ids"):
+ raise ValidationError(_("Error: You cannot create recursive dependency."))
@api.model
def child_dependency(self, children):
- res = self.env['product.product']
+ res = self.env["product.product"]
for child in children:
if not child.dependent_product_ids:
continue
@@ -48,74 +51,89 @@ def create_dependency_list(self):
ret_val[product.id] = product.dependent_product_ids
if product.dependent_product_ids:
ret_val[product.id] |= self.child_dependency(
- product.dependent_product_ids)
+ product.dependent_product_ids
+ )
return ret_val
@api.multi
def _get_module_path(self):
- return (self.module_path + '/' +
- self.odoo_module_version_id.technical_name)
+ return self.module_path + "/" + self.odoo_module_version_id.technical_name
@api.multi
def generate_zip_file(self):
- for product in self.filtered('module_path'):
+ for product in self.filtered("module_path"):
tmp_dir = tempfile.mkdtemp()
tmp_dir_2 = tempfile.mkdtemp()
dependent_products = product.create_dependency_list()
dependent_products = dependent_products[product.id]
- for dependent_pro in dependent_products.filtered('module_path'):
+ for dependent_pro in dependent_products.filtered("module_path"):
tmp_module_path = os.path.join(
- tmp_dir,
- dependent_pro.odoo_module_version_id.technical_name)
+ tmp_dir, dependent_pro.odoo_module_version_id.technical_name
+ )
shutil.copytree(
- dependent_pro.module_path + '/' +
- dependent_pro.odoo_module_version_id.technical_name,
- tmp_module_path)
+ dependent_pro.module_path
+ + "/"
+ + dependent_pro.odoo_module_version_id.technical_name,
+ tmp_module_path,
+ )
tmp_module_path = os.path.join(
- tmp_dir, product.odoo_module_version_id.technical_name)
+ tmp_dir, product.odoo_module_version_id.technical_name
+ )
module_path = product._get_module_path()
shutil.copytree(module_path, tmp_module_path)
- time_version_value = time.strftime(
- '_%y%m%d_%H%M%S')
+ time_version_value = time.strftime("_%y%m%d_%H%M%S")
if product.attribute_value_ids:
- time_version_value = '_%s%s' % (
- '_'.join([name.replace('.', '_') for name in
- product.attribute_value_ids.mapped('name')]),
- time_version_value)
-
- tmp_zip_file = (os.path.join(tmp_dir_2, product.name) +
- time_version_value)
- shutil.make_archive(tmp_zip_file, 'zip', tmp_dir)
- tmp_zip_file = '%s.zip' % tmp_zip_file
+ time_version_value = "_{}{}".format(
+ "_".join(
+ [
+ name.replace(".", "_")
+ for name in product.attribute_value_ids.mapped("name")
+ ]
+ ),
+ time_version_value,
+ )
+
+ tmp_zip_file = os.path.join(tmp_dir_2, product.name) + time_version_value
+ shutil.make_archive(tmp_zip_file, "zip", tmp_dir)
+ tmp_zip_file = "%s.zip" % tmp_zip_file
with open(tmp_zip_file, "rb") as file_obj:
try:
data_encode = base64.encodestring(file_obj.read())
- self.env['ir.attachment'].create({
- 'datas': data_encode,
- 'datas_fname': (product.name.replace(" ", '-') +
- time_version_value + '.zip'),
- 'type': 'binary',
- 'name': product.name + time_version_value + '.zip',
- 'res_model': product._name,
- 'res_id': product.id,
- 'product_downloadable': True,
- })
+ self.env["ir.attachment"].create(
+ {
+ "datas": data_encode,
+ "datas_fname": (
+ product.name.replace(" ", "-")
+ + time_version_value
+ + ".zip"
+ ),
+ "type": "binary",
+ "name": product.name + time_version_value + ".zip",
+ "res_model": product._name,
+ "res_id": product.id,
+ "product_downloadable": True,
+ }
+ )
except Exception as exc:
- _logger.error('Error creating attachment %s Error is: %s' %
- (tmp_zip_file, exc.message))
+ _logger.error(
+ "Error creating attachment %s Error is: %s"
+ % (tmp_zip_file, exc.message)
+ )
try:
shutil.rmtree(tmp_dir)
except OSError as exc:
- _logger.warning('Could not remove Tempdir %s, Errormsg %s' % (
- tmp_dir, exc.message))
+ _logger.warning(
+ "Could not remove Tempdir {}, Errormsg {}".format(tmp_dir, exc.message)
+ )
try:
shutil.rmtree(tmp_dir_2)
except OSError as exc:
_logger.warning(
- 'Could not remove Tempdir 2 %s, Errormsg %s' % (
- tmp_dir, exc.message))
+ "Could not remove Tempdir 2 %s, Errormsg %s"
+ % (tmp_dir, exc.message)
+ )
@api.model
def generate_zip_file_batch(self):
diff --git a/apps_download/tests/test_app_download.py b/apps_download/tests/test_app_download.py
index ee537a71..33424db9 100644
--- a/apps_download/tests/test_app_download.py
+++ b/apps_download/tests/test_app_download.py
@@ -2,10 +2,11 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# Part of Odoo. See LICENSE file for full copyright and licensing details.
-from odoo.tests.common import TransactionCase
-from odoo.exceptions import ValidationError
import os
+from odoo.exceptions import ValidationError
+from odoo.tests.common import TransactionCase
+
class TestAppDownload(TransactionCase):
"""Test for the Add download"""
@@ -13,46 +14,37 @@ class TestAppDownload(TransactionCase):
def setUp(self):
super(TestAppDownload, self).setUp()
test_path = os.path.dirname(os.path.realpath(__file__))
- module_path = os.path.join(
- test_path, 'test_modules', 'broken_lint')
- self.sub_child_product = self.env['product.product'].create(
- {
- 'name': 'business_requirement',
- 'module_path': module_path
- }
+ module_path = os.path.join(test_path, "test_modules", "broken_lint")
+ self.sub_child_product = self.env["product.product"].create(
+ {"name": "business_requirement", "module_path": module_path}
)
- module_path = os.path.join(
- test_path, 'test_modules', 'second_module')
- self.child_product = self.env['product.product'].create(
+ module_path = os.path.join(test_path, "test_modules", "second_module")
+ self.child_product = self.env["product.product"].create(
{
- 'name': 'business_requirement_deliverable',
- 'dependent_product_ids': [(6, 0, self.sub_child_product.ids)],
- 'module_path': module_path
+ "name": "business_requirement_deliverable",
+ "dependent_product_ids": [(6, 0, self.sub_child_product.ids)],
+ "module_path": module_path,
}
)
- module_path = os.path.join(
- test_path, 'test_modules', 'test_module')
- self.main_app_product = self.env['product.product'].create(
+ module_path = os.path.join(test_path, "test_modules", "test_module")
+ self.main_app_product = self.env["product.product"].create(
{
- 'name': 'business_requirement_deliverable_project',
- 'module_path': module_path
+ "name": "business_requirement_deliverable_project",
+ "module_path": module_path,
}
)
def test_dependency(self):
self.main_app_product.write(
- {
- 'dependent_product_ids': [(6, 0, self.child_product.ids)]
- }
+ {"dependent_product_ids": [(6, 0, self.child_product.ids)]}
)
self.assertEqual(
- len(self.main_app_product.dependent_product_ids.ids), 1,
- 'Dependency: App Dependency does not set properlly')
+ len(self.main_app_product.dependent_product_ids.ids),
+ 1,
+ "Dependency: App Dependency does not set properlly",
+ )
self.main_app_product.generate_zip_file()
with self.assertRaises(ValidationError):
self.main_app_product.write(
- {
- 'dependent_product_ids': [
- (6, 0, self.main_app_product.ids)]
- }
+ {"dependent_product_ids": [(6, 0, self.main_app_product.ids)]}
)
diff --git a/apps_download/tests/test_modules/broken_lint/__manifest__.py b/apps_download/tests/test_modules/broken_lint/__manifest__.py
index 9a2b8d7e..2a0428a9 100644
--- a/apps_download/tests/test_modules/broken_lint/__manifest__.py
+++ b/apps_download/tests/test_modules/broken_lint/__manifest__.py
@@ -1,10 +1,10 @@
{
- 'name': 'Broken module for lint tests',
- 'license': 'AGPL-3',
- 'author': 'Odoo Community Association (OCA)',
- 'version': '1.0',
- 'depends': [],
- 'data': [],
- 'test': [],
- 'installable': True,
+ "name": "Broken module for lint tests",
+ "license": "AGPL-3",
+ "author": "Odoo Community Association (OCA)",
+ "version": "1.0",
+ "depends": [],
+ "data": [],
+ "test": [],
+ "installable": True,
}
diff --git a/apps_download/tests/test_modules/broken_lint/case_deprecated.py b/apps_download/tests/test_modules/broken_lint/case_deprecated.py
index 349a129c..df324149 100644
--- a/apps_download/tests/test_modules/broken_lint/case_deprecated.py
+++ b/apps_download/tests/test_modules/broken_lint/case_deprecated.py
@@ -1,16 +1,17 @@
-
# w0402 - deprecated module
-import ipdb # pylint: disable=W0403
import pdb # pylint: disable=W0403
-import pudb # pylint: disable=W0403
+import ipdb # pylint: disable=W0403
+import pudb # pylint: disable=W0403
from openerp.osv import osv # pylint: disable=W0403
def avoid_imported_but_unused(self):
# avoid imported but unused
all_imports = (
- pdb, pudb, ipdb,
+ pdb,
+ pudb,
+ ipdb,
osv,
)
eval("Not use eval")
diff --git a/apps_download/tests/test_modules/broken_lint/case_fields.py b/apps_download/tests/test_modules/broken_lint/case_fields.py
index e9109708..05235092 100644
--- a/apps_download/tests/test_modules/broken_lint/case_fields.py
+++ b/apps_download/tests/test_modules/broken_lint/case_fields.py
@@ -1,22 +1,21 @@
-
from openerp import fields, models
from openerp.tools.translate import _
class MyExampleField(models.Model):
_name = "my.example.field"
- name = fields.Char(_('Title'), size=100)
- description = fields.Char(string=_('Description'), size=100)
+ name = fields.Char(_("Title"), size=100)
+ description = fields.Char(string=_("Description"), size=100)
class MyExampleField2(models.Model):
_name = "my.example.field2"
- name = fields.Char(_('Title'), size=100)
- description = fields.Char(name=_('Description'), size=100)
+ name = fields.Char(_("Title"), size=100)
+ description = fields.Char(name=_("Description"), size=100)
def my_method1(self, var):
pass
def my_method2(self):
- return self.my_method1(_('Hello world'))
+ return self.my_method1(_("Hello world"))
diff --git a/apps_download/tests/test_modules/broken_lint/case_import.py b/apps_download/tests/test_modules/broken_lint/case_import.py
index ef71b045..80d25c68 100644
--- a/apps_download/tests/test_modules/broken_lint/case_import.py
+++ b/apps_download/tests/test_modules/broken_lint/case_import.py
@@ -1,14 +1,7 @@
-
import openerp
-
from openerp import api
from openerp.api import one
-
-from openerp.exceptions import Warning as UserError
-from openerp.exceptions import Warning as OtherName
-from openerp.exceptions import Warning
-from openerp.exceptions import AccessError as AE, \
- ValidationError, Warning as UserError2
+from openerp.exceptions import AccessError as AE, ValidationError, Warning as UserError2
class UseUnusedImport(object):
@@ -41,7 +34,6 @@ def copy():
class ApiOneMultiTogether(object):
-
@api.multi
@api.one
def copy():
diff --git a/apps_download/tests/test_modules/broken_lint/eval_referenced.py b/apps_download/tests/test_modules/broken_lint/eval_referenced.py
index 00bc5433..6ef28298 100644
--- a/apps_download/tests/test_modules/broken_lint/eval_referenced.py
+++ b/apps_download/tests/test_modules/broken_lint/eval_referenced.py
@@ -1,5 +1,3 @@
-
-
def eval_from_param(param):
"""eval used from param"""
param("c = 2")
@@ -8,12 +6,12 @@ def eval_from_param(param):
def eval_from_other():
"""eval used from many ways"""
my_dict = {
- 'my_eval': eval, # [eval-used]
+ "my_eval": eval, # [eval-used]
}
my_list = [eval] # [eval-used]
my_var = eval # [eval-used]
# inferred case
- my_var('d = 3') # [eval-used]
+ my_var("d = 3") # [eval-used]
eval_from_param(eval) # [eval-used]
return my_dict, my_list
diff --git a/apps_download/tests/test_modules/second_module/__manifest__.py b/apps_download/tests/test_modules/second_module/__manifest__.py
index 79dc3b91..bc16ba35 100644
--- a/apps_download/tests/test_modules/second_module/__manifest__.py
+++ b/apps_download/tests/test_modules/second_module/__manifest__.py
@@ -1,10 +1,7 @@
{
- 'name': 'Second empty module for tests',
- 'version': '8.0.1.0.0',
- 'author': 'Odoo Community Association (OCA)',
- 'license': 'AGPL-3',
- 'depends': [
- 'base',
- 'test_module',
- ],
+ "name": "Second empty module for tests",
+ "version": "8.0.1.0.0",
+ "author": "Odoo Community Association (OCA)",
+ "license": "AGPL-3",
+ "depends": ["base", "test_module",],
}
diff --git a/apps_download/tests/test_modules/test_module/__manifest__.py b/apps_download/tests/test_modules/test_module/__manifest__.py
index 8abe881d..39d0b009 100644
--- a/apps_download/tests/test_modules/test_module/__manifest__.py
+++ b/apps_download/tests/test_modules/test_module/__manifest__.py
@@ -1,13 +1,8 @@
{
- 'name': 'Empty module for tests',
- 'license': 'AGPL-3',
- 'author': 'Odoo Community Association (OCA)',
- 'version': '1.0',
- 'depends': [
- 'base',
- 'dependency_module', # test dependency repo installation
- ],
- 'data': [
- 'security/ir.model.access.csv',
- ],
+ "name": "Empty module for tests",
+ "license": "AGPL-3",
+ "author": "Odoo Community Association (OCA)",
+ "version": "1.0",
+ "depends": ["base", "dependency_module",], # test dependency repo installation
+ "data": ["security/ir.model.access.csv",],
}
diff --git a/apps_download/tests/test_modules/test_module/doc/index.rst b/apps_download/tests/test_modules/test_module/doc/index.rst
index d00cd1be..23582458 100644
--- a/apps_download/tests/test_modules/test_module/doc/index.rst
+++ b/apps_download/tests/test_modules/test_module/doc/index.rst
@@ -6,4 +6,3 @@ Test module
This module was written to check the test of rst syntax.
This is a rst file without syntax error.
-
diff --git a/apps_download/tests/test_modules/test_module/dummy_model.py b/apps_download/tests/test_modules/test_module/dummy_model.py
index 1285ad42..c1a2ac87 100644
--- a/apps_download/tests/test_modules/test_module/dummy_model.py
+++ b/apps_download/tests/test_modules/test_module/dummy_model.py
@@ -1,15 +1,17 @@
+import sys
-from openerp.osv import orm
from openerp import fields
-import sys
+from openerp.osv import orm
class DummyModel(orm.Model):
- _name = 'dummy.model'
- name = fields.Char('Dummy', size=100)
+ _name = "dummy.model"
+ name = fields.Char("Dummy", size=100)
# printout non-ASCII text to check unicode issues
# (from Monty Python's "Italian Lesson"...)
-sys.stdout.write("Eeeeeee! Milano è tanto meglio di Napoli. "
- "Milano è la citta la più bella di tutti ... nel mondo...\n")
+sys.stdout.write(
+ "Eeeeeee! Milano è tanto meglio di Napoli. "
+ "Milano è la citta la più bella di tutti ... nel mondo...\n"
+)
diff --git a/apps_download/views/product_template_view.xml b/apps_download/views/product_template_view.xml
index 2330ff10..2023446f 100644
--- a/apps_download/views/product_template_view.xml
+++ b/apps_download/views/product_template_view.xml
@@ -1,4 +1,4 @@
-
+
-
- product.product.form
- product.product
- form
-
-
-
-
-
-
-
-
-
-
-
-
+
+ product.product.form
+ product.product
+ form
+
+
+
+
+
+
+
+
+
+
+
+
From 07ebd5ec109b79beb35065c7f4935134acf79d94 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alexandre=20D=2E=20D=C3=ADaz?=
Date: Wed, 29 Jul 2020 20:35:27 +0200
Subject: [PATCH 09/23] [MIG] apps_download: Migration to 13.0
---
apps_download/README.rst | 11 +-
apps_download/__manifest__.py | 6 +-
apps_download/demo/product_template_demo.xml | 202 ++++++++++--------
apps_download/i18n/apps_download.pot | 55 +++--
apps_download/i18n/es.po | 61 ++++--
apps_download/i18n/fr.po | 61 ++++--
apps_download/i18n/it.po | 60 ++++--
apps_download/i18n/pt_BR.po | 65 +++---
apps_download/models/product_product.py | 12 +-
apps_download/readme/CONTRIBUTORS.rst | 1 +
apps_download/static/description/index.html | 7 +-
.../tests/test_modules/broken_lint/README.rst | 1 +
.../test_modules/broken_lint/__init__.py | 4 +-
.../test_modules/broken_lint/__manifest__.py | 2 +-
.../broken_lint/case_deprecated.py | 18 --
.../test_modules/broken_lint/case_fields.py | 21 --
.../test_modules/broken_lint/case_import.py | 40 ----
.../broken_lint/eval_referenced.py | 17 --
.../test_modules/second_module/README.rst | 1 +
.../second_module/__manifest__.py | 4 +-
.../test_modules/test_module/__manifest__.py | 6 +-
21 files changed, 342 insertions(+), 313 deletions(-)
create mode 100644 apps_download/tests/test_modules/broken_lint/README.rst
delete mode 100644 apps_download/tests/test_modules/broken_lint/case_deprecated.py
delete mode 100644 apps_download/tests/test_modules/broken_lint/case_fields.py
delete mode 100644 apps_download/tests/test_modules/broken_lint/case_import.py
delete mode 100644 apps_download/tests/test_modules/broken_lint/eval_referenced.py
create mode 100644 apps_download/tests/test_modules/second_module/README.rst
diff --git a/apps_download/README.rst b/apps_download/README.rst
index aab52fd7..1614a80e 100644
--- a/apps_download/README.rst
+++ b/apps_download/README.rst
@@ -14,13 +14,13 @@ Product Download for Appstore
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fapps--store-lightgray.png?logo=github
- :target: https://github.com/OCA/apps-store/tree/12.0/apps_download
+ :target: https://github.com/OCA/apps-store/tree/13.0/apps_download
:alt: OCA/apps-store
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/apps-store-12-0/apps-store-12-0-apps_download
+ :target: https://translation.odoo-community.org/projects/apps-store-13-0/apps-store-13-0-apps_download
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/249/12.0
+ :target: https://runbot.odoo-community.org/runbot/249/13.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -44,7 +44,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.
@@ -67,6 +67,7 @@ Contributors
* `Tecnativa `_:
* Víctor M.M. Torres
+ * Alexandre D. Díaz
Maintainers
~~~~~~~~~~~
@@ -81,6 +82,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/apps-store `_ project on GitHub.
+This module is part of the `OCA/apps-store `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/apps_download/__manifest__.py b/apps_download/__manifest__.py
index 418cf8b2..1cd18e9c 100644
--- a/apps_download/__manifest__.py
+++ b/apps_download/__manifest__.py
@@ -4,7 +4,7 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Product Download for Appstore",
- "version": "12.0.1.0.0",
+ "version": "13.0.1.0.0",
"author": "BizzAppDev, AgentERP, Elico Corp, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/apps-store",
"license": "AGPL-3",
@@ -16,8 +16,8 @@
"apps_product_creator",
],
"summary": "Product Download for Appstore",
- "data": ["views/product_template_view.xml", "data/cron_scheduler.xml",],
- "demo": ["demo/product_template_demo.xml",],
+ "data": ["views/product_template_view.xml", "data/cron_scheduler.xml"],
+ "demo": ["demo/product_template_demo.xml"],
"installable": True,
"auto_install": False,
"application": False,
diff --git a/apps_download/demo/product_template_demo.xml b/apps_download/demo/product_template_demo.xml
index a3305e48..bf793735 100644
--- a/apps_download/demo/product_template_demo.xml
+++ b/apps_download/demo/product_template_demo.xml
@@ -6,90 +6,120 @@
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-->
-
- Category1
-
-
- Organization1
- login
-
-
- Repository1
-
-
-
- Master
-
-
-
- odoo_module1
-
-
- odoo_module2
-
-
- Odoo Module 1
- odoo_module1
-
-
- AGPL-3
- Summary Test
- Website Test
- Description Test
- 10.0
- OCA
- base
- {}
-
-
- Odoo Module 2
- odoo_module2
-
-
- AGPL-3
- Summary Test
- Website Test
- Description Test
- 11.0
- OCA
- base
- {}
-
-
- Odoo Module 1
- service
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ Odoo Version
+
+
+ Category1
+
+
+ Organization1
+ login
+
+
+ Repository1
+
+
+
+ Master
+
+
+
+ odoo_module1
+
+
+ odoo_module2
+
+
+ Odoo Module 1
+ odoo_module1
+
+
+ AGPL-3
+ Summary Test
+ Website Test
+ Description Test
+ 10.0
+ OCA
+ base
+ {}
+ /repo/10.0/odoo_module_1
+
+
+ Odoo Module 2
+ odoo_module2
+
+
+ AGPL-3
+ Summary Test
+ Website Test
+ Description Test
+ 11.0
+ OCA
+ base
+ {}
+ /repo/11.0/odoo_module_2
+
+
+
+ Odoo Module 1
+ service
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps_download/i18n/apps_download.pot b/apps_download/i18n/apps_download.pot
index 86e05137..98cbe4b1 100644
--- a/apps_download/i18n/apps_download.pot
+++ b/apps_download/i18n/apps_download.pot
@@ -1,12 +1,12 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
-# * apps_download
+# * apps_download
#
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"
@@ -14,19 +14,27 @@ msgstr ""
"Plural-Forms: \n"
#. module: apps_download
-#: model:ir.model.fields,field_description:apps_download.field_product_product__dependent_product_ids
-msgid "Dependent Products"
+#: model:product.template.attribute.value,name:apps_download.product_template_100_attribute_odoo_version_value_100
+msgid "10.0"
msgstr ""
#. module: apps_download
-#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:9
-#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:16
-#, python-format
-msgid "Description"
+#: model:product.template.attribute.value,name:apps_download.product_template_100_attribute_odoo_version_value_110
+msgid "11.0"
+msgstr ""
+
+#. module: apps_download
+#: model:product.public.category,name:apps_download.website_category1
+msgid "Category1"
msgstr ""
#. module: apps_download
-#: code:addons/apps_download/models/product_product.py:31
+#: model:ir.model.fields,field_description:apps_download.field_product_product__dependent_product_ids
+msgid "Dependent Products"
+msgstr ""
+
+#. module: apps_download
+#: code:addons/apps_download/models/product_product.py:0
#, python-format
msgid "Error: You cannot create recursive dependency."
msgstr ""
@@ -43,12 +51,6 @@ msgstr ""
msgid "Get all Dependencies"
msgstr ""
-#. module: apps_download
-#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:22
-#, python-format
-msgid "Hello world"
-msgstr ""
-
#. module: apps_download
#: model:ir.model.fields,field_description:apps_download.field_product_product__module_path
msgid "Local Path"
@@ -64,15 +66,26 @@ msgstr ""
msgid "Modules Dependencies"
msgstr ""
+#. module: apps_download
+#: model:product.product,name:apps_download.product_product_100
+#: model:product.product,name:apps_download.product_product_100b
+#: model:product.template,name:apps_download.product_product_100b_product_template
+msgid "Odoo Module 1"
+msgstr ""
+
+#. module: apps_download
+#: model:product.attribute,name:apps_download.attribute_odoo_version
+msgid "Odoo Version"
+msgstr ""
+
#. module: apps_download
#: model:ir.model,name:apps_download.model_product_product
msgid "Product"
msgstr ""
#. module: apps_download
-#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:8
-#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:15
-#, python-format
-msgid "Title"
+#: model:product.product,uom_name:apps_download.product_product_100
+#: model:product.product,uom_name:apps_download.product_product_100b
+#: model:product.template,uom_name:apps_download.product_product_100b_product_template
+msgid "Units"
msgstr ""
-
diff --git a/apps_download/i18n/es.po b/apps_download/i18n/es.po
index 80911d07..c5310d0b 100644
--- a/apps_download/i18n/es.po
+++ b/apps_download/i18n/es.po
@@ -19,20 +19,28 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.10\n"
+#. module: apps_download
+#: model:product.template.attribute.value,name:apps_download.product_template_100_attribute_odoo_version_value_100
+msgid "10.0"
+msgstr ""
+
+#. module: apps_download
+#: model:product.template.attribute.value,name:apps_download.product_template_100_attribute_odoo_version_value_110
+msgid "11.0"
+msgstr ""
+
+#. module: apps_download
+#: model:product.public.category,name:apps_download.website_category1
+msgid "Category1"
+msgstr ""
+
#. module: apps_download
#: model:ir.model.fields,field_description:apps_download.field_product_product__dependent_product_ids
msgid "Dependent Products"
msgstr "Productos dependientes"
#. module: apps_download
-#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:9
-#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:16
-#, python-format
-msgid "Description"
-msgstr "Descripción"
-
-#. module: apps_download
-#: code:addons/apps_download/models/product_product.py:31
+#: code:addons/apps_download/models/product_product.py:0
#, python-format
msgid "Error: You cannot create recursive dependency."
msgstr "Error: No se puede crear una dependencia recursiva."
@@ -50,12 +58,6 @@ msgstr "Generar archivos ZIP para todos los productos"
msgid "Get all Dependencies"
msgstr "Obtener todas las dependencias"
-#. module: apps_download
-#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:22
-#, python-format
-msgid "Hello world"
-msgstr "Hola mundo"
-
#. module: apps_download
#: model:ir.model.fields,field_description:apps_download.field_product_product__module_path
msgid "Local Path"
@@ -73,17 +75,38 @@ msgstr "Dependencia del módulo"
msgid "Modules Dependencies"
msgstr "Dependencia de módulos"
+#. module: apps_download
+#: model:product.product,name:apps_download.product_product_100
+#: model:product.product,name:apps_download.product_product_100b
+#: model:product.template,name:apps_download.product_product_100b_product_template
+msgid "Odoo Module 1"
+msgstr ""
+
+#. module: apps_download
+#: model:product.attribute,name:apps_download.attribute_odoo_version
+msgid "Odoo Version"
+msgstr ""
+
#. module: apps_download
#: model:ir.model,name:apps_download.model_product_product
msgid "Product"
msgstr "Producto"
#. module: apps_download
-#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:8
-#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:15
-#, python-format
-msgid "Title"
-msgstr "Título"
+#: model:product.product,uom_name:apps_download.product_product_100
+#: model:product.product,uom_name:apps_download.product_product_100b
+#: model:product.template,uom_name:apps_download.product_product_100b_product_template
+msgid "Units"
+msgstr ""
+
+#~ msgid "Description"
+#~ msgstr "Descripción"
+
+#~ msgid "Hello world"
+#~ msgstr "Hola mundo"
+
+#~ msgid "Title"
+#~ msgstr "Título"
#~ msgid "Module path"
#~ msgstr "Ruta del módulo"
diff --git a/apps_download/i18n/fr.po b/apps_download/i18n/fr.po
index e7e4c8c2..b65114ce 100644
--- a/apps_download/i18n/fr.po
+++ b/apps_download/i18n/fr.po
@@ -18,20 +18,28 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+#. module: apps_download
+#: model:product.template.attribute.value,name:apps_download.product_template_100_attribute_odoo_version_value_100
+msgid "10.0"
+msgstr ""
+
+#. module: apps_download
+#: model:product.template.attribute.value,name:apps_download.product_template_100_attribute_odoo_version_value_110
+msgid "11.0"
+msgstr ""
+
+#. module: apps_download
+#: model:product.public.category,name:apps_download.website_category1
+msgid "Category1"
+msgstr ""
+
#. module: apps_download
#: model:ir.model.fields,field_description:apps_download.field_product_product__dependent_product_ids
msgid "Dependent Products"
msgstr "Produits dépendants"
#. module: apps_download
-#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:9
-#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:16
-#, python-format
-msgid "Description"
-msgstr "Description"
-
-#. module: apps_download
-#: code:addons/apps_download/models/product_product.py:31
+#: code:addons/apps_download/models/product_product.py:0
#, python-format
msgid "Error: You cannot create recursive dependency."
msgstr "Erreur : Vous ne pouvez pas créer de dépendance récursive."
@@ -49,12 +57,6 @@ msgstr ""
msgid "Get all Dependencies"
msgstr "Récupérer tous les dépendances"
-#. module: apps_download
-#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:22
-#, python-format
-msgid "Hello world"
-msgstr "Hello world"
-
#. module: apps_download
#: model:ir.model.fields,field_description:apps_download.field_product_product__module_path
msgid "Local Path"
@@ -72,17 +74,38 @@ msgstr "Dépendances du module"
msgid "Modules Dependencies"
msgstr "Dépendances des modules"
+#. module: apps_download
+#: model:product.product,name:apps_download.product_product_100
+#: model:product.product,name:apps_download.product_product_100b
+#: model:product.template,name:apps_download.product_product_100b_product_template
+msgid "Odoo Module 1"
+msgstr ""
+
+#. module: apps_download
+#: model:product.attribute,name:apps_download.attribute_odoo_version
+msgid "Odoo Version"
+msgstr ""
+
#. module: apps_download
#: model:ir.model,name:apps_download.model_product_product
msgid "Product"
msgstr "Produit"
#. module: apps_download
-#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:8
-#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:15
-#, python-format
-msgid "Title"
-msgstr "Titre"
+#: model:product.product,uom_name:apps_download.product_product_100
+#: model:product.product,uom_name:apps_download.product_product_100b
+#: model:product.template,uom_name:apps_download.product_product_100b_product_template
+msgid "Units"
+msgstr ""
+
+#~ msgid "Description"
+#~ msgstr "Description"
+
+#~ msgid "Hello world"
+#~ msgstr "Hello world"
+
+#~ msgid "Title"
+#~ msgstr "Titre"
#~ msgid "Module path"
#~ msgstr "Chemin du module"
diff --git a/apps_download/i18n/it.po b/apps_download/i18n/it.po
index cd763905..d1f0c66c 100644
--- a/apps_download/i18n/it.po
+++ b/apps_download/i18n/it.po
@@ -1,6 +1,6 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
-# * apps_download
+# * apps_download
#
msgid ""
msgstr ""
@@ -17,19 +17,27 @@ msgstr ""
"X-Generator: Weblate 3.10\n"
#. module: apps_download
-#: model:ir.model.fields,field_description:apps_download.field_product_product__dependent_product_ids
-msgid "Dependent Products"
+#: model:product.template.attribute.value,name:apps_download.product_template_100_attribute_odoo_version_value_100
+msgid "10.0"
msgstr ""
#. module: apps_download
-#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:9
-#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:16
-#, python-format
-msgid "Description"
-msgstr "Descrizione"
+#: model:product.template.attribute.value,name:apps_download.product_template_100_attribute_odoo_version_value_110
+msgid "11.0"
+msgstr ""
+
+#. module: apps_download
+#: model:product.public.category,name:apps_download.website_category1
+msgid "Category1"
+msgstr ""
#. module: apps_download
-#: code:addons/apps_download/models/product_product.py:31
+#: model:ir.model.fields,field_description:apps_download.field_product_product__dependent_product_ids
+msgid "Dependent Products"
+msgstr ""
+
+#. module: apps_download
+#: code:addons/apps_download/models/product_product.py:0
#, python-format
msgid "Error: You cannot create recursive dependency."
msgstr "Errore: impossibile creare dipendenze ricorsive."
@@ -46,12 +54,6 @@ msgstr "Genera file ZIP per tutti i prodotti"
msgid "Get all Dependencies"
msgstr ""
-#. module: apps_download
-#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:22
-#, python-format
-msgid "Hello world"
-msgstr ""
-
#. module: apps_download
#: model:ir.model.fields,field_description:apps_download.field_product_product__module_path
msgid "Local Path"
@@ -67,14 +69,32 @@ msgstr "Dipendenze modulo"
msgid "Modules Dependencies"
msgstr "Dipendenze moduli"
+#. module: apps_download
+#: model:product.product,name:apps_download.product_product_100
+#: model:product.product,name:apps_download.product_product_100b
+#: model:product.template,name:apps_download.product_product_100b_product_template
+msgid "Odoo Module 1"
+msgstr ""
+
+#. module: apps_download
+#: model:product.attribute,name:apps_download.attribute_odoo_version
+msgid "Odoo Version"
+msgstr ""
+
#. module: apps_download
#: model:ir.model,name:apps_download.model_product_product
msgid "Product"
msgstr "Prodotto"
#. module: apps_download
-#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:8
-#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:15
-#, python-format
-msgid "Title"
-msgstr "Titolo"
+#: model:product.product,uom_name:apps_download.product_product_100
+#: model:product.product,uom_name:apps_download.product_product_100b
+#: model:product.template,uom_name:apps_download.product_product_100b_product_template
+msgid "Units"
+msgstr ""
+
+#~ msgid "Description"
+#~ msgstr "Descrizione"
+
+#~ msgid "Title"
+#~ msgstr "Titolo"
diff --git a/apps_download/i18n/pt_BR.po b/apps_download/i18n/pt_BR.po
index 2a20d40f..e2a695f7 100644
--- a/apps_download/i18n/pt_BR.po
+++ b/apps_download/i18n/pt_BR.po
@@ -16,20 +16,28 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 3.8\n"
+#. module: apps_download
+#: model:product.template.attribute.value,name:apps_download.product_template_100_attribute_odoo_version_value_100
+msgid "10.0"
+msgstr ""
+
+#. module: apps_download
+#: model:product.template.attribute.value,name:apps_download.product_template_100_attribute_odoo_version_value_110
+msgid "11.0"
+msgstr ""
+
+#. module: apps_download
+#: model:product.public.category,name:apps_download.website_category1
+msgid "Category1"
+msgstr "Categoria1"
+
#. module: apps_download
#: model:ir.model.fields,field_description:apps_download.field_product_product__dependent_product_ids
msgid "Dependent Products"
msgstr "Produtos dependentes"
#. module: apps_download
-#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:9
-#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:16
-#, python-format
-msgid "Description"
-msgstr "Descrição"
-
-#. module: apps_download
-#: code:addons/apps_download/models/product_product.py:31
+#: code:addons/apps_download/models/product_product.py:0
#, python-format
msgid "Error: You cannot create recursive dependency."
msgstr "Erro: você não pode criar dependência recursiva."
@@ -46,12 +54,6 @@ msgstr "Gere arquivos ZIP para todos os produtos"
msgid "Get all Dependencies"
msgstr "Obter todas as dependências"
-#. module: apps_download
-#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:22
-#, python-format
-msgid "Hello world"
-msgstr "Olá mundo"
-
#. module: apps_download
#: model:ir.model.fields,field_description:apps_download.field_product_product__module_path
msgid "Local Path"
@@ -67,26 +69,39 @@ msgstr "Dependências dos módulos"
msgid "Modules Dependencies"
msgstr "Dependências dos módulos"
+#. module: apps_download
+#: model:product.product,name:apps_download.product_product_100
+#: model:product.product,name:apps_download.product_product_100b
+#: model:product.template,name:apps_download.product_product_100b_product_template
+msgid "Odoo Module 1"
+msgstr "Módulo Odoo 1"
+
+#. module: apps_download
+#: model:product.attribute,name:apps_download.attribute_odoo_version
+msgid "Odoo Version"
+msgstr ""
+
#. module: apps_download
#: model:ir.model,name:apps_download.model_product_product
msgid "Product"
msgstr "Produto"
#. module: apps_download
-#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:8
-#: code:addons/apps_download/tests/test_modules/broken_lint/case_fields.py:15
-#, python-format
-msgid "Title"
-msgstr "Título"
+#: model:product.product,uom_name:apps_download.product_product_100
+#: model:product.product,uom_name:apps_download.product_product_100b
+#: model:product.template,uom_name:apps_download.product_product_100b_product_template
+#, fuzzy
+msgid "Units"
+msgstr "Unidade(s)"
-#~ msgid "Category1"
-#~ msgstr "Categoria1"
+#~ msgid "Description"
+#~ msgstr "Descrição"
-#~ msgid "Odoo Module 1"
-#~ msgstr "Módulo Odoo 1"
+#~ msgid "Hello world"
+#~ msgstr "Olá mundo"
-#~ msgid "Unit(s)"
-#~ msgstr "Unidade(s)"
+#~ msgid "Title"
+#~ msgstr "Título"
#~ msgid "kg"
#~ msgstr "kg"
diff --git a/apps_download/models/product_product.py b/apps_download/models/product_product.py
index 3604b724..4c08bb3d 100644
--- a/apps_download/models/product_product.py
+++ b/apps_download/models/product_product.py
@@ -44,7 +44,6 @@ def child_dependency(self, children):
res |= self.child_dependency(child.dependent_product_ids)
return res
- @api.multi
def create_dependency_list(self):
ret_val = {}
for product in self:
@@ -55,11 +54,9 @@ def create_dependency_list(self):
)
return ret_val
- @api.multi
def _get_module_path(self):
return self.module_path + "/" + self.odoo_module_version_id.technical_name
- @api.multi
def generate_zip_file(self):
for product in self.filtered("module_path"):
tmp_dir = tempfile.mkdtemp()
@@ -119,20 +116,21 @@ def generate_zip_file(self):
except Exception as exc:
_logger.error(
"Error creating attachment %s Error is: %s"
- % (tmp_zip_file, exc.message)
+ % (tmp_zip_file, str(exc))
)
try:
shutil.rmtree(tmp_dir)
except OSError as exc:
_logger.warning(
- "Could not remove Tempdir {}, Errormsg {}".format(tmp_dir, exc.message)
+ "Could not remove Tempdir {}, Errormsg {}".format(tmp_dir, str(exc))
)
try:
shutil.rmtree(tmp_dir_2)
except OSError as exc:
_logger.warning(
- "Could not remove Tempdir 2 %s, Errormsg %s"
- % (tmp_dir, exc.message)
+ "Could not remove Tempdir 2 {}, Errormsg {}".format(
+ tmp_dir, str(exc)
+ )
)
@api.model
diff --git a/apps_download/readme/CONTRIBUTORS.rst b/apps_download/readme/CONTRIBUTORS.rst
index 2af0070d..6fdd7112 100644
--- a/apps_download/readme/CONTRIBUTORS.rst
+++ b/apps_download/readme/CONTRIBUTORS.rst
@@ -4,3 +4,4 @@
* `Tecnativa `_:
* Víctor M.M. Torres
+ * Alexandre D. Díaz
diff --git a/apps_download/static/description/index.html b/apps_download/static/description/index.html
index 93b674e0..0b142035 100644
--- a/apps_download/static/description/index.html
+++ b/apps_download/static/description/index.html
@@ -367,7 +367,7 @@ Product Download for Appstore
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
Providing facility for the maintain dependency of Module at level of product
and creating Zip file with all dependent modules.
Table of contents
@@ -394,7 +394,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.
@@ -415,6 +415,7 @@
Eric Caudal <eric.caudal@elico-corp.com >
Tecnativa :
Víctor M.M. Torres
+Alexandre D. Díaz
@@ -426,7 +427,7 @@
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/apps-store project on GitHub.
+
This module is part of the OCA/apps-store project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute .
diff --git a/apps_download/tests/test_modules/broken_lint/README.rst b/apps_download/tests/test_modules/broken_lint/README.rst
new file mode 100644
index 00000000..21738b7c
--- /dev/null
+++ b/apps_download/tests/test_modules/broken_lint/README.rst
@@ -0,0 +1 @@
+File for test
diff --git a/apps_download/tests/test_modules/broken_lint/__init__.py b/apps_download/tests/test_modules/broken_lint/__init__.py
index 07093ef7..6305ed30 100644
--- a/apps_download/tests/test_modules/broken_lint/__init__.py
+++ b/apps_download/tests/test_modules/broken_lint/__init__.py
@@ -1,3 +1 @@
-from . import case_import
-from . import case_fields
-from . import eval_referenced
+# none
diff --git a/apps_download/tests/test_modules/broken_lint/__manifest__.py b/apps_download/tests/test_modules/broken_lint/__manifest__.py
index 2a0428a9..538493fb 100644
--- a/apps_download/tests/test_modules/broken_lint/__manifest__.py
+++ b/apps_download/tests/test_modules/broken_lint/__manifest__.py
@@ -2,7 +2,7 @@
"name": "Broken module for lint tests",
"license": "AGPL-3",
"author": "Odoo Community Association (OCA)",
- "version": "1.0",
+ "version": "13.0.1.0.0",
"depends": [],
"data": [],
"test": [],
diff --git a/apps_download/tests/test_modules/broken_lint/case_deprecated.py b/apps_download/tests/test_modules/broken_lint/case_deprecated.py
deleted file mode 100644
index df324149..00000000
--- a/apps_download/tests/test_modules/broken_lint/case_deprecated.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# w0402 - deprecated module
-import pdb # pylint: disable=W0403
-
-import ipdb # pylint: disable=W0403
-import pudb # pylint: disable=W0403
-from openerp.osv import osv # pylint: disable=W0403
-
-
-def avoid_imported_but_unused(self):
- # avoid imported but unused
- all_imports = (
- pdb,
- pudb,
- ipdb,
- osv,
- )
- eval("Not use eval")
- return all_imports
diff --git a/apps_download/tests/test_modules/broken_lint/case_fields.py b/apps_download/tests/test_modules/broken_lint/case_fields.py
deleted file mode 100644
index 05235092..00000000
--- a/apps_download/tests/test_modules/broken_lint/case_fields.py
+++ /dev/null
@@ -1,21 +0,0 @@
-from openerp import fields, models
-from openerp.tools.translate import _
-
-
-class MyExampleField(models.Model):
- _name = "my.example.field"
- name = fields.Char(_("Title"), size=100)
- description = fields.Char(string=_("Description"), size=100)
-
-
-class MyExampleField2(models.Model):
- _name = "my.example.field2"
-
- name = fields.Char(_("Title"), size=100)
- description = fields.Char(name=_("Description"), size=100)
-
- def my_method1(self, var):
- pass
-
- def my_method2(self):
- return self.my_method1(_("Hello world"))
diff --git a/apps_download/tests/test_modules/broken_lint/case_import.py b/apps_download/tests/test_modules/broken_lint/case_import.py
deleted file mode 100644
index 80d25c68..00000000
--- a/apps_download/tests/test_modules/broken_lint/case_import.py
+++ /dev/null
@@ -1,40 +0,0 @@
-import openerp
-from openerp import api
-from openerp.api import one
-from openerp.exceptions import AccessError as AE, ValidationError, Warning as UserError2
-
-
-class UseUnusedImport(object):
- def method1(self):
- return UserError, OtherName, Warning, AE, ValidationError, UserError2
-
-
-class ApiOne(object):
- @api.one
- def copy():
- pass
-
-
-class One(object):
- @one
- def copy():
- pass
-
-
-class OpenerpApiOne(object):
- @openerp.api.one
- def copy():
- pass
-
-
-class WOApiOne(object):
- # copy without api.one decorator
- def copy():
- pass
-
-
-class ApiOneMultiTogether(object):
- @api.multi
- @api.one
- def copy():
- pass
diff --git a/apps_download/tests/test_modules/broken_lint/eval_referenced.py b/apps_download/tests/test_modules/broken_lint/eval_referenced.py
deleted file mode 100644
index 6ef28298..00000000
--- a/apps_download/tests/test_modules/broken_lint/eval_referenced.py
+++ /dev/null
@@ -1,17 +0,0 @@
-def eval_from_param(param):
- """eval used from param"""
- param("c = 2")
-
-
-def eval_from_other():
- """eval used from many ways"""
- my_dict = {
- "my_eval": eval, # [eval-used]
- }
- my_list = [eval] # [eval-used]
-
- my_var = eval # [eval-used]
- # inferred case
- my_var("d = 3") # [eval-used]
- eval_from_param(eval) # [eval-used]
- return my_dict, my_list
diff --git a/apps_download/tests/test_modules/second_module/README.rst b/apps_download/tests/test_modules/second_module/README.rst
new file mode 100644
index 00000000..21738b7c
--- /dev/null
+++ b/apps_download/tests/test_modules/second_module/README.rst
@@ -0,0 +1 @@
+File for test
diff --git a/apps_download/tests/test_modules/second_module/__manifest__.py b/apps_download/tests/test_modules/second_module/__manifest__.py
index bc16ba35..81d84039 100644
--- a/apps_download/tests/test_modules/second_module/__manifest__.py
+++ b/apps_download/tests/test_modules/second_module/__manifest__.py
@@ -1,7 +1,7 @@
{
"name": "Second empty module for tests",
- "version": "8.0.1.0.0",
+ "version": "13.0.1.0.0",
"author": "Odoo Community Association (OCA)",
"license": "AGPL-3",
- "depends": ["base", "test_module",],
+ "depends": ["base", "test_module"],
}
diff --git a/apps_download/tests/test_modules/test_module/__manifest__.py b/apps_download/tests/test_modules/test_module/__manifest__.py
index 39d0b009..9eef5eee 100644
--- a/apps_download/tests/test_modules/test_module/__manifest__.py
+++ b/apps_download/tests/test_modules/test_module/__manifest__.py
@@ -2,7 +2,7 @@
"name": "Empty module for tests",
"license": "AGPL-3",
"author": "Odoo Community Association (OCA)",
- "version": "1.0",
- "depends": ["base", "dependency_module",], # test dependency repo installation
- "data": ["security/ir.model.access.csv",],
+ "version": "13.0.1.0.0",
+ "depends": ["base", "dependency_module"], # test dependency repo installation
+ "data": ["security/ir.model.access.csv"],
}
From fef330f9b9535198fdd3ba03ba824da1ff49a396 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=C3=A3o=20Marques?=
Date: Mon, 7 Jun 2021 15:01:06 +0100
Subject: [PATCH 10/23] [FIX] apps_download: Check correct attribute
product.product has no attribute_value_ids, causing errors like [13.0] apps_download: Error while trying to download an app (base_import_async) #80
This checks the correct product_template_attribute_value_ids associated
---
apps_download/models/product_product.py | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/apps_download/models/product_product.py b/apps_download/models/product_product.py
index 4c08bb3d..99702eb0 100644
--- a/apps_download/models/product_product.py
+++ b/apps_download/models/product_product.py
@@ -81,13 +81,11 @@ def generate_zip_file(self):
module_path = product._get_module_path()
shutil.copytree(module_path, tmp_module_path)
time_version_value = time.strftime("_%y%m%d_%H%M%S")
- if product.attribute_value_ids:
+ attr_values = product.product_template_attribute_value_ids
+ if attr_values:
time_version_value = "_{}{}".format(
"_".join(
- [
- name.replace(".", "_")
- for name in product.attribute_value_ids.mapped("name")
- ]
+ [name.replace(".", "_") for name in attr_values.mapped("name")]
),
time_version_value,
)
From 9c9916f66168d2025c4e30817f79de1b757ae42f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=C3=A3o=20Marques?=
Date: Mon, 7 Jun 2021 15:02:43 +0100
Subject: [PATCH 11/23] [IMP] apps_download: better error message
Give a proper warning when the module's code does not exist in disk yet instead of an exception
---
apps_download/models/product_product.py | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/apps_download/models/product_product.py b/apps_download/models/product_product.py
index 99702eb0..b7f1c3f6 100644
--- a/apps_download/models/product_product.py
+++ b/apps_download/models/product_product.py
@@ -10,7 +10,7 @@
import time
from odoo import _, api, fields, models
-from odoo.exceptions import ValidationError
+from odoo.exceptions import UserError, ValidationError
_logger = logging.getLogger(__name__)
@@ -79,7 +79,16 @@ def generate_zip_file(self):
tmp_dir, product.odoo_module_version_id.technical_name
)
module_path = product._get_module_path()
- shutil.copytree(module_path, tmp_module_path)
+ try:
+ shutil.copytree(module_path, tmp_module_path)
+ except FileNotFoundError:
+ raise UserError(
+ _(
+ "Module code not downloaded yet."
+ " Please initialize the code in the associated"
+ " Github Repository Branch by downloading the source code."
+ )
+ )
time_version_value = time.strftime("_%y%m%d_%H%M%S")
attr_values = product.product_template_attribute_value_ids
if attr_values:
From 350f70351d9b3b5930f08873918f786dc9d3e620 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=C3=A3o=20Marques?=
Date: Tue, 8 Jun 2021 08:31:54 +0100
Subject: [PATCH 12/23] [FIX] apps_product_creator: Add dependent_product_ids
This field is needed in this module but was only being declared in the apps_download module.
apps_download depends on this, so we can move the field declaration here.
TT30343
---
apps_download/i18n/apps_download.pot | 13 ++++++++-----
apps_download/i18n/es.po | 16 +++++++++++-----
apps_download/i18n/fr.po | 16 +++++++++++-----
apps_download/i18n/it.po | 13 ++++++++-----
apps_download/i18n/pt_BR.po | 16 +++++++++++-----
apps_download/models/product_product.py | 7 -------
6 files changed, 49 insertions(+), 32 deletions(-)
diff --git a/apps_download/i18n/apps_download.pot b/apps_download/i18n/apps_download.pot
index 98cbe4b1..3c9066c0 100644
--- a/apps_download/i18n/apps_download.pot
+++ b/apps_download/i18n/apps_download.pot
@@ -28,11 +28,6 @@ msgstr ""
msgid "Category1"
msgstr ""
-#. module: apps_download
-#: model:ir.model.fields,field_description:apps_download.field_product_product__dependent_product_ids
-msgid "Dependent Products"
-msgstr ""
-
#. module: apps_download
#: code:addons/apps_download/models/product_product.py:0
#, python-format
@@ -61,6 +56,14 @@ msgstr ""
msgid "Module Dependencies"
msgstr ""
+#. module: apps_download
+#: code:addons/apps_download/models/product_product.py:0
+#, python-format
+msgid ""
+"Module code not downloaded yet. Please initialize the code in the associated"
+" Github Repository Branch by downloading the source code."
+msgstr ""
+
#. module: apps_download
#: model_terms:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
msgid "Modules Dependencies"
diff --git a/apps_download/i18n/es.po b/apps_download/i18n/es.po
index c5310d0b..0d95a07d 100644
--- a/apps_download/i18n/es.po
+++ b/apps_download/i18n/es.po
@@ -34,11 +34,6 @@ msgstr ""
msgid "Category1"
msgstr ""
-#. module: apps_download
-#: model:ir.model.fields,field_description:apps_download.field_product_product__dependent_product_ids
-msgid "Dependent Products"
-msgstr "Productos dependientes"
-
#. module: apps_download
#: code:addons/apps_download/models/product_product.py:0
#, python-format
@@ -69,6 +64,14 @@ msgstr "Ruta local"
msgid "Module Dependencies"
msgstr "Dependencia del módulo"
+#. module: apps_download
+#: code:addons/apps_download/models/product_product.py:0
+#, python-format
+msgid ""
+"Module code not downloaded yet. Please initialize the code in the associated "
+"Github Repository Branch by downloading the source code."
+msgstr ""
+
#. module: apps_download
#: model_terms:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
#, fuzzy
@@ -99,6 +102,9 @@ msgstr "Producto"
msgid "Units"
msgstr ""
+#~ msgid "Dependent Products"
+#~ msgstr "Productos dependientes"
+
#~ msgid "Description"
#~ msgstr "Descripción"
diff --git a/apps_download/i18n/fr.po b/apps_download/i18n/fr.po
index b65114ce..faf86fa4 100644
--- a/apps_download/i18n/fr.po
+++ b/apps_download/i18n/fr.po
@@ -33,11 +33,6 @@ msgstr ""
msgid "Category1"
msgstr ""
-#. module: apps_download
-#: model:ir.model.fields,field_description:apps_download.field_product_product__dependent_product_ids
-msgid "Dependent Products"
-msgstr "Produits dépendants"
-
#. module: apps_download
#: code:addons/apps_download/models/product_product.py:0
#, python-format
@@ -68,6 +63,14 @@ msgstr ""
msgid "Module Dependencies"
msgstr "Dépendances du module"
+#. module: apps_download
+#: code:addons/apps_download/models/product_product.py:0
+#, python-format
+msgid ""
+"Module code not downloaded yet. Please initialize the code in the associated "
+"Github Repository Branch by downloading the source code."
+msgstr ""
+
#. module: apps_download
#: model_terms:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
#, fuzzy
@@ -98,6 +101,9 @@ msgstr "Produit"
msgid "Units"
msgstr ""
+#~ msgid "Dependent Products"
+#~ msgstr "Produits dépendants"
+
#~ msgid "Description"
#~ msgstr "Description"
diff --git a/apps_download/i18n/it.po b/apps_download/i18n/it.po
index d1f0c66c..900d3bc1 100644
--- a/apps_download/i18n/it.po
+++ b/apps_download/i18n/it.po
@@ -31,11 +31,6 @@ msgstr ""
msgid "Category1"
msgstr ""
-#. module: apps_download
-#: model:ir.model.fields,field_description:apps_download.field_product_product__dependent_product_ids
-msgid "Dependent Products"
-msgstr ""
-
#. module: apps_download
#: code:addons/apps_download/models/product_product.py:0
#, python-format
@@ -64,6 +59,14 @@ msgstr "Percorso locale"
msgid "Module Dependencies"
msgstr "Dipendenze modulo"
+#. module: apps_download
+#: code:addons/apps_download/models/product_product.py:0
+#, python-format
+msgid ""
+"Module code not downloaded yet. Please initialize the code in the associated "
+"Github Repository Branch by downloading the source code."
+msgstr ""
+
#. module: apps_download
#: model_terms:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
msgid "Modules Dependencies"
diff --git a/apps_download/i18n/pt_BR.po b/apps_download/i18n/pt_BR.po
index e2a695f7..ace8502d 100644
--- a/apps_download/i18n/pt_BR.po
+++ b/apps_download/i18n/pt_BR.po
@@ -31,11 +31,6 @@ msgstr ""
msgid "Category1"
msgstr "Categoria1"
-#. module: apps_download
-#: model:ir.model.fields,field_description:apps_download.field_product_product__dependent_product_ids
-msgid "Dependent Products"
-msgstr "Produtos dependentes"
-
#. module: apps_download
#: code:addons/apps_download/models/product_product.py:0
#, python-format
@@ -64,6 +59,14 @@ msgstr "Caminho Local"
msgid "Module Dependencies"
msgstr "Dependências dos módulos"
+#. module: apps_download
+#: code:addons/apps_download/models/product_product.py:0
+#, python-format
+msgid ""
+"Module code not downloaded yet. Please initialize the code in the associated "
+"Github Repository Branch by downloading the source code."
+msgstr ""
+
#. module: apps_download
#: model_terms:ir.ui.view,arch_db:apps_download.view_product_product_view_dependent_form
msgid "Modules Dependencies"
@@ -94,6 +97,9 @@ msgstr "Produto"
msgid "Units"
msgstr "Unidade(s)"
+#~ msgid "Dependent Products"
+#~ msgstr "Produtos dependentes"
+
#~ msgid "Description"
#~ msgstr "Descrição"
diff --git a/apps_download/models/product_product.py b/apps_download/models/product_product.py
index b7f1c3f6..f545e0c7 100644
--- a/apps_download/models/product_product.py
+++ b/apps_download/models/product_product.py
@@ -18,13 +18,6 @@
class ProductProduct(models.Model):
_inherit = "product.product"
- dependent_product_ids = fields.Many2many(
- "product.product",
- "product_product_dependent_rel",
- "src_id",
- "dest_id",
- string="Dependent Products",
- )
module_path = fields.Char(
related="odoo_module_version_id.repository_branch_id.local_path", readonly=True
)
From 75c79ecf90a1baf8af00f8c88973fd8fbca9cc07 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=C3=A3o=20Marques?=
Date: Wed, 9 Jun 2021 11:27:26 +0100
Subject: [PATCH 13/23] [FIX] apps_download: Create ir.attachment correctly
Field datas_fname is no longer used
TT30343
---
apps_download/models/product_product.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps_download/models/product_product.py b/apps_download/models/product_product.py
index f545e0c7..15a84c3d 100644
--- a/apps_download/models/product_product.py
+++ b/apps_download/models/product_product.py
@@ -101,7 +101,7 @@ def generate_zip_file(self):
self.env["ir.attachment"].create(
{
"datas": data_encode,
- "datas_fname": (
+ "store_fname": (
product.name.replace(" ", "-")
+ time_version_value
+ ".zip"
From 58003e9e8e9299d1aae80084c449b6833d3fc9c0 Mon Sep 17 00:00:00 2001
From: Ernesto Tejeda
Date: Tue, 10 Aug 2021 10:22:28 -0400
Subject: [PATCH 14/23] [MIG] apps_download: Migration to 14.0
---
apps_download/README.rst | 11 +-
apps_download/__manifest__.py | 5 +-
apps_download/demo/product_template_demo.xml | 125 ------------------
apps_download/i18n/es.po | 15 ---
apps_download/i18n/fr.po | 15 ---
apps_download/i18n/it.po | 6 -
apps_download/i18n/pt_BR.po | 15 ---
apps_download/readme/CONTRIBUTORS.rst | 1 +
apps_download/static/description/index.html | 7 +-
apps_download/tests/test_app_download.py | 2 +-
.../test_modules/broken_lint/__manifest__.py | 1 +
.../second_module/__manifest__.py | 1 +
.../test_modules/test_module/__manifest__.py | 1 +
13 files changed, 17 insertions(+), 188 deletions(-)
delete mode 100644 apps_download/demo/product_template_demo.xml
diff --git a/apps_download/README.rst b/apps_download/README.rst
index 1614a80e..937d74ab 100644
--- a/apps_download/README.rst
+++ b/apps_download/README.rst
@@ -14,13 +14,13 @@ Product Download for Appstore
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fapps--store-lightgray.png?logo=github
- :target: https://github.com/OCA/apps-store/tree/13.0/apps_download
+ :target: https://github.com/OCA/apps-store/tree/14.0/apps_download
:alt: OCA/apps-store
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/apps-store-13-0/apps-store-13-0-apps_download
+ :target: https://translation.odoo-community.org/projects/apps-store-14-0/apps-store-14-0-apps_download
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/249/13.0
+ :target: https://runbot.odoo-community.org/runbot/249/14.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -44,7 +44,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.
@@ -68,6 +68,7 @@ Contributors
* Víctor M.M. Torres
* Alexandre D. Díaz
+ * Ernesto Tejeda
Maintainers
~~~~~~~~~~~
@@ -82,6 +83,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/apps-store `_ project on GitHub.
+This module is part of the `OCA/apps-store `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/apps_download/__manifest__.py b/apps_download/__manifest__.py
index 1cd18e9c..53723bb4 100644
--- a/apps_download/__manifest__.py
+++ b/apps_download/__manifest__.py
@@ -4,8 +4,8 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Product Download for Appstore",
- "version": "13.0.1.0.0",
- "author": "BizzAppDev, AgentERP, Elico Corp, " "Odoo Community Association (OCA)",
+ "version": "14.0.1.0.0",
+ "author": "BizzAppDev, AgentERP, Elico Corp, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/apps-store",
"license": "AGPL-3",
"category": "Sales",
@@ -17,7 +17,6 @@
],
"summary": "Product Download for Appstore",
"data": ["views/product_template_view.xml", "data/cron_scheduler.xml"],
- "demo": ["demo/product_template_demo.xml"],
"installable": True,
"auto_install": False,
"application": False,
diff --git a/apps_download/demo/product_template_demo.xml b/apps_download/demo/product_template_demo.xml
deleted file mode 100644
index bf793735..00000000
--- a/apps_download/demo/product_template_demo.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
-
-
- Odoo Version
-
-
- Category1
-
-
- Organization1
- login
-
-
- Repository1
-
-
-
- Master
-
-
-
- odoo_module1
-
-
- odoo_module2
-
-
- Odoo Module 1
- odoo_module1
-
-
- AGPL-3
- Summary Test
- Website Test
- Description Test
- 10.0
- OCA
- base
- {}
- /repo/10.0/odoo_module_1
-
-
- Odoo Module 2
- odoo_module2
-
-
- AGPL-3
- Summary Test
- Website Test
- Description Test
- 11.0
- OCA
- base
- {}
- /repo/11.0/odoo_module_2
-
-
-
- Odoo Module 1
- service
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/apps_download/i18n/es.po b/apps_download/i18n/es.po
index 0d95a07d..c294d924 100644
--- a/apps_download/i18n/es.po
+++ b/apps_download/i18n/es.po
@@ -101,18 +101,3 @@ msgstr "Producto"
#: model:product.template,uom_name:apps_download.product_product_100b_product_template
msgid "Units"
msgstr ""
-
-#~ msgid "Dependent Products"
-#~ msgstr "Productos dependientes"
-
-#~ msgid "Description"
-#~ msgstr "Descripción"
-
-#~ msgid "Hello world"
-#~ msgstr "Hola mundo"
-
-#~ msgid "Title"
-#~ msgstr "Título"
-
-#~ msgid "Module path"
-#~ msgstr "Ruta del módulo"
diff --git a/apps_download/i18n/fr.po b/apps_download/i18n/fr.po
index faf86fa4..e44ef727 100644
--- a/apps_download/i18n/fr.po
+++ b/apps_download/i18n/fr.po
@@ -100,18 +100,3 @@ msgstr "Produit"
#: model:product.template,uom_name:apps_download.product_product_100b_product_template
msgid "Units"
msgstr ""
-
-#~ msgid "Dependent Products"
-#~ msgstr "Produits dépendants"
-
-#~ msgid "Description"
-#~ msgstr "Description"
-
-#~ msgid "Hello world"
-#~ msgstr "Hello world"
-
-#~ msgid "Title"
-#~ msgstr "Titre"
-
-#~ msgid "Module path"
-#~ msgstr "Chemin du module"
diff --git a/apps_download/i18n/it.po b/apps_download/i18n/it.po
index 900d3bc1..78d72c00 100644
--- a/apps_download/i18n/it.po
+++ b/apps_download/i18n/it.po
@@ -95,9 +95,3 @@ msgstr "Prodotto"
#: model:product.template,uom_name:apps_download.product_product_100b_product_template
msgid "Units"
msgstr ""
-
-#~ msgid "Description"
-#~ msgstr "Descrizione"
-
-#~ msgid "Title"
-#~ msgstr "Titolo"
diff --git a/apps_download/i18n/pt_BR.po b/apps_download/i18n/pt_BR.po
index ace8502d..c426a882 100644
--- a/apps_download/i18n/pt_BR.po
+++ b/apps_download/i18n/pt_BR.po
@@ -96,18 +96,3 @@ msgstr "Produto"
#, fuzzy
msgid "Units"
msgstr "Unidade(s)"
-
-#~ msgid "Dependent Products"
-#~ msgstr "Produtos dependentes"
-
-#~ msgid "Description"
-#~ msgstr "Descrição"
-
-#~ msgid "Hello world"
-#~ msgstr "Olá mundo"
-
-#~ msgid "Title"
-#~ msgstr "Título"
-
-#~ msgid "kg"
-#~ msgstr "kg"
diff --git a/apps_download/readme/CONTRIBUTORS.rst b/apps_download/readme/CONTRIBUTORS.rst
index 6fdd7112..b98c2322 100644
--- a/apps_download/readme/CONTRIBUTORS.rst
+++ b/apps_download/readme/CONTRIBUTORS.rst
@@ -5,3 +5,4 @@
* Víctor M.M. Torres
* Alexandre D. Díaz
+ * Ernesto Tejeda
diff --git a/apps_download/static/description/index.html b/apps_download/static/description/index.html
index 0b142035..d4c21abd 100644
--- a/apps_download/static/description/index.html
+++ b/apps_download/static/description/index.html
@@ -367,7 +367,7 @@ Product Download for Appstore
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
Providing facility for the maintain dependency of Module at level of product
and creating Zip file with all dependent modules.
Table of contents
@@ -394,7 +394,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.
@@ -416,6 +416,7 @@
Tecnativa :
Víctor M.M. Torres
Alexandre D. Díaz
+Ernesto Tejeda
@@ -427,7 +428,7 @@
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/apps-store project on GitHub.
+
This module is part of the OCA/apps-store project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute .
diff --git a/apps_download/tests/test_app_download.py b/apps_download/tests/test_app_download.py
index 33424db9..d4490ba6 100644
--- a/apps_download/tests/test_app_download.py
+++ b/apps_download/tests/test_app_download.py
@@ -12,7 +12,7 @@ class TestAppDownload(TransactionCase):
"""Test for the Add download"""
def setUp(self):
- super(TestAppDownload, self).setUp()
+ super().setUp()
test_path = os.path.dirname(os.path.realpath(__file__))
module_path = os.path.join(test_path, "test_modules", "broken_lint")
self.sub_child_product = self.env["product.product"].create(
diff --git a/apps_download/tests/test_modules/broken_lint/__manifest__.py b/apps_download/tests/test_modules/broken_lint/__manifest__.py
index 538493fb..fe5656f1 100644
--- a/apps_download/tests/test_modules/broken_lint/__manifest__.py
+++ b/apps_download/tests/test_modules/broken_lint/__manifest__.py
@@ -1,3 +1,4 @@
+# pylint: disable=manifest-version-format
{
"name": "Broken module for lint tests",
"license": "AGPL-3",
diff --git a/apps_download/tests/test_modules/second_module/__manifest__.py b/apps_download/tests/test_modules/second_module/__manifest__.py
index 81d84039..713829da 100644
--- a/apps_download/tests/test_modules/second_module/__manifest__.py
+++ b/apps_download/tests/test_modules/second_module/__manifest__.py
@@ -1,3 +1,4 @@
+# pylint: disable=manifest-version-format
{
"name": "Second empty module for tests",
"version": "13.0.1.0.0",
diff --git a/apps_download/tests/test_modules/test_module/__manifest__.py b/apps_download/tests/test_modules/test_module/__manifest__.py
index 9eef5eee..c3e2f70c 100644
--- a/apps_download/tests/test_modules/test_module/__manifest__.py
+++ b/apps_download/tests/test_modules/test_module/__manifest__.py
@@ -1,3 +1,4 @@
+# pylint: disable=manifest-version-format
{
"name": "Empty module for tests",
"license": "AGPL-3",
From c3d1842b1a6c7112823bbf4f9a5cbe9eff8a6aac Mon Sep 17 00:00:00 2001
From: oca-travis
Date: Tue, 24 Aug 2021 12:59:29 +0000
Subject: [PATCH 15/23] [UPD] Update apps_download.pot
---
apps_download/i18n/apps_download.pot | 45 ++++++++--------------------
1 file changed, 13 insertions(+), 32 deletions(-)
diff --git a/apps_download/i18n/apps_download.pot b/apps_download/i18n/apps_download.pot
index 3c9066c0..6727d89c 100644
--- a/apps_download/i18n/apps_download.pot
+++ b/apps_download/i18n/apps_download.pot
@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 13.0\n"
+"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -14,18 +14,8 @@ msgstr ""
"Plural-Forms: \n"
#. module: apps_download
-#: model:product.template.attribute.value,name:apps_download.product_template_100_attribute_odoo_version_value_100
-msgid "10.0"
-msgstr ""
-
-#. module: apps_download
-#: model:product.template.attribute.value,name:apps_download.product_template_100_attribute_odoo_version_value_110
-msgid "11.0"
-msgstr ""
-
-#. module: apps_download
-#: model:product.public.category,name:apps_download.website_category1
-msgid "Category1"
+#: model:ir.model.fields,field_description:apps_download.field_product_product__display_name
+msgid "Display Name"
msgstr ""
#. module: apps_download
@@ -46,6 +36,16 @@ msgstr ""
msgid "Get all Dependencies"
msgstr ""
+#. module: apps_download
+#: model:ir.model.fields,field_description:apps_download.field_product_product__id
+msgid "ID"
+msgstr ""
+
+#. module: apps_download
+#: model:ir.model.fields,field_description:apps_download.field_product_product____last_update
+msgid "Last Modified on"
+msgstr ""
+
#. module: apps_download
#: model:ir.model.fields,field_description:apps_download.field_product_product__module_path
msgid "Local Path"
@@ -69,26 +69,7 @@ msgstr ""
msgid "Modules Dependencies"
msgstr ""
-#. module: apps_download
-#: model:product.product,name:apps_download.product_product_100
-#: model:product.product,name:apps_download.product_product_100b
-#: model:product.template,name:apps_download.product_product_100b_product_template
-msgid "Odoo Module 1"
-msgstr ""
-
-#. module: apps_download
-#: model:product.attribute,name:apps_download.attribute_odoo_version
-msgid "Odoo Version"
-msgstr ""
-
#. module: apps_download
#: model:ir.model,name:apps_download.model_product_product
msgid "Product"
msgstr ""
-
-#. module: apps_download
-#: model:product.product,uom_name:apps_download.product_product_100
-#: model:product.product,uom_name:apps_download.product_product_100b
-#: model:product.template,uom_name:apps_download.product_product_100b_product_template
-msgid "Units"
-msgstr ""
From 3630312af426dbe4779c82bb6149a9ae11ed71c8 Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Sun, 3 Sep 2023 11:46:50 +0000
Subject: [PATCH 16/23] [UPD] README.rst
---
apps_download/README.rst | 15 ++++----
apps_download/static/description/index.html | 38 +++++++++++----------
2 files changed, 29 insertions(+), 24 deletions(-)
diff --git a/apps_download/README.rst b/apps_download/README.rst
index 937d74ab..ac7ba075 100644
--- a/apps_download/README.rst
+++ b/apps_download/README.rst
@@ -2,10 +2,13 @@
Product Download for Appstore
=============================
-.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+..
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ !! source digest: sha256:32fbee542f09484f67391d83b88d5fe32e62109e25950f51ac1d1e2db5739fcf
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
@@ -19,11 +22,11 @@ Product Download for Appstore
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/apps-store-14-0/apps-store-14-0-apps_download
:alt: Translate me on Weblate
-.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/249/14.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/apps-store&target_branch=14.0
+ :alt: Try me on Runboat
-|badge1| |badge2| |badge3| |badge4| |badge5|
+|badge1| |badge2| |badge3| |badge4| |badge5|
Providing facility for the maintain dependency of Module at level of product
and creating Zip file with all dependent modules.
@@ -43,7 +46,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/apps_download/static/description/index.html b/apps_download/static/description/index.html
index d4c21abd..3bd93aef 100644
--- a/apps_download/static/description/index.html
+++ b/apps_download/static/description/index.html
@@ -1,20 +1,20 @@
-
+
-
+
Product Download for Appstore
-
-
Product Download for Appstore
+
+
+
+
+
+
+
Product Download for Appstore
-
+
Providing facility for the maintain dependency of Module at level of product
and creating Zip file with all dependent modules.
Table of contents
@@ -386,13 +391,13 @@
Product Download for Appstore
-
+
Creation of an error queue if the exception occurs while generating zip file of the product
-
+
Bugs are tracked on GitHub Issues .
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
@@ -400,9 +405,9 @@
Do not contact contributors directly about support or help with technical issues.
-
+
-
+
BizzAppDev
AgentERP
@@ -410,7 +415,7 @@
-
+
This module is maintained by the OCA.
@@ -442,5 +447,6 @@
+
From fd93285060e879ecde989a003b6fe97a0762a74e Mon Sep 17 00:00:00 2001
From: Nikos Tsirintanis
Date: Fri, 31 Oct 2025 12:22:57 +0100
Subject: [PATCH 22/23] [IMP] apps_download: pre-commit auto fixes
---
apps_download/README.rst | 49 +++++++++----------
apps_download/models/product_product.py | 6 +--
apps_download/pyproject.toml | 3 ++
apps_download/readme/CONTRIBUTORS.md | 10 ++++
apps_download/readme/CONTRIBUTORS.rst | 13 -----
.../{DESCRIPTION.rst => DESCRIPTION.md} | 4 +-
apps_download/readme/ROADMAP.md | 2 +
apps_download/readme/ROADMAP.rst | 1 -
apps_download/static/description/index.html | 37 ++++++--------
9 files changed, 58 insertions(+), 67 deletions(-)
create mode 100644 apps_download/pyproject.toml
create mode 100644 apps_download/readme/CONTRIBUTORS.md
delete mode 100644 apps_download/readme/CONTRIBUTORS.rst
rename apps_download/readme/{DESCRIPTION.rst => DESCRIPTION.md} (50%)
create mode 100644 apps_download/readme/ROADMAP.md
delete mode 100644 apps_download/readme/ROADMAP.rst
diff --git a/apps_download/README.rst b/apps_download/README.rst
index b2abb8b8..92f1ef48 100644
--- a/apps_download/README.rst
+++ b/apps_download/README.rst
@@ -1,7 +1,3 @@
-.. image:: https://odoo-community.org/readme-banner-image
- :target: https://odoo-community.org/get-involved?utm_source=readme
- :alt: Odoo Community Association
-
=============================
Product Download for Appstore
=============================
@@ -17,23 +13,23 @@ Product Download for Appstore
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
-.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
+.. |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%2Fapps--store-lightgray.png?logo=github
- :target: https://github.com/OCA/apps-store/tree/14.0/apps_download
+ :target: https://github.com/OCA/apps-store/tree/18.0/apps_download
:alt: OCA/apps-store
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/apps-store-14-0/apps-store-14-0-apps_download
+ :target: https://translation.odoo-community.org/projects/apps-store-18-0/apps-store-18-0-apps_download
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
- :target: https://runboat.odoo-community.org/builds?repo=OCA/apps-store&target_branch=14.0
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/apps-store&target_branch=18.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
-Providing facility for the maintain dependency of Module at level of product
-and creating Zip file with all dependent modules.
+Providing facility for the maintain dependency of Module at level of
+product and creating Zip file with all dependent modules.
**Table of contents**
@@ -43,7 +39,8 @@ and creating Zip file with all dependent modules.
Known issues / Roadmap
======================
-* Creation of an error queue if the exception occurs while generating zip file of the product
+- Creation of an error queue if the exception occurs while generating
+ zip file of the product
Bug Tracker
===========
@@ -51,7 +48,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 to smash it by providing a detailed and welcomed
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -59,31 +56,31 @@ Credits
=======
Authors
-~~~~~~~
+-------
* BizzAppDev
* AgentERP
* Elico Corp
Contributors
-~~~~~~~~~~~~
+------------
-* Ruchir Shukla
-* Georg Nottere
-* Eric Caudal
-* `Tecnativa `_:
+- Ruchir Shukla
+- Georg Nottere
+- Eric Caudal
+- `Tecnativa `__:
- * Víctor M.M. Torres
- * Alexandre D. Díaz
- * Ernesto Tejeda
+ - Víctor M.M. Torres
+ - Alexandre D. Díaz
+ - Ernesto Tejeda
-* `PyTech `_:
+- `PyTech `__:
- * Simone Rubino
- * Alessandro Uffreduzzi
+ - Simone Rubino
+ - Alessandro Uffreduzzi
Maintainers
-~~~~~~~~~~~
+-----------
This module is maintained by the OCA.
@@ -95,6 +92,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/apps-store `_ project on GitHub.
+This module is part of the `OCA/apps-store `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/apps_download/models/product_product.py b/apps_download/models/product_product.py
index 3b46aa09..6feffe7c 100644
--- a/apps_download/models/product_product.py
+++ b/apps_download/models/product_product.py
@@ -122,15 +122,13 @@ def generate_zip_file(self):
shutil.rmtree(tmp_dir)
except OSError as exc:
_logger.warning(
- "Could not remove Tempdir {}, Errormsg {}".format(tmp_dir, str(exc))
+ f"Could not remove Tempdir {tmp_dir}, Errormsg {str(exc)}"
)
try:
shutil.rmtree(tmp_dir_2)
except OSError as exc:
_logger.warning(
- "Could not remove Tempdir 2 {}, Errormsg {}".format(
- tmp_dir, str(exc)
- )
+ f"Could not remove Tempdir 2 {tmp_dir}, Errormsg {str(exc)}"
)
@api.model
diff --git a/apps_download/pyproject.toml b/apps_download/pyproject.toml
new file mode 100644
index 00000000..4231d0cc
--- /dev/null
+++ b/apps_download/pyproject.toml
@@ -0,0 +1,3 @@
+[build-system]
+requires = ["whool"]
+build-backend = "whool.buildapi"
diff --git a/apps_download/readme/CONTRIBUTORS.md b/apps_download/readme/CONTRIBUTORS.md
new file mode 100644
index 00000000..3e233514
--- /dev/null
+++ b/apps_download/readme/CONTRIBUTORS.md
@@ -0,0 +1,10 @@
+- Ruchir Shukla \<\>
+- Georg Nottere \<\>
+- Eric Caudal \<\>
+- [Tecnativa](https://www.tecnativa.com):
+ - Víctor M.M. Torres
+ - Alexandre D. Díaz
+ - Ernesto Tejeda
+- [PyTech](https://www.pytech.it):
+ - Simone Rubino \<\>
+ - Alessandro Uffreduzzi \<\>
diff --git a/apps_download/readme/CONTRIBUTORS.rst b/apps_download/readme/CONTRIBUTORS.rst
deleted file mode 100644
index 45f17fb5..00000000
--- a/apps_download/readme/CONTRIBUTORS.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-* Ruchir Shukla
-* Georg Nottere
-* Eric Caudal
-* `Tecnativa `_:
-
- * Víctor M.M. Torres
- * Alexandre D. Díaz
- * Ernesto Tejeda
-
-* `PyTech `_:
-
- * Simone Rubino
- * Alessandro Uffreduzzi
diff --git a/apps_download/readme/DESCRIPTION.rst b/apps_download/readme/DESCRIPTION.md
similarity index 50%
rename from apps_download/readme/DESCRIPTION.rst
rename to apps_download/readme/DESCRIPTION.md
index 23ecc70f..c13fd800 100644
--- a/apps_download/readme/DESCRIPTION.rst
+++ b/apps_download/readme/DESCRIPTION.md
@@ -1,2 +1,2 @@
-Providing facility for the maintain dependency of Module at level of product
-and creating Zip file with all dependent modules.
+Providing facility for the maintain dependency of Module at level of
+product and creating Zip file with all dependent modules.
diff --git a/apps_download/readme/ROADMAP.md b/apps_download/readme/ROADMAP.md
new file mode 100644
index 00000000..d8ef716b
--- /dev/null
+++ b/apps_download/readme/ROADMAP.md
@@ -0,0 +1,2 @@
+- Creation of an error queue if the exception occurs while generating
+ zip file of the product
diff --git a/apps_download/readme/ROADMAP.rst b/apps_download/readme/ROADMAP.rst
deleted file mode 100644
index d7d17d9f..00000000
--- a/apps_download/readme/ROADMAP.rst
+++ /dev/null
@@ -1 +0,0 @@
-* Creation of an error queue if the exception occurs while generating zip file of the product
diff --git a/apps_download/static/description/index.html b/apps_download/static/description/index.html
index 2d70a744..daa0bdae 100644
--- a/apps_download/static/description/index.html
+++ b/apps_download/static/description/index.html
@@ -3,7 +3,7 @@
-README.rst
+Product Download for Appstore
-
+
+
Product Download for Appstore
-
-
-
-
-
-
Product Download for Appstore
-
-
Providing facility for the maintain dependency of Module at level of product
-and creating Zip file with all dependent modules.
+
+
Providing facility for the maintain dependency of Module at level of
+product and creating Zip file with all dependent modules.
Table of contents
@@ -391,23 +386,24 @@ Product Download for Appstore
-
+
-Creation of an error queue if the exception occurs while generating zip file of the product
+Creation of an error queue if the exception occurs while generating
+zip file of the product
-
+
Bugs are tracked on GitHub Issues .
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
-feedback .
+
feedback .
Do not contact contributors directly about support or help with technical issues.
-
+
-
+
BizzAppDev
AgentERP
@@ -415,7 +411,7 @@
-