[MIG] stock_orderpoint_manual_procurement: Migration to 14.0

This commit is contained in:
Dũng (Trần Đình)
2021-05-06 12:02:42 +07:00
committed by Hai Lang
parent b2dcea8912
commit 9ebef685a6
9 changed files with 47 additions and 17 deletions

View File

@@ -14,13 +14,13 @@ 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%2Fstock--logistics--warehouse-lightgray.png?logo=github
:target: https://github.com/OCA/stock-logistics-warehouse/tree/13.0/stock_orderpoint_manual_procurement
:target: https://github.com/OCA/stock-logistics-warehouse/tree/14.0/stock_orderpoint_manual_procurement
: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-13-0/stock-logistics-warehouse-13-0-stock_orderpoint_manual_procurement
:target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-14-0/stock-logistics-warehouse-14-0-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/153/13.0
:target: https://runbot.odoo-community.org/runbot/153/14.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -56,7 +56,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%0Aversion:%2013.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%0Aversion:%2014.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.
@@ -77,6 +77,15 @@ Contributors
* Kitti Upariphutthiphong <kittiu@ecosoft.co.th>
* Joan Sisquella Andrés <joan.sisquella@forgeflow.com>
* `Trobz <https://trobz.com>`_:
* Dung Tran <dungtd@trobz.com>
Other credits
~~~~~~~~~~~~~
The migration of this module from 13.0 to 14.0 was financially supported by Camptocamp
Maintainers
~~~~~~~~~~~
@@ -90,6 +99,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/13.0/stock_orderpoint_manual_procurement>`_ project on GitHub.
This module is part of the `OCA/stock-logistics-warehouse <https://github.com/OCA/stock-logistics-warehouse/tree/14.0/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

@@ -5,13 +5,14 @@
"name": "Stock Orderpoint Manual Procurement",
"summary": "Allows to create procurement orders from orderpoints instead "
"of relying only on the scheduler.",
"version": "13.0.1.0.0",
"version": "14.0.1.0.0",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/stock-logistics-warehouse",
"category": "Warehouse Management",
"depends": ["purchase_stock"],
"demo": ["demo/product.xml"],
"data": [
"security/ir.model.access.csv",
"security/stock_orderpoint_manual_procurement_security.xml",
"wizards/make_procurement_orderpoint_view.xml",
"views/stock_warehouse_orderpoint_view.xml",

View File

@@ -1,7 +1,6 @@
# Copyright 2016-20 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from datetime import datetime
from odoo import api, fields, models
from odoo.tools import float_compare, float_round
@@ -51,10 +50,10 @@ class StockWarehouseOrderpoint(models.Model):
float_compare(
virtual_qty,
op.product_min_qty,
precision_rounding=op.product_uom.rounding,
precision_rounding=op.product_uom.rounding or 0.01,
)
< 0
):
qty = op._get_procure_recommended_qty(virtual_qty, op_qtys)
op.procure_recommended_qty = qty
op.procure_recommended_date = op._get_date_planned(qty, datetime.today())
op.procure_recommended_date = op.lead_days_date

View File

@@ -3,3 +3,7 @@
* Bhavesh Odedra <bodedra@opensourceintegrators.com>
* Kitti Upariphutthiphong <kittiu@ecosoft.co.th>
* Joan Sisquella Andrés <joan.sisquella@forgeflow.com>
* `Trobz <https://trobz.com>`_:
* Dung Tran <dungtd@trobz.com>

View File

@@ -0,0 +1 @@
The migration of this module from 13.0 to 14.0 was financially supported by Camptocamp

View File

@@ -0,0 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_make_procurement_orderpoint_wizard,make.procurement.orderpoint wizard,model_make_procurement_orderpoint,stock.group_stock_user,1,1,1,1
access_make_procurement_orderpoint_item_wizard,make.procurement.orderpoint.item wizard,model_make_procurement_orderpoint_item,stock.group_stock_user,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_make_procurement_orderpoint_wizard make.procurement.orderpoint wizard model_make_procurement_orderpoint stock.group_stock_user 1 1 1 1
3 access_make_procurement_orderpoint_item_wizard make.procurement.orderpoint.item wizard model_make_procurement_orderpoint_item stock.group_stock_user 1 1 1 1

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" ?>
<odoo noupdate="1">
<record id="group_change_orderpoint_procure_qty" model="res.groups">
<field
name="name"
@@ -7,4 +8,5 @@
<field name="implied_ids" eval="[(4, ref('base.group_user'))]" />
<field name="category_id" ref="base.module_category_hidden" />
</record>
</odoo>

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/13.0/stock_orderpoint_manual_procurement"><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"><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><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/14.0/stock_orderpoint_manual_procurement"><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-14-0/stock-logistics-warehouse-14-0-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/153/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module allows users to manually start procurements from the list of reordering rules,
based on the quantity that is recommended to be procured.</p>
<p><strong>Table of contents</strong></p>
@@ -379,7 +379,8 @@ based on the quantity that is recommended to be procured.</p>
<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>
<li><a class="reference internal" href="#other-credits" id="id7">Other credits</a></li>
<li><a class="reference internal" href="#maintainers" id="id8">Maintainers</a></li>
</ul>
</li>
</ul>
@@ -403,7 +404,7 @@ procurement unit of 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%0Aversion:%2013.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%0Aversion:%2014.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">
@@ -422,16 +423,24 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<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>Joan Sisquella Andrés &lt;<a class="reference external" href="mailto:joan.sisquella&#64;forgeflow.com">joan.sisquella&#64;forgeflow.com</a>&gt;</li>
<li><a class="reference external" href="https://trobz.com">Trobz</a>:<ul>
<li>Dung Tran &lt;<a class="reference external" href="mailto:dungtd&#64;trobz.com">dungtd&#64;trobz.com</a>&gt;</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="other-credits">
<h2><a class="toc-backref" href="#id7">Other credits</a></h2>
<p>The migration of this module from 13.0 to 14.0 was financially supported by Camptocamp</p>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#id7">Maintainers</a></h2>
<h2><a class="toc-backref" href="#id8">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/13.0/stock_orderpoint_manual_procurement">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/14.0/stock_orderpoint_manual_procurement">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

@@ -3,16 +3,18 @@
<record id="view_warehouse_orderpoint_tree" model="ir.ui.view">
<field name="name">stock.warehouse.orderpoint.tree</field>
<field name="model">stock.warehouse.orderpoint</field>
<field name="inherit_id" ref="stock.view_warehouse_orderpoint_tree" />
<field name="inherit_id" ref="stock.view_warehouse_orderpoint_tree_editable" />
<field name="arch" type="xml">
<field name="product_uom" position="after">
<field name="product_uom_name" position="after">
<field name="procure_recommended_qty" />
<field name="procure_recommended_date" />
<button
string="Create Procurement"
string=""
title="Create Procurement"
name="%(stock_orderpoint_manual_procurement.act_make_procurement_from_orderpoint)d"
icon="fa-cogs"
type="action"
class="btn-default"
/>
</field>
</field>