[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:
parent
a94ef120e5
commit
8335486c13
|
@ -3,52 +3,52 @@
|
||||||
-
|
-
|
||||||
I confirm the purchase order.
|
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.
|
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'
|
- state == 'approved'
|
||||||
-
|
-
|
||||||
First I cancel receptions related to this order if order shipped.
|
First I cancel receptions related to this order if order shipped.
|
||||||
-
|
-
|
||||||
!python {model: purchase.order}: |
|
!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])
|
self.pool.get('stock.picking').action_cancel(cr, uid, [picking.id for picking in order.picking_ids])
|
||||||
-
|
-
|
||||||
I check order status in "Shipping Exception".
|
I check order status in "Shipping Exception".
|
||||||
-
|
-
|
||||||
!python {model: purchase.order}: |
|
!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"
|
assert order.state == "except_picking", "order should be in Ship Exception state after cancel shipment"
|
||||||
-
|
-
|
||||||
Now I am able to cancel purchase order.
|
Now I am able to cancel purchase order.
|
||||||
-
|
-
|
||||||
!python {model: 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.
|
I check that order is cancelled.
|
||||||
-
|
-
|
||||||
!assert {model: purchase.order, id: purchase_order_4}:
|
!assert {model: purchase.order, id: purchase_order_5}:
|
||||||
- state == 'cancel'
|
- state == 'cancel'
|
||||||
-
|
-
|
||||||
After cancel the order, I check that it's related invoice cancelled.
|
After cancel the order, I check that it's related invoice cancelled.
|
||||||
-
|
-
|
||||||
!python {model: purchase.order}: |
|
!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"
|
assert order.invoice_ids[0].state == "cancel", "order's related invoice should be cancelled"
|
||||||
-
|
-
|
||||||
Now again set cancelled order to draft.
|
Now again set cancelled order to draft.
|
||||||
-
|
-
|
||||||
!python {model: purchase.order}: |
|
!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.
|
Now I again to cancel draft order.
|
||||||
-
|
-
|
||||||
!python {model: 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.
|
I check that order is cancelled.
|
||||||
-
|
-
|
||||||
!assert {model: purchase.order, id: purchase_order_4}:
|
!assert {model: purchase.order, id: purchase_order_5}:
|
||||||
- state == 'cancel'
|
- state == 'cancel'
|
||||||
|
|
|
@ -2,22 +2,22 @@
|
||||||
I create a draft Purchase Order
|
I create a draft Purchase Order
|
||||||
-
|
-
|
||||||
!record {model: purchase.order, id: purchase_order_edi_1}:
|
!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
|
location_id: stock.stock_location_3
|
||||||
pricelist_id: 1
|
pricelist_id: 1
|
||||||
order_line:
|
order_line:
|
||||||
- product_id: product.product_product_3
|
- product_id: product.product_product_33
|
||||||
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_qty: 10.0
|
product_qty: 10.0
|
||||||
product_uom: 1
|
product_uom: 1
|
||||||
price_unit: 20.0
|
price_unit: 60.0
|
||||||
name: 'Medium PC'
|
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'
|
date_planned: '2011-08-31'
|
||||||
|
|
||||||
-
|
-
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
I check the total untaxed amount of the RFQ is correctly computed
|
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}:
|
!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.
|
I confirm the RFQ.
|
||||||
-
|
-
|
||||||
|
|
Loading…
Reference in New Issue