mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
Add tests that fail to check the copy of supplier_invoice_number to
reference on create and write
This commit is contained in:
@@ -141,6 +141,7 @@ Information propagated to the move lines:
|
||||
'test/out_refund_without_origin.yml',
|
||||
'test/in_refund_with_supplier_number.yml',
|
||||
'test/in_refund_without_supplier_number.yml',
|
||||
'test/supplier_invoice_number.yml',
|
||||
|
||||
],
|
||||
'installable': True,
|
||||
|
||||
47
account_invoice_reference/test/supplier_invoice_number.yml
Normal file
47
account_invoice_reference/test/supplier_invoice_number.yml
Normal file
@@ -0,0 +1,47 @@
|
||||
-
|
||||
In order to check if the reference is populated from the supplier_invoice_number
|
||||
I create an invoice.
|
||||
-
|
||||
!record {model: account.invoice, id: invoice_supplier_invoice_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
|
||||
supplier_invoice_number: ZZZ246
|
||||
type: in_invoice
|
||||
-
|
||||
Set again the type of the invoice (not set on the first one...)
|
||||
-
|
||||
!record {model: account.invoice, id: invoice_supplier_invoice_number, view: account.invoice_supplier_form}:
|
||||
type: in_invoice
|
||||
-
|
||||
Ensure that the reference is the same than the supplier_invoice_number
|
||||
-
|
||||
!assert {model: account.invoice, id: invoice_supplier_invoice_number}:
|
||||
- reference == 'ZZZ246'
|
||||
-
|
||||
In order to check if the supplier_invoice_number is copied to the supplier_invoice_number
|
||||
when the reference is empty, I empty the reference
|
||||
-
|
||||
!record {model: account.invoice, id: invoice_supplier_invoice_number, view: account.invoice_supplier_form}:
|
||||
reference:
|
||||
-
|
||||
And I write a new supplier_invoice_number
|
||||
-
|
||||
!record {model: account.invoice, id: invoice_supplier_invoice_number, view: account.invoice_supplier_form}:
|
||||
supplier_invoice_number: ABC789
|
||||
-
|
||||
Ensure that the reference is the same than the supplier_invoice_number
|
||||
-
|
||||
!assert {model: account.invoice, id: invoice_supplier_invoice_number}:
|
||||
- reference == 'ABC789'
|
||||
Reference in New Issue
Block a user