Skip to content
Snippets Groups Projects
Commit cc24fe2d authored by Pankti Parikh's avatar Pankti Parikh Committed by Mustufa Rangwala
Browse files

[IMP] Sale: yaml improved for shipping

bzr revid: mra@mra-laptop-20100806132959-w24skraypvgxc0pq
parent 9ca0f71d
Branches
Tags
No related merge requests found
-
In order to test the Sale module in OpenERP,
I create a Sale Order for Slider Mobile for 500 quantity having Shipping Policy 'Shipping & Manual Invoice' and Invoice on 'Shipped quantities'
I create a Sale Order for Slider Mobile for 500 quantity having Shipping Policy 'Invoice from Picking' and Invoice on 'Shipped quantities'
in order to create an invoice based on the shipping quantity
-
!record {model: sale.order, id: sale_order_so6}:
......@@ -17,7 +17,7 @@
product_id: sale.product_product_slidermobile0
product_uos_qty: 200.0
type: make_to_order
order_policy: manual
order_policy: picking
invoice_quantity: procurement
partner_id: sale.res_partner_cleartrail0
partner_invoice_id: sale.res_partner_address_2
......@@ -65,9 +65,23 @@
}
self.do_partial(cr, uid, [pick.id],partial_datas)
-
I click on Create Invoice button to create the invoice.
Then I create invoice from picking
-
!workflow {model: sale.order, action: manual_invoice, ref: sale_order_so6}
!record {model: stock.invoice.onshipping, id: stock_invoice_onshipping_6}:
invoice_date: '2010-07-17'
journal_id: account.sales_journal
type: out_invoice
-
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]})
-
I verify whether the invoice has been generated for SO
-
......@@ -75,7 +89,7 @@
so = self.browse(cr, uid, ref("sale_order_so6"))
assert so.invoice_ids, "Invoices has not been generated for sale_order_so6"
-
I verify that an invoice is created on the basis of shipped quantity
I verify that an invoice is created on the basis of shipped quantity
-
!python {model: account.invoice}: |
sale_order_obj = self.pool.get('sale.order')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment