[IMP]purchase_requisition: Improve the test case's statements

bzr revid: dbr@tinyerp.com-20111128061307-8c7452lyvsin0qcn
This commit is contained in:
DBR (OpenERP)
2011-11-28 11:43:07 +05:30
parent 7b800b5f03
commit c7363ab6a2
3 changed files with 21 additions and 14 deletions
@@ -1,7 +1,7 @@
-
In order to test the cancel purchase requisition order.
In order to test the cancel flow of purchase requisition order.
-
I try to cancel purchase requisition order.
I cancel the "New" purchase requisition order.
-
!python {model: purchase.requisition}: |
self.tender_cancel(cr, uid, [ref("order_purchase_requisition1")])
@@ -10,6 +10,11 @@
-
!assert {model: purchase.requisition, id: order_purchase_requisition1}:
- state == 'cancel'
-
I reset the state of requisition as "New".
-
!python {model: purchase.requisition}: |
self.tender_reset(cr, uid, ref('order_purchase_requisition1'))
-
I change state of requisition in "In progress".
-
@@ -51,7 +56,7 @@
!assert {model: purchase.requisition, id: order_purchase_requisition1}:
- state == 'done'
-
I try to cancel 'Done' purchase requisition order.
I try to cancel "Done" purchase requisition order.
-
!python {model: purchase.requisition}: |
self.tender_cancel(cr, uid, [ref("order_purchase_requisition1")])
@@ -64,4 +69,5 @@
I reset the state of requisition as "New".
-
!python {model: purchase.requisition}: |
self.tender_reset(cr, uid, ref('order_purchase_requisition1'))
self.tender_reset(cr, uid, ref('order_purchase_requisition1'))
@@ -1,18 +1,15 @@
-
In order to test the purchase requisition module, I have to checked a boolean field 'purchase requisition' in product,
If I checked it then it's requisition will be create.
In order to test the purchase requisition module, I have to checked product's boolean field 'purchase requisition'.
-
I start by Checking the product, Product must have requisition field checked.
and Product supply method is buy and the procure method is make to order.
-
!record {model: product.product, id: product.product_product_hdd3}:
supply_method: 'buy'
purchase_requisition: True
-
I create the procurement order for the product and after run that procurement for create purchase requisition.
I create the product's procurement order and run that procurement.
After Run the procurement I check created purchase requisition [Tender].
-
!python {model: product.product}: |
import time
import netsvc
mk_proc = self.pool.get('make.procurement')
proc_order = self.pool.get('procurement.order')
@@ -1,17 +1,21 @@
-
In order to test the exclusive type requisition, I have to create two differ purchase order in one requisition [Tender]
In order to test the exclusive type requisition, I have to create two differ purchase order of one requisition [Tender]
-
I start by Checking the product, Product must have requisition field checked.
I select purchase requisition of '[CPU1] Processor AMD Athlon XP 1800+' and '[CPU3] Processor AMD Athlon XP 2200+'.
So, those products must have requisition field checked.
-
I start by Checking requisition field for '[CPU1] Processor AMD Athlon XP 1800+' product.
-
!record {model: product.product, id: product.product_product_cpu1}:
purchase_requisition: True
-
Checking requisition field for another product.
Checked requisition field for '[CPU3] Processor AMD Athlon XP 2200+' product.
-
!record {model: product.product, id: product.product_product_cpu3}:
purchase_requisition: True
-
Now check that purchase order's product must have requisition field checked.
I search the purchase orders which have exclusive purchase requisition 'TE00001' and confirm any one of them.
Then check the remaining purchase orders goes in to cancel state.
-
!python {model: purchase.order}: |
import netsvc