diff --git a/mrp_warehouse_calendar/README.rst b/mrp_warehouse_calendar/README.rst
index 994ca9716..b2084692f 100644
--- a/mrp_warehouse_calendar/README.rst
+++ b/mrp_warehouse_calendar/README.rst
@@ -7,20 +7,20 @@ MRP Warehouse Calendar
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
+.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
:target: https://odoo-community.org/page/development-status
- :alt: Beta
+ :alt: Production/Stable
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-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_warehouse_calendar
+ :target: https://github.com/OCA/manufacture/tree/13.0/mrp_warehouse_calendar
: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_warehouse_calendar
+ :target: https://translation.odoo-community.org/projects/manufacture-13-0/manufacture-13-0-mrp_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/129/12.0
+ :target: https://runbot.odoo-community.org/runbot/129/13.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -69,7 +69,7 @@ Bug Tracker
Bugs are tracked on `GitHub 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 `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -79,12 +79,13 @@ Credits
Authors
~~~~~~~
-* Eficent
+* ForgeFlow
Contributors
~~~~~~~~~~~~
-* Jordi Ballester (EFICENT) .
+* Jordi Ballester
+* Lois Rilo
Maintainers
~~~~~~~~~~~
@@ -99,14 +100,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 `__:
-|maintainer-jbeficent|
+|maintainer-JordiBForgeFlow|
-This module is part of the `OCA/manufacture `_ project on GitHub.
+This module is part of the `OCA/manufacture `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/mrp_warehouse_calendar/__manifest__.py b/mrp_warehouse_calendar/__manifest__.py
index 5e50377ff..4c0164a46 100644
--- a/mrp_warehouse_calendar/__manifest__.py
+++ b/mrp_warehouse_calendar/__manifest__.py
@@ -1,16 +1,16 @@
-# Copyright 2018 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": "MRP Warehouse Calendar",
"summary": "Considers the warehouse calendars in manufacturing",
- "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)",
+ "website": "https://github.com/manufacture",
+ "author": "ForgeFlow, Odoo Community Association (OCA)",
"category": "Manufacturing",
"depends": ["mrp", "stock_warehouse_calendar"],
"installable": True,
- "development_status": "Beta",
- "maintainers": ["jbeficent"],
+ "development_status": "Production/Stable",
+ "maintainers": ["JordiBForgeFlow"],
}
diff --git a/mrp_warehouse_calendar/i18n/mrp_warehouse_calendar.pot b/mrp_warehouse_calendar/i18n/mrp_warehouse_calendar.pot
index 2acc45ba3..8237fa10d 100644
--- a/mrp_warehouse_calendar/i18n/mrp_warehouse_calendar.pot
+++ b/mrp_warehouse_calendar/i18n/mrp_warehouse_calendar.pot
@@ -1,12 +1,12 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
-# * mrp_warehouse_calendar
+# * mrp_warehouse_calendar
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 12.0\n"
+"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
-"Last-Translator: <>\n"
+"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -22,4 +22,3 @@ msgstr ""
#: model:ir.model,name:mrp_warehouse_calendar.model_stock_rule
msgid "Stock Rule"
msgstr ""
-
diff --git a/mrp_warehouse_calendar/models/mrp_production.py b/mrp_warehouse_calendar/models/mrp_production.py
index 3f4a062ce..cb2c2573a 100644
--- a/mrp_warehouse_calendar/models/mrp_production.py
+++ b/mrp_warehouse_calendar/models/mrp_production.py
@@ -1,4 +1,4 @@
-# Copyright 2018 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 api, models
@@ -17,9 +17,9 @@ class MrpProduction(models.Model):
)
self.date_planned_finished = date_expected_finished
- @api.multi
+ @api.returns("self", lambda value: value.id)
def copy(self, default=None):
- mo = super(MrpProduction, self).copy(default=default)
+ mo = super().copy(default=default)
dt_planned = mo.date_planned_start
warehouse = mo.picking_type_id.warehouse_id
if warehouse.calendar_id and mo.product_id.produce_delay:
diff --git a/mrp_warehouse_calendar/models/stock_rule.py b/mrp_warehouse_calendar/models/stock_rule.py
index e83990d89..d23e3b756 100644
--- a/mrp_warehouse_calendar/models/stock_rule.py
+++ b/mrp_warehouse_calendar/models/stock_rule.py
@@ -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, models
@@ -7,8 +7,8 @@ from odoo import fields, models
class StockRule(models.Model):
_inherit = "stock.rule"
- def _get_date_planned(self, product_id, values):
- date_planned = super(StockRule, self)._get_date_planned(product_id, values)
+ def _get_date_planned(self, product_id, company_id, values):
+ date_planned = super()._get_date_planned(product_id, company_id, values)
picking_type = self.picking_type_id or values["warehouse_id"].manu_type_id
# We force the date planned to be at the beginning of the day.
# So no work intervals are found in planned date.
diff --git a/mrp_warehouse_calendar/readme/CONTRIBUTORS.rst b/mrp_warehouse_calendar/readme/CONTRIBUTORS.rst
index 76e7fbe3e..8cc067b15 100644
--- a/mrp_warehouse_calendar/readme/CONTRIBUTORS.rst
+++ b/mrp_warehouse_calendar/readme/CONTRIBUTORS.rst
@@ -1 +1,2 @@
-* Jordi Ballester (EFICENT) .
+* Jordi Ballester
+* Lois Rilo
diff --git a/mrp_warehouse_calendar/static/description/index.html b/mrp_warehouse_calendar/static/description/index.html
index c910d3974..2e98b2ad0 100644
--- a/mrp_warehouse_calendar/static/description/index.html
+++ b/mrp_warehouse_calendar/static/description/index.html
@@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-

+

With this module the manufacturing orders created from procurements consider
the calendar assigned to the warehouse of the picking type of the
manufacturing order to determine, based on the product’s manufacturing
@@ -414,7 +414,7 @@ calendar.
Bugs are tracked on GitHub 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.
+feedback.
Do not contact contributors directly about support or help with technical issues.
@@ -422,13 +422,14 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
@@ -439,8 +440,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.
Current maintainer:
-

-
This module is part of the OCA/manufacture project on GitHub.
+

+
This module is part of the OCA/manufacture project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/mrp_warehouse_calendar/tests/test_mrp_warehouse_calendar.py b/mrp_warehouse_calendar/tests/test_mrp_warehouse_calendar.py
index 470f724ea..fce86966c 100644
--- a/mrp_warehouse_calendar/tests/test_mrp_warehouse_calendar.py
+++ b/mrp_warehouse_calendar/tests/test_mrp_warehouse_calendar.py
@@ -1,5 +1,6 @@
-# Copyright 2018 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
from odoo.tests.common import TransactionCase
@@ -8,6 +9,8 @@ class TestMrpWarehouseCalendar(TransactionCase):
def setUp(self):
super(TestMrpWarehouseCalendar, self).setUp()
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")
@@ -53,14 +56,19 @@ class TestMrpWarehouseCalendar(TransactionCase):
"company_id": self.company,
"rule_id": self.manufacture_route,
}
- 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,
+ )
+ ]
)
mo = self.env["mrp.production"].search(
[("product_id", "=", self.product.id)], limit=1
@@ -80,14 +88,19 @@ class TestMrpWarehouseCalendar(TransactionCase):
"company_id": self.company,
"rule_id": self.manufacture_route,
}
- self.env["procurement.group"].run(
- self.product,
- 100,
- self.product.uom_id,
- self.warehouse.lot_stock_id,
- "Test 2",
- "Test 2",
- values,
+ self.pg_obj.run(
+ [
+ self.pg_obj.Procurement(
+ self.product,
+ 100,
+ self.product.uom_id,
+ self.warehouse.lot_stock_id,
+ "Test 2",
+ "Test 2",
+ self.warehouse.company_id,
+ values,
+ )
+ ]
)
mo = self.env["mrp.production"].search(
[("product_id", "=", self.product.id)], limit=1