From f25b251e1c27d6e51e418c754498cc70bad6c8c9 Mon Sep 17 00:00:00 2001 From: Lois Rilo Date: Tue, 17 Dec 2019 12:23:06 +0100 Subject: [PATCH] [13.0][MIG] mrp_warehouse_calendar --- mrp_warehouse_calendar/README.rst | 27 ++++++----- mrp_warehouse_calendar/__manifest__.py | 12 ++--- .../models/mrp_production.py | 6 +-- mrp_warehouse_calendar/models/stock_rule.py | 6 +-- .../readme/CONTRIBUTORS.rst | 3 +- .../static/description/index.html | 15 +++--- .../tests/test_mrp_warehouse_calendar.py | 47 ++++++++++++------- 7 files changed, 66 insertions(+), 50 deletions(-) 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/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..d15853bfd 100644 --- a/mrp_warehouse_calendar/static/description/index.html +++ b/mrp_warehouse_calendar/static/description/index.html @@ -3,7 +3,7 @@ - + MRP Warehouse Calendar