[13.0][MIG] stock_warehouse_calendar

This commit is contained in:
Lois Rilo
2019-12-17 10:04:25 +01:00
parent d6f6dc8b23
commit 898a2d06a4
9 changed files with 61 additions and 50 deletions

View File

@@ -14,13 +14,13 @@ Stock Warehouse Calendar
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-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_warehouse_calendar
:target: https://github.com/OCA/stock-logistics-warehouse/tree/13.0/stock_warehouse_calendar
: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_warehouse_calendar
:target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-13-0/stock-logistics-warehouse-13-0-stock_warehouse_calendar
: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|
@@ -72,7 +72,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_warehouse_calendar%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_warehouse_calendar%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.
@@ -82,13 +82,13 @@ Credits
Authors
~~~~~~~
* Eficent
* ForgeFlow
Contributors
~~~~~~~~~~~~
* Jordi Ballester <jordi.ballester@eficent.com>
* Lois Rilo <lois.rilo@eficent>
* Jordi Ballester <jordi.ballester@forgeflow.com>
* Lois Rilo <lois.rilo@forgeflow.com>
Maintainers
~~~~~~~~~~~
@@ -103,14 +103,14 @@ 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.
.. |maintainer-jbeficent| image:: https://github.com/jbeficent.png?size=40px
:target: https://github.com/jbeficent
:alt: jbeficent
.. |maintainer-JordiBForgeFlow| image:: https://github.com/JordiBForgeFlow.png?size=40px
:target: https://github.com/JordiBForgeFlow
:alt: JordiBForgeFlow
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|maintainer-jbeficent|
|maintainer-JordiBForgeFlow|
This module is part of the `OCA/stock-logistics-warehouse <https://github.com/OCA/stock-logistics-warehouse/tree/12.0/stock_warehouse_calendar>`_ project on GitHub.
This module is part of the `OCA/stock-logistics-warehouse <https://github.com/OCA/stock-logistics-warehouse/tree/13.0/stock_warehouse_calendar>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@@ -1,17 +1,17 @@
# Copyright 2017 Eficent Business and IT Consulting Services, S.L.
# Copyright 2018-19 ForgeFlow S.L. (https://www.forgeflow.com)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
{
"name": "Stock Warehouse Calendar",
"summary": "Adds a calendar to the Warehouse",
"version": "12.0.1.0.1",
"version": "13.0.1.0.0",
"license": "LGPL-3",
"website": "https://github.com/stock-logistics-warehouse",
"author": "Eficent, " "Odoo Community Association (OCA)",
"author": "ForgeFlow, " "Odoo Community Association (OCA)",
"category": "Warehouse Management",
"depends": ["stock", "resource"],
"data": ["views/stock_warehouse_views.xml"],
"installable": True,
"development_status": "Beta",
"maintainers": ["jbeficent"],
"maintainers": ["JordiBForgeFlow"],
}

View File

@@ -1,4 +1,4 @@
# Copyright 2018-19 Eficent Business and IT Consulting Services, S.L.
# Copyright 2018-19 ForgeFlow S.L. (https://www.forgeflow.com)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from datetime import datetime
@@ -17,8 +17,8 @@ class StockRule(models.Model):
location_id,
name,
origin,
company_id,
values,
group_id,
):
res = super(StockRule, self)._get_stock_move_values(
product_id,
@@ -27,8 +27,8 @@ class StockRule(models.Model):
location_id,
name,
origin,
company_id,
values,
group_id,
)
warehouse = self.propagate_warehouse_id or self.warehouse_id
if warehouse.calendar_id and self.delay:

View File

@@ -1,4 +1,4 @@
# Copyright 2018-19 Eficent Business and IT Consulting Services, S.L.
# Copyright 2018-19 ForgeFlow S.L. (https://www.forgeflow.com)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from datetime import datetime, timedelta

View File

@@ -1,2 +1,2 @@
* Jordi Ballester <jordi.ballester@eficent.com>
* Lois Rilo <lois.rilo@eficent>
* Jordi Ballester <jordi.ballester@forgeflow.com>
* Lois Rilo <lois.rilo@forgeflow.com>

View File

@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.15.2: http://docutils.sourceforge.net/" />
<title>Stock Warehouse Calendar</title>
<style type="text/css">
@@ -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/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/12.0/stock_warehouse_calendar"><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_warehouse_calendar"><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/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/13.0/stock_warehouse_calendar"><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_warehouse_calendar"><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>This module adds a Calendar to the Warehouse. This calendar can then used as
the basis of the proper computation of start/end dates based on lead times in
this and other modules.</p>
@@ -417,7 +417,7 @@ if the warehouse operates under a Mo-Fri working calendar.</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_warehouse_calendar%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_warehouse_calendar%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">
@@ -425,14 +425,14 @@ 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="#id5">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="#id6">Contributors</a></h2>
<ul class="simple">
<li>Jordi Ballester &lt;<a class="reference external" href="mailto:jordi.ballester&#64;eficent.com">jordi.ballester&#64;eficent.com</a>&gt;</li>
<li>Lois Rilo &lt;<a class="reference external" href="mailto:lois.rilo&#64;eficent">lois.rilo&#64;eficent</a>&gt;</li>
<li>Jordi Ballester &lt;<a class="reference external" href="mailto:jordi.ballester&#64;forgeflow.com">jordi.ballester&#64;forgeflow.com</a>&gt;</li>
<li>Lois Rilo &lt;<a class="reference external" href="mailto:lois.rilo&#64;forgeflow.com">lois.rilo&#64;forgeflow.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
@@ -443,8 +443,8 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
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" href="https://github.com/jbeficent"><img alt="jbeficent" src="https://github.com/jbeficent.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/12.0/stock_warehouse_calendar">OCA/stock-logistics-warehouse</a> project on GitHub.</p>
<p><a class="reference external" href="https://github.com/JordiBForgeFlow"><img alt="JordiBForgeFlow" src="https://github.com/JordiBForgeFlow.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/13.0/stock_warehouse_calendar">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

@@ -1,2 +1 @@
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from . import test_stock_warehouse_calendar

View File

@@ -1,4 +1,4 @@
# Copyright 2018-19 Eficent Business and IT Consulting Services, S.L.
# Copyright 2018-19 ForgeFlow S.L. (https://www.forgeflow.com)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from odoo import fields
@@ -10,6 +10,8 @@ class TestStockWarehouseCalendar(TransactionCase):
super(TestStockWarehouseCalendar, self).setUp()
self.wh_obj = self.env["stock.warehouse"]
self.move_obj = self.env["stock.move"]
self.pg_obj = self.env["procurement.group"]
self.company = self.env.ref("base.main_company")
self.warehouse = self.env.ref("stock.warehouse0")
self.customer_loc = self.env.ref("stock.stock_location_customers")
@@ -50,14 +52,19 @@ class TestStockWarehouseCalendar(TransactionCase):
"company_id": self.company,
"rule_id": self.transfer_rule,
}
self.env["procurement.group"].run(
self.product,
100,
self.product.uom_id,
self.warehouse.lot_stock_id,
"Test",
"Test",
values,
self.pg_obj.run(
[
self.pg_obj.Procurement(
self.product,
100,
self.product.uom_id,
self.warehouse.lot_stock_id,
"Test",
"Test",
self.warehouse.company_id,
values,
)
]
)
move = self.env["stock.move"].search(
[("product_id", "=", self.product.id)], limit=1
@@ -77,14 +84,19 @@ class TestStockWarehouseCalendar(TransactionCase):
"company_id": self.company,
"rule_id": self.transfer_rule,
}
self.env["procurement.group"].run(
self.product,
100,
self.product.uom_id,
self.warehouse.lot_stock_id,
"Test",
"Test",
values,
self.pg_obj.run(
[
self.pg_obj.Procurement(
self.product,
100,
self.product.uom_id,
self.warehouse.lot_stock_id,
"Test",
"Test",
self.warehouse.company_id,
values,
)
]
)
move = self.env["stock.move"].search(
[("product_id", "=", self.product.id)], limit=1

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2018 Eficent
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<!-- Copyright 2018 2018-19 ForgeFlow S.L. (https://www.forgeflow.com)
License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). -->
<odoo>
<record id="view_warehouse" model="ir.ui.view">