mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[MIG] stock_pull_list: Migration to 16.0
This commit is contained in:
@@ -10,20 +10,20 @@ Stock Pull List
|
||||
!! source digest: sha256:5866967730daa2fba1551d9a481e2b57951921208c66b4ec1bacec6bd6982cb5
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
|
||||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
||||
:target: https://odoo-community.org/page/development-status
|
||||
:alt: Alpha
|
||||
:alt: Beta
|
||||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
|
||||
: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/14.0/stock_pull_list
|
||||
:target: https://github.com/OCA/stock-logistics-warehouse/tree/16.0/stock_pull_list
|
||||
: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-14-0/stock-logistics-warehouse-14-0-stock_pull_list
|
||||
:target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-16-0/stock-logistics-warehouse-16-0-stock_pull_list
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
||||
:target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-warehouse&target_branch=14.0
|
||||
:target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-warehouse&target_branch=16.0
|
||||
:alt: Try me on Runboat
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
@@ -32,11 +32,6 @@ The pull list checks the stock situation at the given location and calculates
|
||||
the shortfall quantities (quantity needed to cover all needs) for products.
|
||||
Procurements can be created for these shortfall quantities.
|
||||
|
||||
.. IMPORTANT::
|
||||
This is an alpha version, the data model and design can change at any time without warning.
|
||||
Only for development or testing purpose, do not use in production.
|
||||
`More details on development status <https://odoo-community.org/page/development-status>`_
|
||||
|
||||
**Table of contents**
|
||||
|
||||
.. contents::
|
||||
@@ -72,7 +67,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 to smash it by providing a detailed and welcomed
|
||||
`feedback <https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_pull_list%0Aversion:%2014.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_pull_list%0Aversion:%2016.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.
|
||||
|
||||
@@ -110,6 +105,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|
||||
|
||||
|maintainer-LoisRForgeFlow|
|
||||
|
||||
This module is part of the `OCA/stock-logistics-warehouse <https://github.com/OCA/stock-logistics-warehouse/tree/14.0/stock_pull_list>`_ project on GitHub.
|
||||
This module is part of the `OCA/stock-logistics-warehouse <https://github.com/OCA/stock-logistics-warehouse/tree/16.0/stock_pull_list>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
# Copyright 2020 ForgeFlow, S.L.
|
||||
# Copyright 2020-24 ForgeFlow, S.L.
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
{
|
||||
"name": "Stock Pull List",
|
||||
"summary": "The pull list checks the stock situation and calculates "
|
||||
"needed quantities.",
|
||||
"version": "14.0.1.2.1",
|
||||
"version": "16.0.1.0.0",
|
||||
"license": "AGPL-3",
|
||||
"website": "https://github.com/OCA/stock-logistics-warehouse",
|
||||
"author": "ForgeFlow, " "Odoo Community Association (OCA)",
|
||||
"author": "ForgeFlow, Odoo Community Association (OCA)",
|
||||
"maintainers": ["LoisRForgeFlow"],
|
||||
"development_status": "Alpha",
|
||||
"development_status": "Beta",
|
||||
"category": "Warehouse Management",
|
||||
"depends": ["stock", "stock_free_quantity"],
|
||||
"data": [
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
from . import stock_picking
|
||||
from . import stock_picking_type
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
# Copyright 2020-24 ForgeFlow, S.L.
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo import _, fields, models
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
@@ -14,7 +17,8 @@ class StockPicking(models.Model):
|
||||
if not record.picking_type_id.allow_pull_list_server_action:
|
||||
raise UserError(
|
||||
_(
|
||||
"Operation type of %(name)s transfer did not handle server action",
|
||||
"Operation type of %(name)s transfer does not allow "
|
||||
"pull list server action.",
|
||||
name=record.name,
|
||||
)
|
||||
)
|
||||
@@ -23,11 +27,3 @@ class StockPicking(models.Model):
|
||||
)
|
||||
res = pull_wizard.action_prepare()
|
||||
return res
|
||||
|
||||
|
||||
class StockPickingType(models.Model):
|
||||
_inherit = "stock.picking.type"
|
||||
|
||||
allow_pull_list_server_action = fields.Boolean(
|
||||
string="Allow pull list server action", default=False
|
||||
)
|
||||
|
||||
10
stock_pull_list/models/stock_picking_type.py
Normal file
10
stock_pull_list/models/stock_picking_type.py
Normal file
@@ -0,0 +1,10 @@
|
||||
# Copyright 2020-24 ForgeFlow, S.L.
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class StockPickingType(models.Model):
|
||||
_inherit = "stock.picking.type"
|
||||
|
||||
allow_pull_list_server_action = fields.Boolean(default=False)
|
||||
@@ -1,4 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
@@ -369,16 +368,10 @@ ul.auto-toc {
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:5866967730daa2fba1551d9a481e2b57951921208c66b4ec1bacec6bd6982cb5
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Alpha" src="https://img.shields.io/badge/maturity-Alpha-red.png" /></a> <a class="reference external image-reference" 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 image-reference" href="https://github.com/OCA/stock-logistics-warehouse/tree/14.0/stock_pull_list"><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 image-reference" href="https://translation.odoo-community.org/projects/stock-logistics-warehouse-14-0/stock-logistics-warehouse-14-0-stock_pull_list"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-warehouse&target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p><a class="reference external image-reference" 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 image-reference" 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 image-reference" href="https://github.com/OCA/stock-logistics-warehouse/tree/16.0/stock_pull_list"><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 image-reference" href="https://translation.odoo-community.org/projects/stock-logistics-warehouse-16-0/stock-logistics-warehouse-16-0-stock_pull_list"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-warehouse&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p>The pull list checks the stock situation at the given location and calculates
|
||||
the shortfall quantities (quantity needed to cover all needs) for products.
|
||||
Procurements can be created for these shortfall quantities.</p>
|
||||
<div class="admonition important">
|
||||
<p class="first admonition-title">Important</p>
|
||||
<p class="last">This is an alpha version, the data model and design can change at any time without warning.
|
||||
Only for development or testing purpose, do not use in production.
|
||||
<a class="reference external" href="https://odoo-community.org/page/development-status">More details on development status</a></p>
|
||||
</div>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
<div class="contents local topic" id="contents">
|
||||
<ul class="simple">
|
||||
@@ -423,7 +416,7 @@ groups.</li>
|
||||
<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 to smash it by providing a detailed and welcomed
|
||||
<a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_pull_list%0Aversion:%2014.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_pull_list%0Aversion:%2016.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">
|
||||
@@ -449,7 +442,7 @@ mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.</p>
|
||||
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
|
||||
<p><a class="reference external image-reference" href="https://github.com/LoisRForgeFlow"><img alt="LoisRForgeFlow" src="https://github.com/LoisRForgeFlow.png?size=40px" /></a></p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/14.0/stock_pull_list">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/16.0/stock_pull_list">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>
|
||||
|
||||
@@ -30,10 +30,10 @@ class TestPullListCommon(TransactionCase):
|
||||
route_vals = {
|
||||
"name": "WH2 -> WH",
|
||||
}
|
||||
self.transfer_route = self.env["stock.location.route"].create(route_vals)
|
||||
self.transfer_route = self.env["stock.route"].create(route_vals)
|
||||
rule_vals = {
|
||||
"location_id": self.warehouse.lot_stock_id.id,
|
||||
"location_src_id": self.warehouse_2.lot_stock_id.id,
|
||||
"location_dest_id": self.warehouse.lot_stock_id.id,
|
||||
"action": "pull_push",
|
||||
"warehouse_id": self.warehouse.id,
|
||||
"propagate_warehouse_id": self.warehouse_2.id,
|
||||
@@ -61,7 +61,7 @@ class TestPullListCommon(TransactionCase):
|
||||
"location_id": self.warehouse.lot_stock_id.id,
|
||||
"location_dest_id": self.customer_loc.id,
|
||||
"scheduled_date": date_move,
|
||||
"move_lines": [
|
||||
"move_ids": [
|
||||
(
|
||||
0,
|
||||
0,
|
||||
|
||||
@@ -109,9 +109,7 @@ class PullListWizard(models.TransientModel):
|
||||
|
||||
def _get_available_qty(self, product, location):
|
||||
product_obj = self.env["product.product"]
|
||||
product_l = product_obj.with_context({"location": location.id}).browse(
|
||||
product.id
|
||||
)
|
||||
product_l = product_obj.with_context(location=location.id).browse(product.id)
|
||||
if self.exclude_reserved:
|
||||
return product_l.free_qty
|
||||
return product_l.qty_available
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<group string="Needs">
|
||||
<field name="line_ids" readonly="1" nolabel="1">
|
||||
<field name="line_ids" readonly="1" nolabel="1" colspan="2">
|
||||
<tree>
|
||||
<field name="wizard_id" invisible="1" />
|
||||
<field name="product_id" />
|
||||
|
||||
Reference in New Issue
Block a user