From d3dff21866eac4af92acd81dc4ed8e2b34a7af82 Mon Sep 17 00:00:00 2001 From: Kitti U Date: Fri, 22 Feb 2019 15:11:03 +0700 Subject: [PATCH] [ADD] 12.0-mig-stock_orderpoint_move_link --- stock_orderpoint_move_link/README.rst | 72 ++- stock_orderpoint_move_link/__init__.py | 2 + stock_orderpoint_move_link/__manifest__.py | 7 +- stock_orderpoint_move_link/models/__init__.py | 4 +- .../models/{procurement_rule.py => stock.py} | 9 +- .../models/stock_move.py | 3 +- .../readme/CONTRIBUTORS.rst | 2 + .../readme/DESCRIPTION.rst | 2 + .../static/description/index.html | 421 ++++++++++++++++++ 9 files changed, 486 insertions(+), 36 deletions(-) rename stock_orderpoint_move_link/models/{procurement_rule.py => stock.py} (75%) create mode 100644 stock_orderpoint_move_link/readme/CONTRIBUTORS.rst create mode 100644 stock_orderpoint_move_link/readme/DESCRIPTION.rst create mode 100644 stock_orderpoint_move_link/static/description/index.html diff --git a/stock_orderpoint_move_link/README.rst b/stock_orderpoint_move_link/README.rst index 95bd09558..7629d0122 100644 --- a/stock_orderpoint_move_link/README.rst +++ b/stock_orderpoint_move_link/README.rst @@ -1,51 +1,75 @@ -.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg - :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html - :alt: License: LGPL-3 - -============================== +========================== Stock Orderpoint Move Link -============================== +========================== -This module adds to stock moves a direct link to the reordering rules -that created them. In chained moves, the reordering rule is propagated. +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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-LGPL--3-blue.png + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-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/12.0/stock_orderpoint_move_link + :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-12-0/stock-logistics-warehouse-12-0-stock_orderpoint_move_link + :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/12.0 + :alt: Try me on Runbot -Usage -===== +|badge1| |badge2| |badge3| |badge4| |badge5| -.. 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/11.0 +This module adds to stock moves a direct link to the reordering rules that created them. +In chained moves, the reordering rule is propagated. +**Table of contents** + +.. contents:: + :local: 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 ======= +Authors +~~~~~~~ + +* Eficent + Contributors ------------- +~~~~~~~~~~~~ -* Jordi Ballester +* Jordi Ballester Alomar +* Kitti Upariphutthiphong -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/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_move_link/__init__.py b/stock_orderpoint_move_link/__init__.py index 0650744f6..dc045bf6a 100644 --- a/stock_orderpoint_move_link/__init__.py +++ b/stock_orderpoint_move_link/__init__.py @@ -1 +1,3 @@ +# Copyright 2017 Eficent Business and IT Consulting Services, S.L. +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from . import models diff --git a/stock_orderpoint_move_link/__manifest__.py b/stock_orderpoint_move_link/__manifest__.py index d79c9a2c4..f537b9752 100644 --- a/stock_orderpoint_move_link/__manifest__.py +++ b/stock_orderpoint_move_link/__manifest__.py @@ -4,11 +4,10 @@ { "name": "Stock Orderpoint Move Link", "summary": "Link Reordering rules to stock moves", - "version": "11.0.1.0.0", + "version": "12.0.1.0.0", "license": "LGPL-3", "website": "https://github.com/stock-logistics-warehouse", - "author": "Eficent, " - "Odoo Community Association (OCA)", + "author": "Eficent, Odoo Community Association (OCA)", "category": "Warehouse Management", "depends": [ "stock", @@ -17,5 +16,5 @@ "views/stock_move_views.xml", ], "installable": True, - 'auto_install': False, + "auto_install": False, } diff --git a/stock_orderpoint_move_link/models/__init__.py b/stock_orderpoint_move_link/models/__init__.py index 0d85051fe..197db3d45 100644 --- a/stock_orderpoint_move_link/models/__init__.py +++ b/stock_orderpoint_move_link/models/__init__.py @@ -1,2 +1,4 @@ -from . import procurement_rule +# Copyright 2017 Eficent Business and IT Consulting Services, S.L. +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). +from . import stock from . import stock_move diff --git a/stock_orderpoint_move_link/models/procurement_rule.py b/stock_orderpoint_move_link/models/stock.py similarity index 75% rename from stock_orderpoint_move_link/models/procurement_rule.py rename to stock_orderpoint_move_link/models/stock.py index 7fe4a8759..b1706a75f 100644 --- a/stock_orderpoint_move_link/models/procurement_rule.py +++ b/stock_orderpoint_move_link/models/stock.py @@ -1,15 +1,14 @@ -# Copyright 2017 Eficent Business and IT Consulting Services, S.L. +# Copyright 2017 Eficent Business, IT Consulting Services, S.L., Ecosoft # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). - from odoo import models -class ProcurementRule(models.Model): - _inherit = 'procurement.rule' +class StockRule(models.Model): + _inherit = 'stock.rule' def _get_stock_move_values(self, product_id, product_qty, product_uom, location_id, name, origin, values, group_id): - vals = super(ProcurementRule, self)._get_stock_move_values( + vals = super()._get_stock_move_values( product_id, product_qty, product_uom, location_id, name, origin, values, group_id) if 'orderpoint_id' in values: diff --git a/stock_orderpoint_move_link/models/stock_move.py b/stock_orderpoint_move_link/models/stock_move.py index 56200d9c3..7c5f8f309 100644 --- a/stock_orderpoint_move_link/models/stock_move.py +++ b/stock_orderpoint_move_link/models/stock_move.py @@ -1,6 +1,5 @@ -# Copyright 2018 Eficent Business and IT Consulting Services, S.L. +# Copyright 2017 Eficent Business, IT Consulting Services, S.L. # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). - from odoo import fields, models diff --git a/stock_orderpoint_move_link/readme/CONTRIBUTORS.rst b/stock_orderpoint_move_link/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..7ac2aa759 --- /dev/null +++ b/stock_orderpoint_move_link/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Jordi Ballester Alomar +* Kitti Upariphutthiphong diff --git a/stock_orderpoint_move_link/readme/DESCRIPTION.rst b/stock_orderpoint_move_link/readme/DESCRIPTION.rst new file mode 100644 index 000000000..b6b601955 --- /dev/null +++ b/stock_orderpoint_move_link/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module adds to stock moves a direct link to the reordering rules that created them. +In chained moves, the reordering rule is propagated. diff --git a/stock_orderpoint_move_link/static/description/index.html b/stock_orderpoint_move_link/static/description/index.html new file mode 100644 index 000000000..ee315b1bf --- /dev/null +++ b/stock_orderpoint_move_link/static/description/index.html @@ -0,0 +1,421 @@ + + + + + + +Stock Orderpoint Move Link + + + + + +