Files
account-reconcile/account_invoice_reference/test/out_refund_without_origin.yml
2014-01-22 14:55:30 +01:00

34 lines
1.1 KiB
YAML

-
In order to check if the reference of the move is the number of
the refund (customer refunds) when it has no origin, I create a refund
-
!record {model: account.invoice, id: refund_reference_no_origin}:
payment_term: account.account_payment_term_advance
journal_id: account.sales_journal
partner_id: base.res_partner_3
reference_type: none
name: 'Test Customer refund no origin'
invoice_line:
- product_id: product.product_product_5
quantity: 10.0
type: out_refund
-
Set again the type of the invoice (not set on the first one...)
-
!record {model: account.invoice, id: refund_reference_no_origin, view: account.invoice_form}:
type: out_refund
-
Ensure that the invoice is a customer refund
-
!assert {model: account.invoice, id: refund_reference_no_origin}:
- type == 'out_refund'
-
I create refund by clicking on Create button
-
!workflow {model: account.invoice, action: invoice_open, ref: refund_reference_no_origin}
-
I check that the reference of the move is the number of the refund
-
!assert {model: account.invoice, id: refund_reference_no_origin}:
- move_id.ref == number