[FIX] sale, purchase: fix yaml tests after modifying picking invoice wizard
bzr revid: odo@openerp.com-20101015132300-5qbrrbfekta4kla2
This commit is contained in:
@@ -122,35 +122,23 @@
|
||||
I check that an entry gets created related to stock move.
|
||||
-
|
||||
!python {model: purchase.order}: |
|
||||
from tools.translate import _
|
||||
pur_id1=self.browse(cr, uid, ref("purchase_order_po2"))
|
||||
picking_obj = self.pool.get('stock.picking')
|
||||
ids = picking_obj.search(cr, uid, [('origin', '=', pur_id1.name)])
|
||||
pick_id = picking_obj.browse(cr, uid, ids)[0]
|
||||
move_obj = self.pool.get('stock.move')
|
||||
search_id = move_obj.search(cr, uid, [('picking_id', '=', pick_id.name)])
|
||||
assert search_id, _('No Incoming Product!')
|
||||
-
|
||||
I check that Traceability moves are created.
|
||||
assert search_id, 'No Incoming Product!'
|
||||
-
|
||||
Then I create an invoice from picking by clicking on "Create Invoice" wizard
|
||||
-
|
||||
I create stock invoice on shipping entry.
|
||||
-
|
||||
!record {model: stock.invoice.onshipping, id: stock_invoice_onshipping_0}:
|
||||
invoice_date: '2010-05-11'
|
||||
journal_id: account.bank_journal
|
||||
-
|
||||
I create Invoice.
|
||||
-
|
||||
!python {model: stock.invoice.onshipping}: |
|
||||
pur_obj=self.pool.get('purchase.order')
|
||||
pur_obj=self.pool.get('purchase.order')
|
||||
pur_id1=pur_obj.browse(cr, uid, ref("purchase_order_po2"))
|
||||
picking_obj = self.pool.get('stock.picking')
|
||||
ids = picking_obj.search(cr, uid, [('origin', '=', pur_id1.name)])
|
||||
self.create_invoice(cr, uid, [ref("stock_invoice_onshipping_0")], {"lang": "en_US",
|
||||
"tz": False, "search_default_approved": 1, "active_model": "stock.picking",
|
||||
"active_ids": ids, "active_id": ids[0], })
|
||||
pick_ids = [x.id for x in pur_id1.picking_ids]
|
||||
id = self.create(cr, uid, {'invoice_date': '2010-05-11', 'journal_id': ref('account.expenses_journal')},
|
||||
{'active_ids': pick_ids})
|
||||
self.create_invoice(cr, uid, [id], {"active_ids": pick_ids})
|
||||
-
|
||||
I check that an invoice_id field of Delivery&Invoices gets bind with the value.
|
||||
-
|
||||
|
||||
@@ -65,23 +65,16 @@
|
||||
'product_uom': move.product_uom.id,
|
||||
}
|
||||
self.do_partial(cr, uid, [pick.id],partial_datas)
|
||||
-
|
||||
Then I create the invoice from the two partial picking
|
||||
-
|
||||
!record {model: stock.invoice.onshipping, id: stock_invoice_onshipping_6}:
|
||||
invoice_date: '2010-07-17'
|
||||
journal_id: account.sales_journal
|
||||
-
|
||||
Then I click on 'Create Invoices' button
|
||||
-
|
||||
!python {model: stock.invoice.onshipping}: |
|
||||
sale_obj = self.pool.get('sale.order')
|
||||
sale_id = sale_obj.browse(cr, uid, ref("sale_order_so6"))
|
||||
picking_obj = self.pool.get('stock.picking')
|
||||
ids = picking_obj.search(cr, uid, [('origin', '=', sale_id.name)])
|
||||
self.create_invoice(cr, uid, [ref("stock_invoice_onshipping_6")], {"lang": "en_US",
|
||||
"search_default_available": 1, "tz": False, "active_model": "stock.picking",
|
||||
"contact_display": "partner", "active_ids": ids, "active_id": ids[0]})
|
||||
ids = [x.id for x in sale_id.picking_ids]
|
||||
wiz_id = self.create(cr, uid, {'invoice_date': '2010-07-17', 'journal_id': ref('account.sales_journal')},
|
||||
{'active_ids': ids})
|
||||
self.create_invoice(cr, uid, [wiz_id], {"active_ids": ids})
|
||||
-
|
||||
I verify whether the invoice has been generated for SO
|
||||
-
|
||||
|
||||
@@ -58,23 +58,16 @@
|
||||
'product_uom': move.product_uom.id,
|
||||
}
|
||||
self.do_partial(cr, uid, [pick.id],partial_datas)
|
||||
-
|
||||
Then I create invoice from picking
|
||||
-
|
||||
!record {model: stock.invoice.onshipping, id: stock_invoice_onshipping_0}:
|
||||
invoice_date: '2010-07-15'
|
||||
journal_id: account.sales_journal
|
||||
-
|
||||
Then I click on 'Create Invoices' button
|
||||
-
|
||||
!python {model: stock.invoice.onshipping}: |
|
||||
sale_obj=self.pool.get('sale.order')
|
||||
sale_id=sale_obj.browse(cr, uid, ref("sale_order_so7"))
|
||||
picking_obj = self.pool.get('stock.picking')
|
||||
ids = picking_obj.search(cr, uid, [('origin', '=', sale_id.name)])
|
||||
self.create_invoice(cr, uid, [ref("stock_invoice_onshipping_0")], {"lang": "en_US",
|
||||
"search_default_available": 1, "tz": False, "active_model": "stock.picking",
|
||||
"contact_display": "partner", "active_ids": ids, "active_id": ids[0]})
|
||||
ids = [x.id for x in sale_id.picking_ids]
|
||||
wiz_id = self.create(cr, uid, {'invoice_date': '2010-07-15', 'journal_id': ref('account.sales_journal')},
|
||||
{'active_ids': ids})
|
||||
self.create_invoice(cr, uid, [wiz_id], {"active_ids": ids})
|
||||
-
|
||||
I check that an invoice has been created.
|
||||
-
|
||||
|
||||
Reference in New Issue
Block a user