Skip to content
Snippets Groups Projects
Commit 2860414d authored by Mansi Trivedi's avatar Mansi Trivedi Committed by Yannick Tivisse
Browse files

[ADD] purchase: Add python tests for default lead time

Case 1: To check order date of purchase order and schedule dates of shipment and purchse order,
	  - Configure lead times:
        	- At a product level set Delivery Lead Time
		- At a company level set Purchase Lead Time

Case 2: To check order date of purchase order and schedule dates of multiple purchase order line of the same purchase order,
        we create two procurements for the two different product with same vendor and different Delivery Lead Time

Case 3: To check order date of purchase order and schedule dates of shipments and purchase order,
 	 - Configure lead times:
		- At a product level set Delivery Lead Time
		- At a route level set delay of push rules

Detailed Use Cases
==================

Consider today's date = 2016-04-21 ( date_planned of procurement = today's date + 10 days)

CASE 01:
========

Create Product
--------------
Name : Product A
Product type : stockable
Buy : True
Make To Order : True
Delivery Lead Time :  5 days

Configure your company data
---------------------------
Purchase Lead Time : 3.00 days

Procurement Request
-------------------
Warehouse : YourCompany
Product : Product A
Quantity :  15.00
Planned Date: 2016-05-01 00:00:00

Confirm Purchase Order

Result
------
Purchase Order :-- Schedule date: 2016-04-28 00:00:00
    Order date: 2016-04-23 00:00:00
Incoming shipments schedule date :-- 2016-04-28 00:00:00

CASE 02:
========

Create Product
--------------
Name : Product A
Product type : stockable
Buy : True
Make To Order : True
Delivery Lead Time :  5 days

Create another Product
----------------------
Name : Product B
Product type : stockable
Buy : True
Make To Order : True
Delivery Lead Time :  2 days

Procurement Request
-------------------
Warehouse : YourCompany
Product : Product A
Quantity :  10.00
Planned Date: 2016-05-01 00:00:00

Procurement Request for second product
--------------------------------------
Warehouse : YourCompany
Product : Product B
Quantity :  5.00
Planned Date: 2016-05-01 00:00:00

Confirm Purchase Order

Result
------
Purchase Order :-- Schedule date: 2016-04-28 00:00:00
    Order date: 2016-04-26 00:00:00
    Schedule date of purchase order line for product A: 2016-05-01 00:00:00
    Schedule date of purchase order line for product B: 2016-04-28 00:00:00
Incoming shipments schedule date :-- 2016-04-28 00:00:00

CASE 03:
========

Create Product
--------------
Name : Product A
Product type : stockable
Buy : True
Make To Order : True
Delivery Lead Time :  5 days

Warehouse configuration (YourCompany)
-------------------------------------
Incoming shipments : three steps

Routes
------
YourCompany : Receipt in 3 steps
Push Rules:
-----------------
WH: Input -> Quality Control :-- Delay : 2 days
WH: Quality Control -> Stock  :-- Delay : 2 days

Create Procurement:
-------------------
Product : Prosuct A
Quantity : 5.000
Warehouse : YourCompany
Procurement Location : WH/Input
Schedule date : 2016-05-01 10:30:43
Notes : 'Test scheduler for RFQ'

Confirm Purchase Order

Result
------
Purchase Order :-- Schedule date: 2016-05-01 10:30:43
    Order date: 2016-04-26 10:30:43
Incoming shipments schedule dates :--
In type :--  2016-05-01 10:30:43
Internal type 1 :--  2016-05-03 10:30:43
Internal type 2 :--  2016-05-05 10:30:43
parent 1d2ca932
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment