1
###############################################################################
3
# OERPScenario, OpenERP Functional Tests
4
# Copyright 2009 Camptocamp SA
6
##############################################################################
7
##############################################################################
8
# Branch # Module # Processes # System
11
Feature: ### TODO - MISSING SENTENCES ###
12
In order to validate multicurrency account_voucher behaviour as an admin user I do a reconciliation run.
13
I want to create a customer invoice for 1000 EUR (rate : 1) and pay it in full in EUR (rate : 1)
14
with account_voucher using the pay invoice button from the invoice.
17
Scenario: Create invoice 401PI
18
Given I need a "account.invoice" with oid: scen.voucher_inv_401PI
22
| date_invoice | %Y-01-01 |
23
| date_due | %Y-02-15 |
24
| address_invoice_id | by oid: scen.partner_1_add |
25
| partner_id | by oid: scen.partner_1 |
26
| account_id | by name: Debtors |
27
| journal_id | by name: Sales |
28
| currency_id | by name: EUR |
29
| type | out_invoice |
32
Given I need a "account.invoice.line" with oid: scen.voucher_inv401PI_line401PI
35
| name | invoice line 401PI |
38
| account_id | by name: Sales |
39
| invoice_id | by oid:scen.voucher_inv_401PI |
40
Given I find a "account.invoice" with oid: scen.voucher_inv_401PI
41
And I open the credit invoice
44
Given I pay the customer invoice with name "SI_401PI"
45
And I set the voucher paid amount to "1150"
46
And I set the voucher payment method to "EUR bank"
47
And I set the voucher's first line to be "full reconcile" with a "1000" allocation
48
And I change the voucher's options to create a write-off on account "658"
49
# And I save the voucher
50
And I set the voucher's first line to be "full reconcile" with a "1000" allocation
51
When I validate the voucher
52
Then generated move lines should be:
54
@account_voucher_run @account_voucher_valid_401PI
55
Scenario: validate voucher
56
Given I find a "account.bank.statement" with oid: scen.voucher_statement_401PI
57
Then I should have following journal entries in voucher:
58
| date | period | account | debit | credit | curr.amt | curr. | reconcile | partial |
59
| %Y-02-15 | 02/%Y | Debtors | |1000.00 | | | yes | |
60
| %Y-02-15 | 02/%Y | Write-off | | 150.00 | | | | |
61
| %Y-02-15 | 02/%Y | EUR bank account |1150.00 | | | | | |
64
@account_voucher_run @account_voucher_valid_invoice_401PI
65
Scenario: validate voucher
66
Given My invoice "SI_401PI" is in state "paid" reconciled with a residual amount of "0.0"