[MIG] mrp_stock_orderpoint_manual_procurement: Migration to 13.0

This commit is contained in:
ps-tubtim
2020-10-29 14:23:44 +07:00
parent e2c30f1a0e
commit a32c3d337c
10 changed files with 52 additions and 33 deletions

View File

@@ -14,13 +14,13 @@ MRP Stock Orderpoint Manual Procurement
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github
:target: https://github.com/OCA/manufacture/tree/12.0/mrp_stock_orderpoint_manual_procurement
:target: https://github.com/OCA/manufacture/tree/13.0/mrp_stock_orderpoint_manual_procurement
:alt: OCA/manufacture
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/manufacture-12-0/manufacture-12-0-mrp_stock_orderpoint_manual_procurement
:target: https://translation.odoo-community.org/projects/manufacture-13-0/manufacture-13-0-mrp_stock_orderpoint_manual_procurement
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/129/12.0
:target: https://runbot.odoo-community.org/runbot/129/13.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -46,7 +46,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/manufacture/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/manufacture/issues/new?body=module:%20mrp_stock_orderpoint_manual_procurement%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/manufacture/issues/new?body=module:%20mrp_stock_orderpoint_manual_procurement%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.
@@ -56,13 +56,14 @@ Credits
Authors
~~~~~~~
* Eficent
* Forgeflow
Contributors
~~~~~~~~~~~~
* Adria Gil Sorribes <adria.gil@eficent.com>
* Lois Rilo Antelo <lois.rilo@eficent.com>
* Adria Gil Sorribes <adria.gil@forgeflow.com>
* Lois Rilo Antelo <lois.rilo@forgeflow.com>
* 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/manufacture <https://github.com/OCA/manufacture/tree/12.0/mrp_stock_orderpoint_manual_procurement>`_ project on GitHub.
This module is part of the `OCA/manufacture <https://github.com/OCA/manufacture/tree/13.0/mrp_stock_orderpoint_manual_procurement>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@@ -1,12 +1,11 @@
# Copyright 2018 Eficent Business and IT Consulting Services S.L.
# (http://www.eficent.com)
# Copyright 2018-20 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "MRP Stock Orderpoint Manual Procurement",
"summary": "Updates the value of MO Responsible and keeps track"
"of changes regarding this field",
"version": "13.0.1.0.0",
"author": "Eficent, " "Odoo Community Association (OCA)",
"author": "Forgeflow, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/manufacture",
"category": "Manufacturing",
"depends": ["mrp", "stock_orderpoint_manual_procurement"],

View File

@@ -1,4 +1,4 @@
# Copyright 2019 Eficent Business and IT Consulting Services S.L.
# Copyright 2019-20 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models

View File

@@ -1,4 +1,4 @@
# Copyright 2019 Eficent Business and IT Consulting Services S.L.
# Copyright 2019-20 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
@@ -15,11 +15,20 @@ class StockRule(models.Model):
location_id,
name,
origin,
company_id,
values,
bom,
):
res = super(StockRule, self)._prepare_mo_vals(
product_id, product_qty, product_uom, location_id, name, origin, values, bom
product_id,
product_qty,
product_uom,
location_id,
name,
origin,
company_id,
values,
bom,
)
requested_uid = self.env.context.get("requested_uid")
if requested_uid:

View File

@@ -1,2 +1,3 @@
* Adria Gil Sorribes <adria.gil@eficent.com>
* Lois Rilo Antelo <lois.rilo@eficent.com>
* Adria Gil Sorribes <adria.gil@forgeflow.com>
* Lois Rilo Antelo <lois.rilo@forgeflow.com>
* 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/manufacture/tree/12.0/mrp_stock_orderpoint_manual_procurement"><img alt="OCA/manufacture" src="https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/manufacture-12-0/manufacture-12-0-mrp_stock_orderpoint_manual_procurement"><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/129/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/manufacture/tree/13.0/mrp_stock_orderpoint_manual_procurement"><img alt="OCA/manufacture" src="https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/manufacture-13-0/manufacture-13-0-mrp_stock_orderpoint_manual_procurement"><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/129/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module updates a new field <em>Requested by</em> in Manufacturing Orders
in the case the MO has been created as a result of a manual procurement from
an orderpoint.</p>
@@ -394,7 +394,7 @@ Your user will be set as <em>Requeste by</em> in the newly created MO.</p>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/manufacture/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/manufacture/issues/new?body=module:%20mrp_stock_orderpoint_manual_procurement%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/manufacture/issues/new?body=module:%20mrp_stock_orderpoint_manual_procurement%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">
@@ -402,14 +402,15 @@ 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>Adria Gil Sorribes &lt;<a class="reference external" href="mailto:adria.gil&#64;eficent.com">adria.gil&#64;eficent.com</a>&gt;</li>
<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>Adria Gil Sorribes &lt;<a class="reference external" href="mailto:adria.gil&#64;forgeflow.com">adria.gil&#64;forgeflow.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>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/manufacture/tree/12.0/mrp_stock_orderpoint_manual_procurement">OCA/manufacture</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/manufacture/tree/13.0/mrp_stock_orderpoint_manual_procurement">OCA/manufacture</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

@@ -1,4 +1,4 @@
# Copyright 2019 Eficent Business and IT Consulting Services S.L.
# Copyright 2019-20 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests.common import TransactionCase
@@ -46,7 +46,6 @@ class TestMrpManualProcurement(TransactionCase):
"picking_type_id": self.env.ref(
"stock.picking_type_internal"
).id,
"propagate": True,
},
)
],
@@ -105,7 +104,9 @@ class TestMrpManualProcurement(TransactionCase):
"active_ids": orderpoint.ids,
"active_id": orderpoint.id,
}
wizard = self.manual_procurement_wiz.sudo(user).with_context(context).create({})
wizard = (
self.manual_procurement_wiz.with_user(user).with_context(context).create({})
)
wizard.make_procurement()
return wizard

View File

@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2019 Eficent Business and IT Consulting Services S.L.
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2019-20 ForgeFlow S.L. (https://www.forgeflow.com)
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0) -->
<odoo>
<record id="mrp_production_form_view" model="ir.ui.view">
<field name="name">mrp.production.form - mrp_stock_orderpoint_manual_procurement</field>
<field
name="name"
>mrp.production.form - mrp_stock_orderpoint_manual_procurement</field>
<field name="model">mrp.production</field>
<field name="inherit_id" ref="mrp.mrp_production_form_view"/>
<field name="inherit_id" ref="mrp.mrp_production_form_view" />
<field name="arch" type="xml">
<field name="availability" position="after">
<field name="requested_by"/>
<field name="location_dest_id" position="after">
<field name="requested_by" />
</field>
</field>
</record>
</odoo>

View File

@@ -0,0 +1 @@
../../../../mrp_stock_orderpoint_manual_procurement

View File

@@ -0,0 +1,6 @@
import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)