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

« back to all changes in this revision

Viewing changes to features/oerp_addons/account_voucher/account_voucher_pay_invoice_401.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       
10
 
 
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. 
15
 
 
16
 
  @account_voucher_run
17
 
  Scenario: Create invoice 401PI
18
 
  Given I need a "account.invoice" with oid: scen.voucher_inv_401PI
19
 
    And having:
20
 
      | name               | value                              |
21
 
      | name               | SI_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                        |
30
 
 
31
 
 
32
 
    Given I need a "account.invoice.line" with oid: scen.voucher_inv401PI_line401PI
33
 
    And having:
34
 
      | name       | value                           |
35
 
      | name       | invoice line 401PI              |
36
 
      | quantity   | 1                               |
37
 
      | price_unit | 1000                            |
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
42
 
 
43
 
 
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:
53
 
 
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 |        |          |       |           |         |
62
 
 
63
 
 
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"