mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[FIX] stock_request_*: add expected_date implicit on tests to avoid errors
This commit is contained in:
committed by
Jesús Alan Ramos Rodríguez
parent
4c55085db3
commit
0e944b3ce7
@@ -2,6 +2,7 @@
|
||||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0).
|
||||
|
||||
from odoo.tests import common
|
||||
from odoo import fields
|
||||
|
||||
|
||||
class TestStockRequestPurchase(common.TransactionCase):
|
||||
@@ -73,10 +74,12 @@ class TestStockRequestPurchase(common.TransactionCase):
|
||||
|
||||
def test_create_request_01(self):
|
||||
"""Single Stock request with buy rule"""
|
||||
expected_date = fields.Datetime.now()
|
||||
vals = {
|
||||
'company_id': self.main_company.id,
|
||||
'warehouse_id': self.warehouse.id,
|
||||
'location_id': self.warehouse.lot_stock_id.id,
|
||||
'expected_date': expected_date,
|
||||
'stock_request_ids': [(0, 0, {
|
||||
'product_id': self.product.id,
|
||||
'product_uom_id': self.product.uom_id.id,
|
||||
@@ -84,6 +87,7 @@ class TestStockRequestPurchase(common.TransactionCase):
|
||||
'company_id': self.main_company.id,
|
||||
'warehouse_id': self.warehouse.id,
|
||||
'location_id': self.warehouse.lot_stock_id.id,
|
||||
'expected_date': expected_date,
|
||||
})]
|
||||
}
|
||||
|
||||
@@ -187,10 +191,12 @@ class TestStockRequestPurchase(common.TransactionCase):
|
||||
stock_request_2.product_uom_qty)
|
||||
|
||||
def test_view_actions(self):
|
||||
expected_date = fields.Datetime.now()
|
||||
vals = {
|
||||
'company_id': self.main_company.id,
|
||||
'warehouse_id': self.warehouse.id,
|
||||
'location_id': self.warehouse.lot_stock_id.id,
|
||||
'expected_date': expected_date,
|
||||
'stock_request_ids': [(0, 0, {
|
||||
'product_id': self.product.id,
|
||||
'product_uom_id': self.product.uom_id.id,
|
||||
@@ -198,6 +204,7 @@ class TestStockRequestPurchase(common.TransactionCase):
|
||||
'company_id': self.main_company.id,
|
||||
'warehouse_id': self.warehouse.id,
|
||||
'location_id': self.warehouse.lot_stock_id.id,
|
||||
'expected_date': expected_date,
|
||||
})]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user