mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[MIG] stock_demand_estimate: Migration to 16.0
This commit is contained in:
committed by
JasminSForgeFlow
parent
37c865c558
commit
7f54d6d81f
@@ -3,7 +3,7 @@
|
|||||||
{
|
{
|
||||||
"name": "Stock Demand Estimate",
|
"name": "Stock Demand Estimate",
|
||||||
"summary": "Allows to create demand estimates.",
|
"summary": "Allows to create demand estimates.",
|
||||||
"version": "15.0.1.0.1",
|
"version": "16.0.1.0.1",
|
||||||
"author": "ForgeFlow, Odoo Community Association (OCA)",
|
"author": "ForgeFlow, Odoo Community Association (OCA)",
|
||||||
"development_status": "Production/Stable",
|
"development_status": "Production/Stable",
|
||||||
"website": "https://github.com/OCA/stock-logistics-warehouse",
|
"website": "https://github.com/OCA/stock-logistics-warehouse",
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
from datetime import date, timedelta as td
|
from datetime import date, timedelta as td
|
||||||
|
|
||||||
|
from odoo.exceptions import UserError
|
||||||
from odoo.tests.common import TransactionCase
|
from odoo.tests.common import TransactionCase
|
||||||
|
|
||||||
|
|
||||||
@@ -165,3 +166,10 @@ class TestStockDemandEstimate(TransactionCase):
|
|||||||
estimate.manual_duration = 5
|
estimate.manual_duration = 5
|
||||||
estimate._onchange_manual_duration()
|
estimate._onchange_manual_duration()
|
||||||
self.assertEqual(estimate.manual_date_to, date_from + td(days=4))
|
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user