[MIG] stock_demand_estimate: Migration to 16.0

This commit is contained in:
DavidJForgeFlow
2022-11-15 13:13:29 +01:00
committed by JasminSForgeFlow
parent 37c865c558
commit 7f54d6d81f
2 changed files with 9 additions and 1 deletions

View File

@@ -3,7 +3,7 @@
{
"name": "Stock Demand Estimate",
"summary": "Allows to create demand estimates.",
"version": "15.0.1.0.1",
"version": "16.0.1.0.1",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"development_status": "Production/Stable",
"website": "https://github.com/OCA/stock-logistics-warehouse",

View File

@@ -3,6 +3,7 @@
from datetime import date, timedelta as td
from odoo.exceptions import UserError
from odoo.tests.common import TransactionCase
@@ -165,3 +166,10 @@ class TestStockDemandEstimate(TransactionCase):
estimate.manual_duration = 5
estimate._onchange_manual_duration()
self.assertEqual(estimate.manual_date_to, date_from + td(days=4))
estimate._compute_product_quantity()
self.assertEqual(estimate.product_qty, 500)
with self.assertRaises(UserError):
estimate._inverse_product_quantity()
estimate.product_uom = False
estimate._compute_product_quantity()
self.assertEqual(estimate.product_qty, 0)