~camptocamp/oerpscenario/add-count-items-lep

« back to all changes in this revision

Viewing changes to features/oerp_addons/account_voucher/account_voucher_104.feature

  • Committer: Alexandre Fayolle
  • Author(s): nicolas.bessi at camptocamp
  • Date: 2013-06-06 06:16:43 UTC
  • mfrom: (321.1.1 oerpscenario)
  • Revision ID: alexandre.fayolle@camptocamp.com-20130606061643-899xeg6ggx1hy5ok
[MRG] FIX base finance setup to be green in V7.0 and remove credit control tests that where moved into the addon

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
###############################################################################
2
 
#
3
 
#    OERPScenario, OpenERP Functional Tests
4
 
#    Copyright 2009 Camptocamp SA
5
 
#
6
 
##############################################################################
7
 
##############################################################################
8
 
# Branch      # Module       # Processes     # System
9
 
@addons       @account_voucher       @1     @104
10
 
 
11
 
Feature: In order to validate multicurrency account_voucher behaviour as an admin user I do a reconciliation run.
12
 
         I want to create a supplier invoice for 1000 USD (rate : 1.8) and pay it in full in USD (rate : 1.5)
13
 
         with account_voucher. The Journal entries must calculate the correct currency gain/loss.
14
 
 
15
 
  @account_voucher_run
16
 
  Scenario: Create invoice 104
17
 
  Given I need a "account.invoice" with oid: scen.voucher_inv_104
18
 
    And having:
19
 
      | name               | value                              |
20
 
      | name               | SI_104                             |
21
 
      | date_invoice       | %Y-02-01                           |
22
 
      | date_due           | %Y-03-15                           |
23
 
      | address_invoice_id | by oid: scen.partner_1_add         |
24
 
      | partner_id         | by oid: scen.partner_1             |
25
 
      | account_id         | by name: Creditors                 |
26
 
      | journal_id         | by name: Purchases                 |
27
 
      | currency_id        | by name: USD                       |
28
 
      | type               | in_invoice                         |
29
 
 
30
 
 
31
 
    Given I need a "account.invoice.line" with oid: scen.voucher_inv104_line104
32
 
    And having:
33
 
      | name       | value                           |
34
 
      | name       | invoice line 104                |
35
 
      | quantity   | 1                               |
36
 
      | price_unit | 1000                            |
37
 
      | account_id | by name: Sales                  |
38
 
      | invoice_id | by oid:scen.voucher_inv_104     |
39
 
    Given I find a "account.invoice" with oid: scen.voucher_inv_104
40
 
    And I open the credit invoice
41
 
 
42
 
  @account_voucher_run
43
 
  Scenario: Create Statement 104
44
 
    Given I need a "account.bank.statement" with oid: scen.voucher_statement_104
45
 
    And having:
46
 
     | name        | value                             |
47
 
     | name        | Bk.St.104                         |
48
 
     | date        | %Y-03-15                          |
49
 
     | currency_id | by name: USD                      |
50
 
     | journal_id  | by oid:  scen.voucher_usd_journal |
51
 
    And the bank statement is linked to period "03/%Y"
52
 
 
53
 
 
54
 
 @account_voucher_run @account_voucher_import_invoice
55
 
  Scenario: Import invoice into statement
56
 
    Given I find a "account.bank.statement" with oid: scen.voucher_statement_104
57
 
    And I import invoice "SI_104" using import invoice button
58
 
 
59
 
  @account_voucher_run @account_voucher_confirm
60
 
  Scenario: confirm bank statement (/!\ Voucher payment options must be 'reconcile payment balance' by default )
61
 
    Given I find a "account.bank.statement" with oid: scen.voucher_statement_104
62
 
    And I set bank statement end-balance
63
 
    When I confirm bank statement
64
 
 
65
 
  @account_voucher_run @account_voucher_valid_104
66
 
  Scenario: validate voucher
67
 
    Given I find a "account.bank.statement" with oid: scen.voucher_statement_104
68
 
    Then I should have following journal entries in voucher:
69
 
      | date     | period  | account                        |  debit | credit | curr.amt | curr. | reconcile | partial |
70
 
      | %Y-03-15 | 03/%Y | Currency fx                      | 111.11 |        |          | USD   |           |         |
71
 
      | %Y-03-15 | 03/%Y | Creditors                        |        | 111.11 |          | USD   | yes       |         |
72
 
      | %Y-03-15 | 03/%Y | Creditors                        | 666.67 |        |     1000 | USD   | yes       |         |
73
 
      | %Y-03-15 | 03/%Y | USD bank account                 |        | 666.67|     -1000 | USD   |           |         |
74
 
 
75
 
 
76
 
  @account_voucher_run @account_voucher_valid_invoice_104
77
 
  Scenario: validate voucher
78
 
    Given My invoice "SI_104" is in state "paid" reconciled with a residual amount of "0.0"