mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[MIG] stock_orderpoint_manual_procurement_uom: Migration to 13.0
This commit is contained in:
@@ -14,13 +14,13 @@ Stock Orderpoint Manual Procurement UoM
|
|||||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
:alt: License: AGPL-3
|
:alt: License: AGPL-3
|
||||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github
|
.. |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_manual_procurement_uom
|
:target: https://github.com/OCA/stock-logistics-warehouse/tree/13.0/stock_orderpoint_manual_procurement_uom
|
||||||
:alt: OCA/stock-logistics-warehouse
|
:alt: OCA/stock-logistics-warehouse
|
||||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
.. |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_manual_procurement_uom
|
:target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-13-0/stock-logistics-warehouse-13-0-stock_orderpoint_manual_procurement_uom
|
||||||
:alt: Translate me on Weblate
|
:alt: Translate me on Weblate
|
||||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||||
:target: https://runbot.odoo-community.org/runbot/153/12.0
|
:target: https://runbot.odoo-community.org/runbot/153/13.0
|
||||||
:alt: Try me on Runbot
|
:alt: Try me on Runbot
|
||||||
|
|
||||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||||
@@ -45,7 +45,7 @@ Bug Tracker
|
|||||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-warehouse/issues>`_.
|
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.
|
In case of trouble, please check there if your issue has already been reported.
|
||||||
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
||||||
`feedback <https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_orderpoint_manual_procurement_uom%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
`feedback <https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_orderpoint_manual_procurement_uom%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.
|
Do not contact contributors directly about support or help with technical issues.
|
||||||
|
|
||||||
@@ -55,14 +55,15 @@ Credits
|
|||||||
Authors
|
Authors
|
||||||
~~~~~~~
|
~~~~~~~
|
||||||
|
|
||||||
* Eficent
|
* ForgeFlow
|
||||||
|
|
||||||
Contributors
|
Contributors
|
||||||
~~~~~~~~~~~~
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
* Lois Rilo Antelo <lois.rilo@eficent.com>
|
* Lois Rilo Antelo <lois.rilo@forgeflow.com>
|
||||||
* Bhavesh Odedra <bodedra@opensourceintegrators.com>
|
* Bhavesh Odedra <bodedra@opensourceintegrators.com>
|
||||||
* Kitti Upariphutthiphong <kittiu@ecosoft.co.th>
|
* Kitti Upariphutthiphong <kittiu@ecosoft.co.th>
|
||||||
|
* Pimolnat Suntian <pimolnats@ecosoft.co.th>
|
||||||
|
|
||||||
Maintainers
|
Maintainers
|
||||||
~~~~~~~~~~~
|
~~~~~~~~~~~
|
||||||
@@ -77,6 +78,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|||||||
mission is to support the collaborative development of Odoo features and
|
mission is to support the collaborative development of Odoo features and
|
||||||
promote its widespread use.
|
promote its widespread use.
|
||||||
|
|
||||||
This module is part of the `OCA/stock-logistics-warehouse <https://github.com/OCA/stock-logistics-warehouse/tree/12.0/stock_orderpoint_manual_procurement_uom>`_ project on GitHub.
|
This module is part of the `OCA/stock-logistics-warehouse <https://github.com/OCA/stock-logistics-warehouse/tree/13.0/stock_orderpoint_manual_procurement_uom>`_ project on GitHub.
|
||||||
|
|
||||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"summary": "Glue module for stock_orderpoint_uom and "
|
"summary": "Glue module for stock_orderpoint_uom and "
|
||||||
"stock_orderpoint_manual_procurement",
|
"stock_orderpoint_manual_procurement",
|
||||||
"version": "13.0.1.0.0",
|
"version": "13.0.1.0.0",
|
||||||
"author": "Eficent, Odoo Community Association (OCA)",
|
"author": "ForgeFlow, Odoo Community Association (OCA)",
|
||||||
"website": "https://github.com/OCA/stock-logistics-warehouse",
|
"website": "https://github.com/OCA/stock-logistics-warehouse",
|
||||||
"category": "Warehouse Management",
|
"category": "Warehouse Management",
|
||||||
"depends": ["stock_orderpoint_uom", "stock_orderpoint_manual_procurement"],
|
"depends": ["stock_orderpoint_uom", "stock_orderpoint_manual_procurement"],
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
# Copyright 2018-20 ForgeFlow S.L. (https://www.forgeflow.com)
|
# Copyright 2018-20 ForgeFlow S.L. (https://www.forgeflow.com)
|
||||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||||
|
|
||||||
from odoo import api, models
|
from odoo import models
|
||||||
|
|
||||||
|
|
||||||
class StockWarehouseOrderpoint(models.Model):
|
class StockWarehouseOrderpoint(models.Model):
|
||||||
_inherit = "stock.warehouse.orderpoint"
|
_inherit = "stock.warehouse.orderpoint"
|
||||||
|
|
||||||
@api.multi
|
|
||||||
def _get_procure_recommended_qty(self, virtual_qty, op_qtys):
|
def _get_procure_recommended_qty(self, virtual_qty, op_qtys):
|
||||||
product_qty = super(
|
product_qty = super(
|
||||||
StockWarehouseOrderpoint, self
|
StockWarehouseOrderpoint, self
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
* Lois Rilo Antelo <lois.rilo@eficent.com>
|
* Lois Rilo Antelo <lois.rilo@forgeflow.com>
|
||||||
* Bhavesh Odedra <bodedra@opensourceintegrators.com>
|
* Bhavesh Odedra <bodedra@opensourceintegrators.com>
|
||||||
* Kitti Upariphutthiphong <kittiu@ecosoft.co.th>
|
* Kitti Upariphutthiphong <kittiu@ecosoft.co.th>
|
||||||
|
* Pimolnat Suntian <pimolnats@ecosoft.co.th>
|
||||||
|
|||||||
@@ -367,7 +367,7 @@ ul.auto-toc {
|
|||||||
!! This file is generated by oca-gen-addon-readme !!
|
!! This file is generated by oca-gen-addon-readme !!
|
||||||
!! changes will be overwritten. !!
|
!! 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/12.0/stock_orderpoint_manual_procurement_uom"><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-12-0/stock-logistics-warehouse-12-0-stock_orderpoint_manual_procurement_uom"><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/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
<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/13.0/stock_orderpoint_manual_procurement_uom"><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-13-0/stock-logistics-warehouse-13-0-stock_orderpoint_manual_procurement_uom"><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/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||||
<p>Glue module for <tt class="docutils literal">stock_orderpoint_uom</tt> and
|
<p>Glue module for <tt class="docutils literal">stock_orderpoint_uom</tt> and
|
||||||
<tt class="docutils literal">stock_orderpoint_manual_procurement</tt></p>
|
<tt class="docutils literal">stock_orderpoint_manual_procurement</tt></p>
|
||||||
<p><strong>Table of contents</strong></p>
|
<p><strong>Table of contents</strong></p>
|
||||||
@@ -393,7 +393,7 @@ measure indicated in the reordering rule.</p>
|
|||||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/issues">GitHub Issues</a>.
|
<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.
|
In case of trouble, please check there if your issue has already been reported.
|
||||||
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
If you spotted it first, help us 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_manual_procurement_uom%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
<a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_orderpoint_manual_procurement_uom%0Aversion:%2013.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>
|
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="credits">
|
<div class="section" id="credits">
|
||||||
@@ -401,15 +401,16 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
|||||||
<div class="section" id="authors">
|
<div class="section" id="authors">
|
||||||
<h2><a class="toc-backref" href="#id4">Authors</a></h2>
|
<h2><a class="toc-backref" href="#id4">Authors</a></h2>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li>Eficent</li>
|
<li>ForgeFlow</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="contributors">
|
<div class="section" id="contributors">
|
||||||
<h2><a class="toc-backref" href="#id5">Contributors</a></h2>
|
<h2><a class="toc-backref" href="#id5">Contributors</a></h2>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li>Lois Rilo Antelo <<a class="reference external" href="mailto:lois.rilo@eficent.com">lois.rilo@eficent.com</a>></li>
|
<li>Lois Rilo Antelo <<a class="reference external" href="mailto:lois.rilo@forgeflow.com">lois.rilo@forgeflow.com</a>></li>
|
||||||
<li>Bhavesh Odedra <<a class="reference external" href="mailto:bodedra@opensourceintegrators.com">bodedra@opensourceintegrators.com</a>></li>
|
<li>Bhavesh Odedra <<a class="reference external" href="mailto:bodedra@opensourceintegrators.com">bodedra@opensourceintegrators.com</a>></li>
|
||||||
<li>Kitti Upariphutthiphong <<a class="reference external" href="mailto:kittiu@ecosoft.co.th">kittiu@ecosoft.co.th</a>></li>
|
<li>Kitti Upariphutthiphong <<a class="reference external" href="mailto:kittiu@ecosoft.co.th">kittiu@ecosoft.co.th</a>></li>
|
||||||
|
<li>Pimolnat Suntian <<a class="reference external" href="mailto:pimolnats@ecosoft.co.th">pimolnats@ecosoft.co.th</a>></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="maintainers">
|
<div class="section" id="maintainers">
|
||||||
@@ -419,7 +420,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
|||||||
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||||
mission is to support the collaborative development of Odoo features and
|
mission is to support the collaborative development of Odoo features and
|
||||||
promote its widespread use.</p>
|
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/12.0/stock_orderpoint_manual_procurement_uom">OCA/stock-logistics-warehouse</a> project on GitHub.</p>
|
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/13.0/stock_orderpoint_manual_procurement_uom">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>
|
<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>
|
</div>
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class TestStockWarehouseOrderpoint(common.TransactionCase):
|
|||||||
|
|
||||||
# Add default quantity
|
# Add default quantity
|
||||||
quantity = 20.00
|
quantity = 20.00
|
||||||
self._update_product_qty(self.product, self.location, quantity)
|
self._update_product_qty(self.product, quantity)
|
||||||
|
|
||||||
# Create Reordering Rule
|
# Create Reordering Rule
|
||||||
self.reorder = self.create_orderpoint()
|
self.reorder = self.create_orderpoint()
|
||||||
@@ -90,12 +90,12 @@ class TestStockWarehouseOrderpoint(common.TransactionCase):
|
|||||||
)
|
)
|
||||||
return product
|
return product
|
||||||
|
|
||||||
def _update_product_qty(self, product, location, quantity):
|
def _update_product_qty(self, product, quantity):
|
||||||
"""Update Product quantity."""
|
"""Update Product quantity."""
|
||||||
change_product_qty = self.stock_change_model.create(
|
change_product_qty = self.stock_change_model.create(
|
||||||
{
|
{
|
||||||
"location_id": location.id,
|
|
||||||
"product_id": product.id,
|
"product_id": product.id,
|
||||||
|
"product_tmpl_id": product.product_tmpl_id.id,
|
||||||
"new_quantity": quantity,
|
"new_quantity": quantity,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -104,7 +104,7 @@ class TestStockWarehouseOrderpoint(common.TransactionCase):
|
|||||||
|
|
||||||
def create_orderpoint(self):
|
def create_orderpoint(self):
|
||||||
"""Create a Reordering Rule"""
|
"""Create a Reordering Rule"""
|
||||||
reorder = self.reordering_rule_model.sudo(self.user).create(
|
reorder = self.reordering_rule_model.with_user(self.user).create(
|
||||||
{
|
{
|
||||||
"name": "Order-point",
|
"name": "Order-point",
|
||||||
"product_id": self.product.id,
|
"product_id": self.product.id,
|
||||||
@@ -124,7 +124,7 @@ class TestStockWarehouseOrderpoint(common.TransactionCase):
|
|||||||
"active_id": self.reorder.id,
|
"active_id": self.reorder.id,
|
||||||
}
|
}
|
||||||
wizard = (
|
wizard = (
|
||||||
self.make_procurement_orderpoint_model.sudo(self.user)
|
self.make_procurement_orderpoint_model.with_user(self.user)
|
||||||
.with_context(context)
|
.with_context(context)
|
||||||
.create({})
|
.create({})
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user