Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[13.0][MIG] apps_download: Migration to 13.0 #75

Merged
merged 10 commits into from
Aug 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions apps_download/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
=============================
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/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-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/13.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.

**Table of contents**

.. contents::
:local:

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 <https://github.com/OCA/apps-store/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 <https://github.com/OCA/apps-store/issues/new?body=module:%20apps_download%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* BizzAppDev
* AgentERP
* Elico Corp

Contributors
~~~~~~~~~~~~

* Ruchir Shukla <ruchir@bizzappdev.com>
* Georg Nottere <georg.notter@agenterp.com>
* Eric Caudal <eric.caudal@elico-corp.com>
* `Tecnativa <https://www.tecnativa.com>`_:

* Víctor M.M. Torres
* Alexandre D. Díaz

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/apps-store <https://github.com/OCA/apps-store/tree/13.0/apps_download>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions apps_download/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
24 changes: 24 additions & 0 deletions apps_download/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 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": "13.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,
}
20 changes: 20 additions & 0 deletions apps_download/data/cron_scheduler.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright 2017-Today BizzAppDev - Ruchir Shukla <ruchir@bizzappdev.com>
Copyright 2017-Today AgentERP - Georg Notter <georg.notter@agenterp.com>
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-->
<odoo>
<record id="ir_cron_scheduler_generate_zip" model="ir.cron">
<field name="name">Generate ZIP files for all products</field>
<field name="user_id" ref="base.user_root" />
<field name="interval_number">1</field>
<field name="active" eval="False" />
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
<field name="doall" eval="False" />
<field name="model_id" ref="model_product_product" />
<field name="state">code</field>
<field name="code">model.generate_zip_file_batch()</field>
</record>
</odoo>
125 changes: 125 additions & 0 deletions apps_download/demo/product_template_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright 2017-Today BizzAppDev - Ruchir Shukla <ruchir@bizzappdev.com>
Copyright 2017-Today AgentERP - Georg Notter <georg.notter@agenterp.com>
Copyright 2017-Today Elico Corp - (https://www.elico-corp.com)
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-->
<odoo>
<data noupdate="1">
<!-- Prepare necessary data for create the product.template -->
<record id="attribute_odoo_version" model="product.attribute">
<field name="name">Odoo Version</field>
</record>
<record id="website_category1" model="product.public.category">
<field name="name">Category1</field>
</record>
<record id="github_organization1" model="github.organization">
<field name="name">Organization1</field>
<field name="github_login">login</field>
</record>
<record id="github_repository1" model="github.repository">
<field name="name">Repository1</field>
<field name="organization_id" ref="github_organization1" />
</record>
<record id="github_repository_branch1" model="github.repository.branch">
<field name="name">Master</field>
<field name="repository_id" ref="github_repository1" />
</record>
<record id="odoo_module1" model="odoo.module">
<field name="technical_name">odoo_module1</field>
</record>
<record id="odoo_module2" model="odoo.module">
<field name="technical_name">odoo_module2</field>
</record>
<record id="odoo_module_version1" model="odoo.module.version">
<field name="name">Odoo Module 1</field>
<field name="technical_name">odoo_module1</field>
<field name="module_id" ref="odoo_module1" />
<field name="repository_branch_id" ref="github_repository_branch1" />
<field name="license">AGPL-3</field>
<field name="summary">Summary Test</field>
<field name="website">Website Test</field>
<field name="description_rst">Description Test</field>
<field name="version">10.0</field>
<field name="author">OCA</field>
<field name="depends">base</field>
<field name="external_dependencies">{}</field>
<field name="full_module_path">/repo/10.0/odoo_module_1</field>
</record>
<record id="odoo_module_version2" model="odoo.module.version">
<field name="name">Odoo Module 2</field>
<field name="technical_name">odoo_module2</field>
<field name="module_id" ref="odoo_module2" />
<field name="repository_branch_id" ref="github_repository_branch1" />
<field name="license">AGPL-3</field>
<field name="summary">Summary Test</field>
<field name="website">Website Test</field>
<field name="description_rst">Description Test</field>
<field name="version">11.0</field>
<field name="author">OCA</field>
<field name="depends">base</field>
<field name="external_dependencies">{}</field>
<field name="full_module_path">/repo/11.0/odoo_module_2</field>
</record>
<!-- Create the the product.template record -->
<record id="product_template_100" model="product.template">
<field name="name">Odoo Module 1</field>
<field name="type">service</field>
<field name="public_categ_ids" eval="[(6,0,[ref('website_category1')])]" />
<field name="website_published" eval="True" />
</record>
<!-- Assign product attributes and values -->
<record
id="product_template_attribute_line_1"
model="product.template.attribute.line"
>
<field name="product_tmpl_id" ref="product_template_100" />
<field
name="attribute_id"
ref="apps_product_creator.attribute_odoo_version"
/>
<field
name="value_ids"
eval="[(6,0,[ref('apps_product_creator.odoo_version_100'), ref('apps_product_creator.odoo_version_110')])]"
/>
</record>
<!-- Get the 'product.template.attribute.value' ids -->
<function model="ir.model.data" name="_update_xmlids">
<value
model="base"
eval="[{
'xml_id': 'apps_download.product_template_100_attribute_odoo_version_value_100',
'record': obj().env.ref('apps_download.product_template_attribute_line_1').product_template_value_ids[0],
'noupdate': True,
}, {
'xml_id': 'apps_download.product_template_100_attribute_odoo_version_value_110',
'record': obj().env.ref('apps_download.product_template_attribute_line_1').product_template_value_ids[1],
'noupdate': True,
}]"
/>
</function>
<!-- Get the generated 'product.product' combinations -->
<function model="ir.model.data" name="_update_xmlids">
<value
model="base"
eval="[{
'xml_id': 'apps_download.product_product_100',
'record': obj().env.ref('apps_download.product_template_100')._get_variant_for_combination(obj().env.ref('apps_download.product_template_100_attribute_odoo_version_value_100')),
'noupdate': True,
}, {
'xml_id': 'apps_download.product_product_100b',
'record': obj().env.ref('apps_download.product_template_100')._get_variant_for_combination(obj().env.ref('apps_download.product_template_100_attribute_odoo_version_value_110')),
'noupdate': True,
}]"
/>
</function>
<!-- Update combinations with the module info -->
<record id="product_product_100" model="product.product">
<field name="odoo_module_version_id" ref="odoo_module_version1" />
</record>
<record id="product_product_100b" model="product.product">
<field name="odoo_module_version_id" ref="odoo_module_version2" />
</record>
</data>
</odoo>
78 changes: 78 additions & 0 deletions apps_download/i18n/apps_download.pot
Original file line number Diff line number Diff line change
@@ -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: <>\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: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 ""

Loading