[MIG] stock_warehouse_calendar: Migration to 15.0

This commit is contained in:
Joan Mateu Jordi
2021-10-26 10:47:53 +02:00
committed by Frédéric GRALL
parent cc34fd4e39
commit 2bc86e57ae
3 changed files with 4 additions and 5 deletions

View File

@@ -1,10 +1,10 @@
# Copyright 2018-19 ForgeFlow S.L. (https://www.forgeflow.com)
# Copyright 2021 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": "14.0.1.0.1",
"version": "15.0.1.0.0",
"license": "LGPL-3",
"website": "https://github.com/OCA/stock-logistics-warehouse",
"author": "ForgeFlow, " "Odoo Community Association (OCA)",

View File

@@ -1,7 +1,6 @@
# 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
from odoo import models
@@ -33,6 +32,5 @@ class StockRule(models.Model):
warehouse = self.propagate_warehouse_id or self.warehouse_id
if warehouse.calendar_id and self.delay:
date = warehouse.wh_plan_days(values["date_planned"], -1 * self.delay)
if date > datetime.now():
res["date"] = date
res["date"] = date
return res

View File

@@ -1,2 +1,3 @@
* Jordi Ballester <jordi.ballester@forgeflow.com>
* Lois Rilo <lois.rilo@forgeflow.com>
* Joan Mateu <joan.mateu@forgeflow.com>