[FIX] test scenario

bzr revid: fp@tinyerp.com-20111113192805-luc1523nc291xfxl
This commit is contained in:
Fabien Pinckaers 2011-11-13 20:28:05 +01:00
parent c42b1515c7
commit edd35657f8
3 changed files with 17 additions and 21 deletions

View File

@ -60,19 +60,19 @@ Dashboard for purchase management that includes:
'board_purchase_view.xml',
],
'test': [
'test/process/cancel_order.yml',
'test/process/rfq2order2done.yml',
'test/process/generate_invoice_from_reception.yml',
'test/process/run_scheduler.yml',
'test/process/merge_order.yml',
'test/ui/print_report.yml',
'test/ui/onchange_events.yml',
'test/ui/duplicate_order.yml',
'test/ui/delete_order.yml',
],
'test/process/cancel_order.yml',
'test/process/rfq2order2done.yml',
'test/process/generate_invoice_from_reception.yml',
'test/process/run_scheduler.yml',
'test/process/merge_order.yml',
'test/ui/print_report.yml',
'test/ui/onchange_events.yml',
'test/ui/duplicate_order.yml',
'test/ui/delete_order.yml',
],
'demo': [
'purchase_demo.xml',
],
'purchase_demo.xml',
],
'installable': True,
'active': False,
'certificate': '0057234283549',

View File

@ -1,8 +1,5 @@
-
In order to test the purchase order flow, I compute the total of the listed products.
"Basic PC" product price is 450.20 and ordered 2 'PCE'
"New server config + material" product price is 150.50 and ordered 5 'PCE'
So, Total should be [(450.20*2)+(150.50*5)] = 1652.90
In order to test the purchase order flow I compute the total of the listed products
-
I check the total untaxed amount of the RFQ is correctly computed
-
@ -40,17 +37,17 @@
-
!python {model: purchase.order}: |
purchase_order = self.browse(cr, uid, ref("order_purchase1"))
assert len(purchase_order.picking_ids) >= 1, "Reception should be one"
assert len(purchase_order.picking_ids) >= 1, "You should have only one reception order"
for picking in purchase_order.picking_ids:
assert picking.state == "assigned", "Reception state should be in assigned state"
assert picking.address_id.id == purchase_order.dest_address_id.id, "Delivery Address of Reception is not correspond"
assert picking.address_id.id == purchase_order.partner_address_id.id, "Delivery address of reception id is different from order"
assert picking.company_id.id == purchase_order.company_id.id, "Company is not correspond with purchase order"
-
Reception is ready for process so now done the reception.
-
!python {model: stock.partial.picking}: |
pick_ids = self.pool.get('purchase.order').browse(cr, uid, ref("order_purchase1")).picking_ids
partial_id = self.create(cr, uid, {},context={'active_model': 'stock.picking','active_ids': [pick_ids[1].id]})
partial_id = self.create(cr, uid, {},context={'active_model': 'stock.picking','active_ids': [pick_ids[0].id]})
self.do_partial(cr, uid, [partial_id])
-
I check that purchase order is shipped.

View File

@ -1,7 +1,7 @@
-
In order to test the scheduler to generate RFQ.
-
I create procurement order.
I create a procurement order.
-
!record {model: procurement.order, id: procurement_order_testcase0}:
company_id: base.main_company
@ -21,7 +21,6 @@
-
!python {model: procurement.order}: |
self.run_scheduler(cr, uid)
-
I check Generated RFQ.
-