[FIX]: purchase: Fixed yml of purchase module based on new changes of demo

bzr revid: rpa@tinyerp.com-20120713064150-i4lw9g5d6c2ldctc
This commit is contained in:
Rucha (Open ERP) 2012-07-13 12:11:50 +05:30
parent a94ef120e5
commit 8335486c13
3 changed files with 22 additions and 22 deletions

View File

@ -3,52 +3,52 @@
-
I confirm the purchase order.
-
!workflow {model: purchase.order, action: purchase_confirm, ref: purchase_order_4}
!workflow {model: purchase.order, action: purchase_confirm, ref: purchase_order_5}
-
I check the "Approved" status after confirmed RFQ.
-
!assert {model: purchase.order, id: purchase_order_4}:
!assert {model: purchase.order, id: purchase_order_5}:
- state == 'approved'
-
First I cancel receptions related to this order if order shipped.
-
!python {model: purchase.order}: |
order = self.browse(cr, uid, ref("purchase_order_4"))
order = self.browse(cr, uid, ref("purchase_order_5"))
self.pool.get('stock.picking').action_cancel(cr, uid, [picking.id for picking in order.picking_ids])
-
I check order status in "Shipping Exception".
-
!python {model: purchase.order}: |
order = self.browse(cr, uid, ref("purchase_order_4"))
order = self.browse(cr, uid, ref("purchase_order_5"))
assert order.state == "except_picking", "order should be in Ship Exception state after cancel shipment"
-
Now I am able to cancel purchase order.
-
!python {model: purchase.order}: |
self.action_cancel(cr, uid, [ref("purchase_order_4")])
self.action_cancel(cr, uid, [ref("purchase_order_5")])
-
I check that order is cancelled.
-
!assert {model: purchase.order, id: purchase_order_4}:
!assert {model: purchase.order, id: purchase_order_5}:
- state == 'cancel'
-
After cancel the order, I check that it's related invoice cancelled.
-
!python {model: purchase.order}: |
order = self.browse(cr, uid, ref("purchase_order_4"))
order = self.browse(cr, uid, ref("purchase_order_5"))
assert order.invoice_ids[0].state == "cancel", "order's related invoice should be cancelled"
-
Now again set cancelled order to draft.
-
!python {model: purchase.order}: |
self.action_cancel_draft(cr, uid, [ref("purchase_order_4")])
self.action_cancel_draft(cr, uid, [ref("purchase_order_5")])
-
Now I again to cancel draft order.
-
!python {model: purchase.order}: |
self.action_cancel(cr, uid, [ref("purchase_order_4")])
self.action_cancel(cr, uid, [ref("purchase_order_5")])
-
I check that order is cancelled.
-
!assert {model: purchase.order, id: purchase_order_4}:
!assert {model: purchase.order, id: purchase_order_5}:
- state == 'cancel'

View File

@ -2,22 +2,22 @@
I create a draft Purchase Order
-
!record {model: purchase.order, id: purchase_order_edi_1}:
partner_id: base.res_partner_2
partner_id: base.res_partner_3
location_id: stock.stock_location_3
pricelist_id: 1
order_line:
- product_id: product.product_product_3
product_qty: 1.0
product_uom: 1
price_unit: 150.0
name: 'Basic PC'
date_planned: '2011-08-31'
order_line:
- product_id: product.product_product_5
- product_id: product.product_product_33
product_qty: 10.0
product_uom: 1
price_unit: 20.0
name: 'Medium PC'
price_unit: 60.0
name: 'Headset USB'
date_planned: '2011-08-31'
order_line:
- product_id: product.product_product_29
product_qty: 12.0
product_uom: 1
price_unit: 89.0
name: 'Pen drive, 8GB'
date_planned: '2011-08-31'
-

View File

@ -4,7 +4,7 @@
I check the total untaxed amount of the RFQ is correctly computed
-
!assert {model: purchase.order, id: purchase_order_1, string: The amount of RFQ is not correctly computed}:
- sum([l.price_subtotal for l in order_line]) == amount_untaxed
- round(sum([l.price_subtotal for l in order_line]), 2) == round(amount_untaxed, 2)
-
I confirm the RFQ.
-