From fca38738f1672e997200327f6f13da4279b88090 Mon Sep 17 00:00:00 2001 From: cubells Date: Thu, 27 Sep 2018 14:01:36 +0200 Subject: [PATCH] [MIG] stock_orderpoint_generator: Migration to 11.0 --- stock_orderpoint_generator/README.rst | 84 ++-- stock_orderpoint_generator/__init__.py | 2 - .../{__openerp__.py => __manifest__.py} | 8 +- stock_orderpoint_generator/data/ir_cron.xml | 21 +- .../i18n/stock_orderpoint_generator.pot | 96 +--- stock_orderpoint_generator/models/__init__.py | 2 - .../models/orderpoint_template.py | 5 +- stock_orderpoint_generator/models/product.py | 3 +- .../readme/CONFIGURE.rst | 6 + .../readme/CONTRIBUTORS.rst | 7 + .../readme/DESCRIPTION.rst | 2 + stock_orderpoint_generator/readme/USAGE.rst | 9 + .../static/description/index.html | 426 ++++++++++++++++++ stock_orderpoint_generator/tests/__init__.py | 3 +- .../tests/test_orderpoint_generator.py | 7 +- .../views/orderpoint_template_views.xml | 192 ++++---- .../views/product_views.xml | 14 - stock_orderpoint_generator/wizard/__init__.py | 2 - .../wizard/orderpoint_generator.py | 11 +- .../wizard/orderpoint_generator_view.xml | 1 - 20 files changed, 641 insertions(+), 260 deletions(-) rename stock_orderpoint_generator/{__openerp__.py => __manifest__.py} (77%) create mode 100644 stock_orderpoint_generator/readme/CONFIGURE.rst create mode 100644 stock_orderpoint_generator/readme/CONTRIBUTORS.rst create mode 100644 stock_orderpoint_generator/readme/DESCRIPTION.rst create mode 100644 stock_orderpoint_generator/readme/USAGE.rst create mode 100644 stock_orderpoint_generator/static/description/index.html delete mode 100644 stock_orderpoint_generator/views/product_views.xml diff --git a/stock_orderpoint_generator/README.rst b/stock_orderpoint_generator/README.rst index 8f8ec38f6..25e4ad3f2 100644 --- a/stock_orderpoint_generator/README.rst +++ b/stock_orderpoint_generator/README.rst @@ -1,14 +1,38 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License: AGPL-3 - ===================== Order point generator ===================== +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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%2Fstock--logistics--warehouse-lightgray.png?logo=github + :target: https://github.com/OCA/stock-logistics-warehouse/tree/11.0/stock_orderpoint_generator + :alt: OCA/stock-logistics-warehouse +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-11-0/stock-logistics-warehouse-11-0-stock_orderpoint_generator + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/153/11.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + Add a wizard to configure reordering rules for multiple products in one go, and allow to automatically update reordering rules from rule templates. +**Table of contents** + +.. contents:: + :local: + Configuration ============= @@ -16,7 +40,7 @@ Reordering rule templates can be configured in "Inventory > Configuration > Products > Reordering Rule Templates". The frequency of the cron that updates the Reordering Rules can be configured -in "Settings > Technical > Actions > Scheduled Actions". The name of the +in "Settings > Technical > Automation > Scheduled Actions". The name of the scheduled action is "Reordering Rule Templates Generator". Usage @@ -27,51 +51,53 @@ you are able to select a list of products. Any change on the template will then be replicated on the products Reordering Rules. The change is not immediate as it is processed by a scheduled action. -On a product, you can also choose one or more Reordering Rule Templates. Any -template added or removed on the product is immediately reflected on its -Reordering Rules. - Lastly, you can promptly create Reordering Rules for a product or a product template using the "Reordering Rules Generator". Note that it will replace all the existing rules for the product. You will usually not want to use this feature on products that have Automatic Reordering Rules Templates. - -.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas - :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/153/9.0 - - 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. +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. Credits ======= +Authors +~~~~~~~ + +* Camptocamp + Contributors ------------- +~~~~~~~~~~~~ - * Yannick Vaucher - * Matthieu Dietrich - * Cyril Gaudin - * Guewen Baconnier +* Yannick Vaucher +* Matthieu Dietrich +* Cyril Gaudin +* Guewen Baconnier +* `Tecnativa `_: -Maintainer ----------- + * Vicent Cubells + +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 http://odoo-community.org. +This module is part of the `OCA/stock-logistics-warehouse `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/stock_orderpoint_generator/__init__.py b/stock_orderpoint_generator/__init__.py index 35e7c9600..9b4296142 100644 --- a/stock_orderpoint_generator/__init__.py +++ b/stock_orderpoint_generator/__init__.py @@ -1,4 +1,2 @@ -# -*- coding: utf-8 -*- - from . import models from . import wizard diff --git a/stock_orderpoint_generator/__openerp__.py b/stock_orderpoint_generator/__manifest__.py similarity index 77% rename from stock_orderpoint_generator/__openerp__.py rename to stock_orderpoint_generator/__manifest__.py index 71e33923f..67b331150 100644 --- a/stock_orderpoint_generator/__openerp__.py +++ b/stock_orderpoint_generator/__manifest__.py @@ -1,19 +1,17 @@ -# -*- coding: utf-8 -*- -# © 2012-2016 Camptocamp SA +# Copyright 2012-2016 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Order point generator', 'summary': 'Mass configuration of stock order points', - 'version': '9.0.1.1.0', + 'version': '11.0.1.0.0', 'author': "Camptocamp, Odoo Community Association (OCA)", 'category': 'Warehouse', 'license': 'AGPL-3', - 'website': "http://www.camptocamp.com", + 'website': "https://github.com/OCA/stock-logistics-warehouse", 'depends': ['stock'], 'data': [ 'views/orderpoint_template_views.xml', - 'views/product_views.xml', "wizard/orderpoint_generator_view.xml", "data/ir_cron.xml", "security/ir.model.access.csv", diff --git a/stock_orderpoint_generator/data/ir_cron.xml b/stock_orderpoint_generator/data/ir_cron.xml index d9913dcdc..3804f0cdf 100644 --- a/stock_orderpoint_generator/data/ir_cron.xml +++ b/stock_orderpoint_generator/data/ir_cron.xml @@ -1,16 +1,15 @@ - - Reordering Rule Templates Generator - 1 - hours - -1 - - - - - - + + Reordering Rule Templates Generator + 1 + hours + -1 + + + model._cron_create_auto_orderpoints() + + diff --git a/stock_orderpoint_generator/i18n/stock_orderpoint_generator.pot b/stock_orderpoint_generator/i18n/stock_orderpoint_generator.pot index 8a8d14bb8..ad87b0f1f 100644 --- a/stock_orderpoint_generator/i18n/stock_orderpoint_generator.pot +++ b/stock_orderpoint_generator/i18n/stock_orderpoint_generator.pot @@ -4,8 +4,10 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-09-27 12:00+0000\n" +"PO-Revision-Date: 2018-09-27 12:00+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -18,11 +20,6 @@ msgstr "" msgid "A reordering rule will be automatically created by the scheduled action for every product in this list." msgstr "" -#. module: stock_orderpoint_generator -#: model:ir.model.fields,field_description:stock_orderpoint_generator.field_stock_warehouse_orderpoint_template_active -msgid "Active" -msgstr "" - #. module: stock_orderpoint_generator #: model:ir.ui.view,arch_db:stock_orderpoint_generator.orderpoint_generator_view msgid "Apply" @@ -30,22 +27,16 @@ msgstr "" #. module: stock_orderpoint_generator #: model:ir.model.fields,field_description:stock_orderpoint_generator.field_product_product_auto_orderpoint_template_ids -#: model:ir.ui.view,arch_db:stock_orderpoint_generator.product_normal_form_view msgid "Automatic Reordering Rules" msgstr "" -#. module: stock_orderpoint_generator -#: model:ir.ui.view,arch_db:stock_orderpoint_generator.view_warehouse_orderpoint_template_form -msgid "Automatic Rules" -msgstr "" - #. module: stock_orderpoint_generator #: model:ir.ui.view,arch_db:stock_orderpoint_generator.orderpoint_generator_view msgid "Cancel" msgstr "" #. module: stock_orderpoint_generator -#: code:addons/stock_orderpoint_generator/wizard/orderpoint_generator.py:40 +#: code:addons/stock_orderpoint_generator/wizard/orderpoint_generator.py:39 #, python-format msgid "Cannot apply because some of selected products has multiple variants." msgstr "" @@ -55,21 +46,11 @@ msgstr "" msgid "Click to add a reordering rule template." msgstr "" -#. module: stock_orderpoint_generator -#: model:ir.model.fields,field_description:stock_orderpoint_generator.field_stock_warehouse_orderpoint_template_company_id -msgid "Company" -msgstr "" - #. module: stock_orderpoint_generator #: model:ir.model.fields,field_description:stock_orderpoint_generator.field_stock_warehouse_orderpoint_template_auto_generate msgid "Create Rules Automatically" msgstr "" -#. module: stock_orderpoint_generator -#: model:ir.model.fields,field_description:stock_orderpoint_generator.field_stock_warehouse_orderpoint_template_procurement_ids -msgid "Created Procurements" -msgstr "" - #. module: stock_orderpoint_generator #: model:ir.model.fields,field_description:stock_orderpoint_generator.field_stock_warehouse_orderpoint_generator_create_uid #: model:ir.model.fields,field_description:stock_orderpoint_generator.field_stock_warehouse_orderpoint_template_create_uid @@ -83,13 +64,8 @@ msgid "Created on" msgstr "" #. module: stock_orderpoint_generator -#: selection:stock.warehouse.orderpoint.template,lead_type:0 -msgid "Day(s) to get the products" -msgstr "" - -#. module: stock_orderpoint_generator -#: selection:stock.warehouse.orderpoint.template,lead_type:0 -msgid "Day(s) to purchase" +#: model:ir.model.fields,help:stock_orderpoint_generator.field_stock_warehouse_orderpoint_template_product_uom +msgid "Default Unit of Measure used for all stock operation." msgstr "" #. module: stock_orderpoint_generator @@ -114,11 +90,6 @@ msgstr "" msgid "ID" msgstr "" -#. module: stock_orderpoint_generator -#: model:ir.model.fields,help:stock_orderpoint_generator.field_stock_warehouse_orderpoint_template_active -msgid "If the active field is set to False, it will allow you to hide the orderpoint without removing it." -msgstr "" - #. module: stock_orderpoint_generator #: model:ir.model.fields,field_description:stock_orderpoint_generator.field_stock_warehouse_orderpoint_template_auto_last_generation msgid "Last Automatic Generation" @@ -143,31 +114,10 @@ msgid "Last Updated on" msgstr "" #. module: stock_orderpoint_generator -#: model:ir.model.fields,field_description:stock_orderpoint_generator.field_stock_warehouse_orderpoint_template_lead_days -msgid "Lead Time" -msgstr "" - -#. module: stock_orderpoint_generator -#: model:ir.model.fields,field_description:stock_orderpoint_generator.field_stock_warehouse_orderpoint_template_lead_type -msgid "Lead Type" -msgstr "" - -#. module: stock_orderpoint_generator -#: model:ir.model.fields,field_description:stock_orderpoint_generator.field_stock_warehouse_orderpoint_template_location_id #: model:ir.ui.view,arch_db:stock_orderpoint_generator.view_warehouse_orderpoint_template_search msgid "Location" msgstr "" -#. module: stock_orderpoint_generator -#: model:ir.model.fields,field_description:stock_orderpoint_generator.field_stock_warehouse_orderpoint_template_product_max_qty -msgid "Maximum Quantity" -msgstr "" - -#. module: stock_orderpoint_generator -#: model:ir.model.fields,field_description:stock_orderpoint_generator.field_stock_warehouse_orderpoint_template_product_min_qty -msgid "Minimum Quantity" -msgstr "" - #. module: stock_orderpoint_generator #: model:ir.ui.view,arch_db:stock_orderpoint_generator.view_warehouse_orderpoint_template_form msgid "Misc" @@ -183,11 +133,6 @@ msgstr "" msgid "Name" msgstr "" -#. module: stock_orderpoint_generator -#: model:ir.model.fields,help:stock_orderpoint_generator.field_stock_warehouse_orderpoint_template_lead_days -msgid "Number of days after the orderpoint is triggered to receive the products or to order to the vendor" -msgstr "" - #. module: stock_orderpoint_generator #: model:ir.model,name:stock_orderpoint_generator.model_stock_warehouse_orderpoint_generator msgid "Orderpoint Generator" @@ -211,14 +156,10 @@ msgstr "" #. module: stock_orderpoint_generator #: model:ir.model.fields,field_description:stock_orderpoint_generator.field_stock_warehouse_orderpoint_template_auto_product_ids +#: model:ir.ui.view,arch_db:stock_orderpoint_generator.view_warehouse_orderpoint_template_form msgid "Products" msgstr "" -#. module: stock_orderpoint_generator -#: model:ir.model.fields,field_description:stock_orderpoint_generator.field_stock_warehouse_orderpoint_template_qty_multiple -msgid "Qty Multiple" -msgstr "" - #. module: stock_orderpoint_generator #: model:ir.ui.view,arch_db:stock_orderpoint_generator.view_warehouse_orderpoint_template_form msgid "Quantity Multiple" @@ -239,6 +180,13 @@ msgstr "" msgid "Reordering Rule Templates" msgstr "" +#. module: stock_orderpoint_generator +#: model:ir.actions.server,name:stock_orderpoint_generator.ir_cron_auto_orderpoint_template_ir_actions_server +#: model:ir.cron,cron_name:stock_orderpoint_generator.ir_cron_auto_orderpoint_template +#: model:ir.cron,name:stock_orderpoint_generator.ir_cron_auto_orderpoint_template +msgid "Reordering Rule Templates Generator" +msgstr "" + #. module: stock_orderpoint_generator #: model:ir.ui.view,arch_db:stock_orderpoint_generator.view_warehouse_orderpoint_template_search msgid "Reordering Rule Templates Search" @@ -266,18 +214,12 @@ msgstr "" msgid "Templates" msgstr "" -#. module: stock_orderpoint_generator -#: model:ir.model.fields,help:stock_orderpoint_generator.field_stock_warehouse_orderpoint_template_qty_multiple -msgid "The procurement quantity will be rounded up to this multiple. If it is 0, the exact quantity will be used. " -msgstr "" - #. module: stock_orderpoint_generator #: model:ir.ui.view,arch_db:stock_orderpoint_generator.orderpoint_generator_view msgid "This wizard will apply the following orderpoint to selected product(s)" msgstr "" #. module: stock_orderpoint_generator -#: model:ir.model.fields,field_description:stock_orderpoint_generator.field_stock_warehouse_orderpoint_template_warehouse_id #: model:ir.ui.view,arch_db:stock_orderpoint_generator.view_warehouse_orderpoint_template_search msgid "Warehouse" msgstr "" @@ -292,13 +234,3 @@ msgstr "" msgid "When one or several automatic reordering rule is selected, a Scheduled Action will automatically generate or update the reordering rules of the product." msgstr "" -#. module: stock_orderpoint_generator -#: model:ir.model.fields,help:stock_orderpoint_generator.field_stock_warehouse_orderpoint_template_product_min_qty -msgid "When the virtual stock goes below the Min Quantity specified for this field, Odoo generates a procurement to bring the forecasted quantity to the Max Quantity." -msgstr "" - -#. module: stock_orderpoint_generator -#: model:ir.model.fields,help:stock_orderpoint_generator.field_stock_warehouse_orderpoint_template_product_max_qty -msgid "When the virtual stock goes below the Min Quantity, Odoo generates a procurement to bring the forecasted quantity to the Quantity specified as Max Quantity." -msgstr "" - diff --git a/stock_orderpoint_generator/models/__init__.py b/stock_orderpoint_generator/models/__init__.py index d1390f64f..e10eb4101 100644 --- a/stock_orderpoint_generator/models/__init__.py +++ b/stock_orderpoint_generator/models/__init__.py @@ -1,4 +1,2 @@ -# -*- coding: utf-8 -*- - from . import orderpoint_template from . import product diff --git a/stock_orderpoint_generator/models/orderpoint_template.py b/stock_orderpoint_generator/models/orderpoint_template.py index e44474f34..45f474cd1 100644 --- a/stock_orderpoint_generator/models/orderpoint_template.py +++ b/stock_orderpoint_generator/models/orderpoint_template.py @@ -1,9 +1,8 @@ -# -*- coding: utf-8 -*- -# © 2012-2016 Camptocamp SA +# Copyright 2012-2016 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp import api, fields, models +from odoo import api, fields, models class OrderpointTemplate(models.Model): diff --git a/stock_orderpoint_generator/models/product.py b/stock_orderpoint_generator/models/product.py index 74b26b532..2db645931 100644 --- a/stock_orderpoint_generator/models/product.py +++ b/stock_orderpoint_generator/models/product.py @@ -1,8 +1,7 @@ -# -*- coding: utf-8 -*- # Copyright 2017 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) -from openerp import api, fields, models +from odoo import api, fields, models class ProductProduct(models.Model): diff --git a/stock_orderpoint_generator/readme/CONFIGURE.rst b/stock_orderpoint_generator/readme/CONFIGURE.rst new file mode 100644 index 000000000..af7b4cd0e --- /dev/null +++ b/stock_orderpoint_generator/readme/CONFIGURE.rst @@ -0,0 +1,6 @@ +Reordering rule templates can be configured in "Inventory > Configuration > +Products > Reordering Rule Templates". + +The frequency of the cron that updates the Reordering Rules can be configured +in "Settings > Technical > Automation > Scheduled Actions". The name of the +scheduled action is "Reordering Rule Templates Generator". diff --git a/stock_orderpoint_generator/readme/CONTRIBUTORS.rst b/stock_orderpoint_generator/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..308b5d3dc --- /dev/null +++ b/stock_orderpoint_generator/readme/CONTRIBUTORS.rst @@ -0,0 +1,7 @@ +* Yannick Vaucher +* Matthieu Dietrich +* Cyril Gaudin +* Guewen Baconnier +* `Tecnativa `_: + + * Vicent Cubells diff --git a/stock_orderpoint_generator/readme/DESCRIPTION.rst b/stock_orderpoint_generator/readme/DESCRIPTION.rst new file mode 100644 index 000000000..dd5b5fe0a --- /dev/null +++ b/stock_orderpoint_generator/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +Add a wizard to configure reordering rules for multiple products in one go, +and allow to automatically update reordering rules from rule templates. diff --git a/stock_orderpoint_generator/readme/USAGE.rst b/stock_orderpoint_generator/readme/USAGE.rst new file mode 100644 index 000000000..5c74d298d --- /dev/null +++ b/stock_orderpoint_generator/readme/USAGE.rst @@ -0,0 +1,9 @@ +By activating the "Create Rules Automatically" on a reordering rule template, +you are able to select a list of products. Any change on the template will then +be replicated on the products Reordering Rules. The change is not immediate as +it is processed by a scheduled action. + +Lastly, you can promptly create Reordering Rules for a product or a product +template using the "Reordering Rules Generator". Note that it will replace all +the existing rules for the product. You will usually not want to use this +feature on products that have Automatic Reordering Rules Templates. diff --git a/stock_orderpoint_generator/static/description/index.html b/stock_orderpoint_generator/static/description/index.html new file mode 100644 index 000000000..e53b43998 --- /dev/null +++ b/stock_orderpoint_generator/static/description/index.html @@ -0,0 +1,426 @@ + + + + + + +Order point generator + + + +
+

Order point generator

+ + +

Beta License: AGPL-3 OCA/stock-logistics-warehouse Translate me on Weblate Try me on Runbot

+

Add a wizard to configure reordering rules for multiple products in one go, +and allow to automatically update reordering rules from rule templates.

+

Table of contents

+ +
+

Configuration

+

Reordering rule templates can be configured in “Inventory > Configuration > +Products > Reordering Rule Templates”.

+

The frequency of the cron that updates the Reordering Rules can be configured +in “Settings > Technical > Automation > Scheduled Actions”. The name of the +scheduled action is “Reordering Rule Templates Generator”.

+
+
+

Usage

+

By activating the “Create Rules Automatically” on a reordering rule template, +you are able to select a list of products. Any change on the template will then +be replicated on the products Reordering Rules. The change is not immediate as +it is processed by a scheduled action.

+

Lastly, you can promptly create Reordering Rules for a product or a product +template using the “Reordering Rules Generator”. Note that it will replace all +the existing rules for the product. You will usually not want to use this +feature on products that have Automatic Reordering Rules Templates.

+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +feedback.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Camptocamp
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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

+

This module is part of the OCA/stock-logistics-warehouse project on GitHub.

+

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

+
+
+
+ + diff --git a/stock_orderpoint_generator/tests/__init__.py b/stock_orderpoint_generator/tests/__init__.py index a6db37d84..ceb223851 100644 --- a/stock_orderpoint_generator/tests/__init__.py +++ b/stock_orderpoint_generator/tests/__init__.py @@ -1,5 +1,4 @@ -# -*- coding: utf-8 -*- -# © 2016 Cyril Gaudin (Camptocamp) +# Copyright 2016 Cyril Gaudin (Camptocamp) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import test_orderpoint_generator diff --git a/stock_orderpoint_generator/tests/test_orderpoint_generator.py b/stock_orderpoint_generator/tests/test_orderpoint_generator.py index ac0e9c8d2..495519819 100644 --- a/stock_orderpoint_generator/tests/test_orderpoint_generator.py +++ b/stock_orderpoint_generator/tests/test_orderpoint_generator.py @@ -1,8 +1,7 @@ -# -*- coding: utf-8 -*- -# © 2016 Cyril Gaudin (Camptocamp) +# Copyright 2016 Cyril Gaudin (Camptocamp) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp.exceptions import UserError -from openerp.tests.common import TransactionCase +from odoo.exceptions import UserError +from odoo.tests.common import TransactionCase class TestOrderpointGenerator(TransactionCase): diff --git a/stock_orderpoint_generator/views/orderpoint_template_views.xml b/stock_orderpoint_generator/views/orderpoint_template_views.xml index c9b59aaec..ed0342fd0 100644 --- a/stock_orderpoint_generator/views/orderpoint_template_views.xml +++ b/stock_orderpoint_generator/views/orderpoint_template_views.xml @@ -1,106 +1,108 @@ - - stock.warehouse.orderpoint.template.tree - stock.warehouse.orderpoint.template - primary - - - - - - - - - - - + + stock.warehouse.orderpoint.template.tree + stock.warehouse.orderpoint.template + primary + + + + + + + + + + + - - stock.warehouse.orderpoint.template.search - stock.warehouse.orderpoint.template - primary - - - - - - - - - - - - - + + stock.warehouse.orderpoint.template.search + stock.warehouse.orderpoint.template + primary + + + + + + + + + + + + + - - stock.warehouse.orderpoint.template.form - stock.warehouse.orderpoint.template - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + stock.warehouse.orderpoint.template.form + stock.warehouse.orderpoint.template + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
-
-
+
+
- - Reordering Rule Templates - stock.warehouse.orderpoint.template - ir.actions.act_window - form - tree,form - - - -

- Click to add a reordering rule template. -

-
-
+ + Reordering Rule Templates + stock.warehouse.orderpoint.template + ir.actions.act_window + form + tree,form + + + +

+ Click to add a reordering rule template. +

+
+
-
diff --git a/stock_orderpoint_generator/views/product_views.xml b/stock_orderpoint_generator/views/product_views.xml deleted file mode 100644 index 2550e4b20..000000000 --- a/stock_orderpoint_generator/views/product_views.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - product.product.form - product.product - - - - - - - - - diff --git a/stock_orderpoint_generator/wizard/__init__.py b/stock_orderpoint_generator/wizard/__init__.py index d4225caf6..ab79321d9 100644 --- a/stock_orderpoint_generator/wizard/__init__.py +++ b/stock_orderpoint_generator/wizard/__init__.py @@ -1,3 +1 @@ -# -*- coding: utf-8 -*- - from . import orderpoint_generator diff --git a/stock_orderpoint_generator/wizard/orderpoint_generator.py b/stock_orderpoint_generator/wizard/orderpoint_generator.py index 54eb8ce15..a8cdb709e 100644 --- a/stock_orderpoint_generator/wizard/orderpoint_generator.py +++ b/stock_orderpoint_generator/wizard/orderpoint_generator.py @@ -1,11 +1,10 @@ -# -*- coding: utf-8 -*- -# © 2012-2016 Camptocamp SA +# Copyright 2012-2016 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp import _, api, fields, models +from odoo import _, api, fields, models -from openerp.exceptions import UserError +from odoo.exceptions import UserError _template_register = ['orderpoint_template_id'] @@ -19,8 +18,8 @@ class OrderpointGenerator(models.TransientModel): _description = 'Orderpoint Generator' orderpoint_template_id = fields.Many2many( - 'stock.warehouse.orderpoint.template', - rel='order_point_generator_rel', + comodel_name='stock.warehouse.orderpoint.template', + relation='order_point_generator_rel', string='Reordering Rule Templates' ) diff --git a/stock_orderpoint_generator/wizard/orderpoint_generator_view.xml b/stock_orderpoint_generator/wizard/orderpoint_generator_view.xml index 887b2fcbe..903952589 100644 --- a/stock_orderpoint_generator/wizard/orderpoint_generator_view.xml +++ b/stock_orderpoint_generator/wizard/orderpoint_generator_view.xml @@ -34,5 +34,4 @@ key2="client_action_multi" id="act_create_product_template_conf"/> -