mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
@@ -2,7 +2,7 @@
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
{
|
||||
"name": "Stock Reserve Sales",
|
||||
"version": "13.0.1.0.0",
|
||||
"version": "13.0.1.1.0",
|
||||
"author": "Camptocamp, Odoo Community Association (OCA)",
|
||||
"category": "Warehouse",
|
||||
"license": "AGPL-3",
|
||||
|
||||
12
stock_reserve_sale/migrations/13.0.1.1.0/post-migration.py
Normal file
12
stock_reserve_sale/migrations/13.0.1.1.0/post-migration.py
Normal file
@@ -0,0 +1,12 @@
|
||||
# Copyright 2022 Tecnativa - Víctor Martínez
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from openupgradelib import openupgrade
|
||||
|
||||
|
||||
@openupgrade.migrate()
|
||||
def migrate(env, version):
|
||||
orders = env["sale.order"].search(
|
||||
[("state", "=", "sent"), ("is_stock_reservable", "=", False)]
|
||||
)
|
||||
orders._compute_stock_reservation()
|
||||
@@ -157,7 +157,7 @@ class SaleOrderLine(models.Model):
|
||||
reservable = False
|
||||
if (
|
||||
not (
|
||||
line.state != "draft"
|
||||
line.state not in ("draft", "sent")
|
||||
or line._get_procure_method() == "make_to_order"
|
||||
or not line.product_id
|
||||
or line.product_id.type == "service"
|
||||
|
||||
Reference in New Issue
Block a user