Files
account-reconcile/account_invoice_reference/test/in_refund_without_supplier_number.yml

40 lines
1.4 KiB
YAML

-
In order to check if the reference of the move is the supplier refund number of
the refund (supplier refunds), I create an refund
-
!record {model: account.invoice, id: refund_reference_no_supplier_number, view: account.invoice_supplier_form}:
account_id: account.a_pay
check_total: 3000.0
company_id: base.main_company
currency_id: base.EUR
invoice_line:
- account_id: account.a_expense
name: '[PCSC234] PC Assemble SC234'
price_unit: 300.0
product_id: product.product_product_3
quantity: 10.0
uos_id: product.product_uom_unit
journal_id: account.expenses_journal
partner_id: base.res_partner_12
reference_type: none
type: in_refund
-
Set again the type of the refund (not set on the first one...)
-
!record {model: account.invoice, id: refund_reference_supplier_number, view: account.invoice_supplier_form}:
type: in_refund
-
Ensure that the refund is a supplier refund
-
!assert {model: account.invoice, id: refund_reference_supplier_number}:
- type == 'in_refund'
-
I create refund by clicking on Create button
-
!workflow {model: account.invoice, action: invoice_open, ref: refund_reference_no_supplier_number}
-
I check that the reference of the move is the number of the refund
-
!assert {model: account.invoice, id: refund_reference_no_supplier_number}:
- move_id.ref == number