[IMP] sale: update 'Manual_order_policy.yml'
bzr revid: cha@tinyerp.com-20120912073357-naznvtd9n0zja3pd
This commit is contained in:
parent
73dc43adc6
commit
aa779d5000
|
@ -15,38 +15,28 @@
|
|||
ctx = context.copy()
|
||||
ctx.update({"active_model": 'sale.order', "active_ids": [ref("sale_order_2")], "active_id":ref("sale_order_2")})
|
||||
order_line = self.pool.get('sale.order.line').browse(cr, uid, ref("sale_order_line_4"), context=context)
|
||||
pay_id = self.create(cr, uid, {'advance_payment_method': 'fixed', 'product_id': order_line.product_id.id, 'amount': order_line.price_subtotal, 'qtty': order_line.product_uom_qty})
|
||||
pay_id = self.create(cr, uid, {'advance_payment_method': 'fixed', 'product_id': order_line.product_id.id, 'amount': order_line.price_unit})
|
||||
self.create_invoices(cr, uid, [pay_id], context=ctx)
|
||||
-
|
||||
I check Invoice which made advance
|
||||
I check Invoice which made advance.
|
||||
-
|
||||
!python {model: sale.order}: |
|
||||
order = self.browse(cr, uid, ref('sale_order_2'))
|
||||
assert order.invoice_ids, "Invoice should be created after make advance invoice."
|
||||
-
|
||||
I create Invoice from sale order line.
|
||||
I create advance invoice where payment method is 'all'.
|
||||
-
|
||||
!python {model: sale.order.line.make.invoice}: |
|
||||
!python {model: sale.advance.payment.inv}: |
|
||||
ctx = context.copy()
|
||||
ctx.update({"active_model": 'sale.order.line', "active_ids": [ref("sale_order_line_5")], "active_id":ref("sale_order_line_5")})
|
||||
self.make_invoices(cr, uid, [], context=ctx)
|
||||
ctx.update({"active_model": 'sale.order', "active_ids": [ref("sale_order_2")], "active_id":ref("sale_order_2")})
|
||||
pay_id = self.create(cr, uid, {'advance_payment_method': 'all'})
|
||||
self.create_invoices(cr, uid, [pay_id], context=ctx)
|
||||
-
|
||||
I check Invoice which made from sale order line.
|
||||
I check Invoice which made advance where payment method is 'all'.
|
||||
-
|
||||
!python {model: sale.order.line}: |
|
||||
line = self.browse(cr, uid, ref('sale_order_line_5'))
|
||||
assert line.invoiced, "Line is not invoiced."
|
||||
assert line.invoice_lines, "Invoice line should be created."
|
||||
-
|
||||
I create manual Invoice for order.
|
||||
-
|
||||
!record {model: sale.make.invoice, id: sale_make_invoice_1}:
|
||||
invoice_date: !eval time.strftime('%Y-%m-%d')
|
||||
-
|
||||
!python {model: sale.make.invoice}: |
|
||||
ctx = context.copy()
|
||||
ctx = ctx.update({"active_model": 'sale.order', "active_ids": [ref("sale_order_2")], "active_id":ref("sale_order_2")})
|
||||
self.make_invoices(cr, uid, [ref("sale_make_invoice_1")], context)
|
||||
!python {model: sale.order}: |
|
||||
order = self.browse(cr, uid, ref('sale_order_2'))
|
||||
assert order.invoice_ids, "Invoice should be created after make advance invoice where payment method is 'all'."
|
||||
-
|
||||
I open the Invoice.
|
||||
-
|
||||
|
@ -76,7 +66,7 @@
|
|||
sale_order = self.browse(cr, uid, ref("sale_order_2"))
|
||||
assert sale_order.invoice_ids, "Invoice should be created."
|
||||
assert sale_order.invoiced, "Order is not invoiced."
|
||||
assert sale_order.state == 'manual', 'Order should be in Manual.'
|
||||
assert sale_order.state == 'progress', 'Order should be in Progress.'
|
||||
|
||||
-
|
||||
I set order policy "Deliver & invoice on demand" as default policy.
|
||||
|
|
Loading…
Reference in New Issue