mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[MIG] stock_orderpoint_generator: Migration to 11.0
This commit is contained in:
@@ -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
|
||||
<https://github.com/OCA/stock-logistics-warehouse/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 <https://github.com/OCA/stock-logistics-warehouse/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/stock-logistics-warehouse/issues/new?body=module:%20stock_orderpoint_generator%0Aversion:%2011.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
|
||||
~~~~~~~
|
||||
|
||||
* Camptocamp
|
||||
|
||||
Contributors
|
||||
------------
|
||||
~~~~~~~~~~~~
|
||||
|
||||
* Yannick Vaucher <yannick.vaucher@camptocamp.com>
|
||||
* Matthieu Dietrich <matthieu.dietrich@camptocamp.com>
|
||||
* Cyril Gaudin <cyril.gaudin@camptocamp.com>
|
||||
* Guewen Baconnier <guewen.baconnier@camptocamp.com>
|
||||
* Yannick Vaucher <yannick.vaucher@camptocamp.com>
|
||||
* Matthieu Dietrich <matthieu.dietrich@camptocamp.com>
|
||||
* Cyril Gaudin <cyril.gaudin@camptocamp.com>
|
||||
* Guewen Baconnier <guewen.baconnier@camptocamp.com>
|
||||
* `Tecnativa <https://www.tecnativa.com>`_:
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
* Vicent Cubells <vicent@vcubells.net>
|
||||
|
||||
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 <https://github.com/OCA/stock-logistics-warehouse/tree/11.0/stock_orderpoint_generator>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import models
|
||||
from . import wizard
|
||||
|
||||
@@ -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",
|
||||
@@ -1,16 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo noupdate="1">
|
||||
|
||||
<record id="ir_cron_auto_orderpoint_template" model="ir.cron">
|
||||
<field name="name">Reordering Rule Templates Generator</field>
|
||||
<field name="interval_number">1</field>
|
||||
<field name="interval_type">hours</field>
|
||||
<field name="numbercall">-1</field>
|
||||
<field eval="False" name="doall"/>
|
||||
<field eval="'stock.warehouse.orderpoint.template'" name="model"/>
|
||||
<field eval="'_cron_create_auto_orderpoints'" name="function"/>
|
||||
<field eval="'()'" name="args"/>
|
||||
<field name="active" eval="True" />
|
||||
</record>
|
||||
<record id="ir_cron_auto_orderpoint_template" model="ir.cron">
|
||||
<field name="name">Reordering Rule Templates Generator</field>
|
||||
<field name="interval_number">1</field>
|
||||
<field name="interval_type">hours</field>
|
||||
<field name="numbercall">-1</field>
|
||||
<field eval="False" name="doall"/>
|
||||
<field name="model_id" ref="model_stock_warehouse_orderpoint_template"/>
|
||||
<field name="code">model._cron_create_auto_orderpoints()</field>
|
||||
<field name="active" eval="True" />
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -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 ""
|
||||
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import orderpoint_template
|
||||
from . import product
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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):
|
||||
|
||||
6
stock_orderpoint_generator/readme/CONFIGURE.rst
Normal file
6
stock_orderpoint_generator/readme/CONFIGURE.rst
Normal file
@@ -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".
|
||||
7
stock_orderpoint_generator/readme/CONTRIBUTORS.rst
Normal file
7
stock_orderpoint_generator/readme/CONTRIBUTORS.rst
Normal file
@@ -0,0 +1,7 @@
|
||||
* Yannick Vaucher <yannick.vaucher@camptocamp.com>
|
||||
* Matthieu Dietrich <matthieu.dietrich@camptocamp.com>
|
||||
* Cyril Gaudin <cyril.gaudin@camptocamp.com>
|
||||
* Guewen Baconnier <guewen.baconnier@camptocamp.com>
|
||||
* `Tecnativa <https://www.tecnativa.com>`_:
|
||||
|
||||
* Vicent Cubells <vicent@vcubells.net>
|
||||
2
stock_orderpoint_generator/readme/DESCRIPTION.rst
Normal file
2
stock_orderpoint_generator/readme/DESCRIPTION.rst
Normal file
@@ -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.
|
||||
9
stock_orderpoint_generator/readme/USAGE.rst
Normal file
9
stock_orderpoint_generator/readme/USAGE.rst
Normal file
@@ -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.
|
||||
426
stock_orderpoint_generator/static/description/index.html
Normal file
426
stock_orderpoint_generator/static/description/index.html
Normal file
@@ -0,0 +1,426 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils 0.12: http://docutils.sourceforge.net/" />
|
||||
<title>Order point generator</title>
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger (goodger@python.org)
|
||||
:Id: $Id: html4css1.css 7614 2013-02-21 15:55:51Z milde $
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* used to remove borders from tables and images */
|
||||
.borderless, table.borderless td, table.borderless th {
|
||||
border: 0 }
|
||||
|
||||
table.borderless td, table.borderless th {
|
||||
/* Override padding for "table.docutils td" with "! important".
|
||||
The right padding separates the table cells. */
|
||||
padding: 0 0.5em 0 0 ! important }
|
||||
|
||||
.first {
|
||||
/* Override more specific margin styles with "! important". */
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title, .code .error {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin: 0 0 0.5em 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left, .figure.align-left, object.align-left {
|
||||
clear: left ;
|
||||
float: left ;
|
||||
margin-right: 1em }
|
||||
|
||||
img.align-right, .figure.align-right, object.align-right {
|
||||
clear: right ;
|
||||
float: right ;
|
||||
margin-left: 1em }
|
||||
|
||||
img.align-center, .figure.align-center, object.align-center {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.align-left {
|
||||
text-align: left }
|
||||
|
||||
.align-center {
|
||||
clear: both ;
|
||||
text-align: center }
|
||||
|
||||
.align-right {
|
||||
text-align: right }
|
||||
|
||||
/* reset inner alignment in figures */
|
||||
div.align-right {
|
||||
text-align: inherit }
|
||||
|
||||
/* div.align-center * { */
|
||||
/* text-align: left } */
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font: inherit }
|
||||
|
||||
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
pre.code .ln { color: grey; } /* line numbers */
|
||||
pre.code, code { background-color: #eeeeee }
|
||||
pre.code .comment, code .comment { color: #5C6576 }
|
||||
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
||||
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
||||
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
||||
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
||||
pre.code .inserted, code .inserted { background-color: #A3D289}
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid 1px gray;
|
||||
margin-left: 1px }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid 1px black;
|
||||
margin-left: 1px }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
/* "booktabs" style (no vertical lines) */
|
||||
table.docutils.booktabs {
|
||||
border: 0px;
|
||||
border-top: 2px solid;
|
||||
border-bottom: 2px solid;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
table.docutils.booktabs * {
|
||||
border: 0px;
|
||||
}
|
||||
table.docutils.booktabs th {
|
||||
border-bottom: thin solid;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="order-point-generator">
|
||||
<h1 class="title">Order point generator</h1>
|
||||
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/11.0/stock_orderpoint_generator"><img alt="OCA/stock-logistics-warehouse" src="https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/stock-logistics-warehouse-11-0/stock-logistics-warehouse-11-0-stock_orderpoint_generator"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/153/11.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p>Add a wizard to configure reordering rules for multiple products in one go,
|
||||
and allow to automatically update reordering rules from rule templates.</p>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
<div class="contents local topic" id="contents">
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#configuration" id="id1">Configuration</a></li>
|
||||
<li><a class="reference internal" href="#usage" id="id2">Usage</a></li>
|
||||
<li><a class="reference internal" href="#bug-tracker" id="id3">Bug Tracker</a></li>
|
||||
<li><a class="reference internal" href="#credits" id="id4">Credits</a><ul>
|
||||
<li><a class="reference internal" href="#authors" id="id5">Authors</a></li>
|
||||
<li><a class="reference internal" href="#contributors" id="id6">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="id7">Maintainers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="configuration">
|
||||
<h1><a class="toc-backref" href="#id1">Configuration</a></h1>
|
||||
<p>Reordering rule templates can be configured in “Inventory > Configuration >
|
||||
Products > Reordering Rule Templates”.</p>
|
||||
<p>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”.</p>
|
||||
</div>
|
||||
<div class="section" id="usage">
|
||||
<h1><a class="toc-backref" href="#id2">Usage</a></h1>
|
||||
<p>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.</p>
|
||||
<p>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.</p>
|
||||
</div>
|
||||
<div class="section" id="bug-tracker">
|
||||
<h1><a class="toc-backref" href="#id3">Bug Tracker</a></h1>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/issues">GitHub Issues</a>.
|
||||
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
|
||||
<a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_orderpoint_generator%0Aversion:%2011.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
<h1><a class="toc-backref" href="#id4">Credits</a></h1>
|
||||
<div class="section" id="authors">
|
||||
<h2><a class="toc-backref" href="#id5">Authors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Camptocamp</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="contributors">
|
||||
<h2><a class="toc-backref" href="#id6">Contributors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Yannick Vaucher <<a class="reference external" href="mailto:yannick.vaucher@camptocamp.com">yannick.vaucher@camptocamp.com</a>></li>
|
||||
<li>Matthieu Dietrich <<a class="reference external" href="mailto:matthieu.dietrich@camptocamp.com">matthieu.dietrich@camptocamp.com</a>></li>
|
||||
<li>Cyril Gaudin <<a class="reference external" href="mailto:cyril.gaudin@camptocamp.com">cyril.gaudin@camptocamp.com</a>></li>
|
||||
<li>Guewen Baconnier <<a class="reference external" href="mailto:guewen.baconnier@camptocamp.com">guewen.baconnier@camptocamp.com</a>></li>
|
||||
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
|
||||
<li>Vicent Cubells <<a class="reference external" href="mailto:vicent@vcubells.net">vicent@vcubells.net</a>></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
<h2><a class="toc-backref" href="#id7">Maintainers</a></h2>
|
||||
<p>This module is maintained by the OCA.</p>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
||||
<p>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.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/11.0/stock_orderpoint_generator">OCA/stock-logistics-warehouse</a> project on GitHub.</p>
|
||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -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
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -1,106 +1,108 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_warehouse_orderpoint_template_tree" model="ir.ui.view">
|
||||
<field name="name">stock.warehouse.orderpoint.template.tree</field>
|
||||
<field name="model">stock.warehouse.orderpoint.template</field>
|
||||
<field name="mode">primary</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Reordering Rule Templates">
|
||||
<field name="name"/>
|
||||
<field name="warehouse_id" groups="stock.group_locations"/>
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
<field name="product_min_qty"/>
|
||||
<field name="product_max_qty"/>
|
||||
<field name="auto_generate"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_warehouse_orderpoint_template_tree" model="ir.ui.view">
|
||||
<field name="name">stock.warehouse.orderpoint.template.tree</field>
|
||||
<field name="model">stock.warehouse.orderpoint.template</field>
|
||||
<field name="mode">primary</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Reordering Rule Templates">
|
||||
<field name="name"/>
|
||||
<field name="warehouse_id" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="location_id" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="product_min_qty"/>
|
||||
<field name="product_max_qty"/>
|
||||
<field name="auto_generate"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_warehouse_orderpoint_template_search">
|
||||
<field name="name">stock.warehouse.orderpoint.template.search</field>
|
||||
<field name="model">stock.warehouse.orderpoint.template</field>
|
||||
<field name="mode">primary</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Reordering Rule Templates Search">
|
||||
<field name="name" string="Reordering Rule Templates"/>
|
||||
<field name="warehouse_id"/>
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Warehouse" domain="[]" context="{'group_by':'warehouse_id'}"/>
|
||||
<filter string="Location" domain="[]" context="{'group_by':'location_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="view_warehouse_orderpoint_template_search">
|
||||
<field name="name">stock.warehouse.orderpoint.template.search</field>
|
||||
<field name="model">stock.warehouse.orderpoint.template</field>
|
||||
<field name="mode">primary</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Reordering Rule Templates Search">
|
||||
<field name="name" string="Reordering Rule Templates"/>
|
||||
<field name="warehouse_id"/>
|
||||
<field name="location_id" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Warehouse" domain="[]" context="{'group_by':'warehouse_id'}"/>
|
||||
<filter string="Location" domain="[]" context="{'group_by':'location_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_warehouse_orderpoint_template_form" model="ir.ui.view">
|
||||
<field name="name">stock.warehouse.orderpoint.template.form</field>
|
||||
<field name="model">stock.warehouse.orderpoint.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Reordering Rule Template">
|
||||
<header>
|
||||
<button name="create_auto_orderpoints" type="object" string="Generate Automatic Rules"
|
||||
help="Reordering rules will be created for the selected products. This is equivalent to the Scheduled Action action."
|
||||
attrs="{'invisible': [('auto_generate', '=', False)]}"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field name="name" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection" groups="stock.group_locations"/>
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
<field name="group_id" groups="stock.group_adv_location"/>
|
||||
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group string="Rules">
|
||||
<field name="product_min_qty" />
|
||||
<field name="product_max_qty" />
|
||||
<field name="qty_multiple" string="Quantity Multiple"/>
|
||||
</group>
|
||||
<group string="Misc">
|
||||
<field name="active" />
|
||||
<field name="auto_generate"/>
|
||||
<label for="lead_days"/>
|
||||
<div class="o_row">
|
||||
<field name="lead_days"/>
|
||||
<field name="lead_type"/>
|
||||
</div>
|
||||
</group>
|
||||
<group string="Automatic Rules" name="auto_rules" attrs="{'invisible': [('auto_generate', '=', False)]}">
|
||||
<field name="auto_product_ids"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
<record id="view_warehouse_orderpoint_template_form" model="ir.ui.view">
|
||||
<field name="name">stock.warehouse.orderpoint.template.form</field>
|
||||
<field name="model">stock.warehouse.orderpoint.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Reordering Rule Template">
|
||||
<header>
|
||||
<button name="create_auto_orderpoints" type="object" string="Generate Automatic Rules"
|
||||
help="Reordering rules will be created for the selected products. This is equivalent to the Scheduled Action action."
|
||||
attrs="{'invisible': [('auto_generate', '=', False)]}"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field name="name" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="warehouse_id" widget="selection" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="location_id" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="group_id" groups="stock.group_adv_location"/>
|
||||
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group string="Rules">
|
||||
<field name="product_min_qty" />
|
||||
<field name="product_max_qty" />
|
||||
<field name="qty_multiple" string="Quantity Multiple"/>
|
||||
</group>
|
||||
<group string="Misc">
|
||||
<field name="active" />
|
||||
<field name="auto_generate"/>
|
||||
<label for="lead_days"/>
|
||||
<div class="o_row">
|
||||
<field name="lead_days"/>
|
||||
<field name="lead_type"/>
|
||||
</div>
|
||||
</group>
|
||||
</group>
|
||||
<notebook attrs="{'invisible': [('auto_generate', '=', False)]}">
|
||||
<page string="Products" name="auto_rules">
|
||||
<field name="auto_product_ids"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_orderpoint_template" model="ir.actions.act_window">
|
||||
<field name="name">Reordering Rule Templates</field>
|
||||
<field name="res_model">stock.warehouse.orderpoint.template</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_warehouse_orderpoint_template_tree"/>
|
||||
<field name="search_view_id" ref="view_warehouse_orderpoint_template_search" />
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Click to add a reordering rule template.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_orderpoint_template" model="ir.actions.act_window">
|
||||
<field name="name">Reordering Rule Templates</field>
|
||||
<field name="res_model">stock.warehouse.orderpoint.template</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_warehouse_orderpoint_template_tree"/>
|
||||
<field name="search_view_id" ref="view_warehouse_orderpoint_template_search" />
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Click to add a reordering rule template.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
id="menu_orderpoint_template" name="Reordering Rule Templates"
|
||||
parent="stock.menu_product_in_config_stock"
|
||||
action="action_orderpoint_template"
|
||||
<menuitem
|
||||
id="menu_orderpoint_template" name="Reordering Rule Templates"
|
||||
parent="stock.menu_product_in_config_stock"
|
||||
action="action_orderpoint_template"
|
||||
/>
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="product_normal_form_view" model="ir.ui.view">
|
||||
<field name="name">product.product.form</field>
|
||||
<field name="model">product.product</field>
|
||||
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="seller_ids" position="before">
|
||||
<separator string="Automatic Reordering Rules"/>
|
||||
<field name="auto_orderpoint_template_ids" context="{'default_auto_generate': True}"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -1,3 +1 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import orderpoint_generator
|
||||
|
||||
@@ -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'
|
||||
)
|
||||
|
||||
|
||||
@@ -34,5 +34,4 @@
|
||||
key2="client_action_multi"
|
||||
id="act_create_product_template_conf"/>
|
||||
|
||||
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user