[MIG] stock_orderpoint_manual_procurement_uom: Migration to 13.0

This commit is contained in:
ps-tubtim
2020-10-20 17:13:26 +07:00
committed by Miquel Raïch
parent 69ebd208e4
commit e6befe278b
6 changed files with 23 additions and 21 deletions

View File

@@ -14,13 +14,13 @@ Stock Orderpoint Manual Procurement UoM
: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/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
.. |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
.. |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
|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>`_.
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_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.
@@ -55,14 +55,15 @@ Credits
Authors
~~~~~~~
* Eficent
* ForgeFlow
Contributors
~~~~~~~~~~~~
* Lois Rilo Antelo <lois.rilo@eficent.com>
* Lois Rilo Antelo <lois.rilo@forgeflow.com>
* Bhavesh Odedra <bodedra@opensourceintegrators.com>
* Kitti Upariphutthiphong <kittiu@ecosoft.co.th>
* Pimolnat Suntian <pimolnats@ecosoft.co.th>
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
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.

View File

@@ -5,7 +5,7 @@
"summary": "Glue module for stock_orderpoint_uom and "
"stock_orderpoint_manual_procurement",
"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",
"category": "Warehouse Management",
"depends": ["stock_orderpoint_uom", "stock_orderpoint_manual_procurement"],

View File

@@ -1,13 +1,12 @@
# Copyright 2018-20 ForgeFlow S.L. (https://www.forgeflow.com)
# 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):
_inherit = "stock.warehouse.orderpoint"
@api.multi
def _get_procure_recommended_qty(self, virtual_qty, op_qtys):
product_qty = super(
StockWarehouseOrderpoint, self

View File

@@ -1,3 +1,4 @@
* Lois Rilo Antelo <lois.rilo@eficent.com>
* Lois Rilo Antelo <lois.rilo@forgeflow.com>
* Bhavesh Odedra <bodedra@opensourceintegrators.com>
* Kitti Upariphutthiphong <kittiu@ecosoft.co.th>
* Pimolnat Suntian <pimolnats@ecosoft.co.th>

View File

@@ -367,7 +367,7 @@ ul.auto-toc {
!! 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/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
<tt class="docutils literal">stock_orderpoint_manual_procurement</tt></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>.
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_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>
</div>
<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">
<h2><a class="toc-backref" href="#id4">Authors</a></h2>
<ul class="simple">
<li>Eficent</li>
<li>ForgeFlow</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#id5">Contributors</a></h2>
<ul class="simple">
<li>Lois Rilo Antelo &lt;<a class="reference external" href="mailto:lois.rilo&#64;eficent.com">lois.rilo&#64;eficent.com</a>&gt;</li>
<li>Lois Rilo Antelo &lt;<a class="reference external" href="mailto:lois.rilo&#64;forgeflow.com">lois.rilo&#64;forgeflow.com</a>&gt;</li>
<li>Bhavesh Odedra &lt;<a class="reference external" href="mailto:bodedra&#64;opensourceintegrators.com">bodedra&#64;opensourceintegrators.com</a>&gt;</li>
<li>Kitti Upariphutthiphong &lt;<a class="reference external" href="mailto:kittiu&#64;ecosoft.co.th">kittiu&#64;ecosoft.co.th</a>&gt;</li>
<li>Pimolnat Suntian &lt;<a class="reference external" href="mailto:pimolnats&#64;ecosoft.co.th">pimolnats&#64;ecosoft.co.th</a>&gt;</li>
</ul>
</div>
<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
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/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>
</div>
</div>

View File

@@ -51,7 +51,7 @@ class TestStockWarehouseOrderpoint(common.TransactionCase):
# Add default quantity
quantity = 20.00
self._update_product_qty(self.product, self.location, quantity)
self._update_product_qty(self.product, quantity)
# Create Reordering Rule
self.reorder = self.create_orderpoint()
@@ -90,12 +90,12 @@ class TestStockWarehouseOrderpoint(common.TransactionCase):
)
return product
def _update_product_qty(self, product, location, quantity):
def _update_product_qty(self, product, quantity):
"""Update Product quantity."""
change_product_qty = self.stock_change_model.create(
{
"location_id": location.id,
"product_id": product.id,
"product_tmpl_id": product.product_tmpl_id.id,
"new_quantity": quantity,
}
)
@@ -104,7 +104,7 @@ class TestStockWarehouseOrderpoint(common.TransactionCase):
def create_orderpoint(self):
"""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",
"product_id": self.product.id,
@@ -124,7 +124,7 @@ class TestStockWarehouseOrderpoint(common.TransactionCase):
"active_id": self.reorder.id,
}
wizard = (
self.make_procurement_orderpoint_model.sudo(self.user)
self.make_procurement_orderpoint_model.with_user(self.user)
.with_context(context)
.create({})
)