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

« back to all changes in this revision

Viewing changes to features/oerp_addons/account_voucher/account_voucher_423wo.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 supplier invoice for 1000 EUR (rate : 1) and pay 1150 EUR. I consider the 150 EUR
14
 
         as write-off. 
15
 
 
16
 
  @account_voucher_run
17
 
  Scenario: Create invoice 423wo
18
 
  Given I need a "account.invoice" with oid: scen.voucher_inv_423wo
19
 
    And having:
20
 
      | name               | value                              |
21
 
      | name               | SI_423wo                           |
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: Creditors                 |
27
 
      | journal_id         | by name: Purchases                 |
28
 
      | currency_id        | by name: EUR                       |
29
 
      | type               | in_invoice                         |
30
 
 
31
 
 
32
 
    Given I need a "account.invoice.line" with oid: scen.voucher_inv423wo_line423wo
33
 
    And having:
34
 
      | name       | value                           |
35
 
      | name       | invoice line 423wo              |
36
 
      | quantity   | 1                               |
37
 
      | price_unit | 1000                            |
38
 
      | account_id | by name: Sales                  |
39
 
      | invoice_id | by oid:scen.voucher_inv_423wo   |
40
 
    Given I find a "account.invoice" with oid: scen.voucher_inv_423wo
41
 
    And I open the credit invoice
42
 
 
43
 
  @account_voucher_run
44
 
  Scenario: Create Statement 423wo
45
 
    Given I need a "account.bank.statement" with oid: scen.voucher_statement_423wo
46
 
    And having:
47
 
     | name        | value                             |
48
 
     | name        | Bk.St.423wo                       |
49
 
     | date        | %Y-02-15                          |
50
 
     | currency_id | by name: EUR                      |
51
 
     | journal_id  | by oid:  scen.voucher_eur_journal |
52
 
    And the bank statement is linked to period "02/%Y"
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_423wo
57
 
    And I import invoice "SI_423wo" using import invoice button
58
 
 
59
 
 @acccout_voucher_run @account_statement_line_amount_modified   
60
 
  Scenario: Modify the paid amount of the imported invoice 
61
 
    Given I need a "account.bank.statement.line" with name: SI_411wo
62
 
    And the line amount should be -1000
63
 
    Then I modify the bank statement line amount to -1150
64
 
 
65
 
 @acccout_voucher_run @account_voucher_with_wo
66
 
  Scenario: As this is a final payment, in the payment options, I want to post the write off into the wo account
67
 
    Then I set the payment options to choose the writeoff account code 658 
68
 
 
69
 
  @account_voucher_run @account_voucher_confirm
70
 
  Scenario: confirm bank statement 
71
 
    Given I find a "account.bank.statement" with oid: scen.voucher_statement_423wo
72
 
    And I set bank statement end-balance
73
 
    When I confirm bank statement
74
 
     
75
 
  @account_voucher_run @account_voucher_valid_423wo
76
 
  Scenario: validate voucher
77
 
    Given I find a "account.bank.statement" with oid: scen.voucher_statement_423wo
78
 
    Then I should have following journal entries in voucher:
79
 
      | date     | period  | account                        |  debit | credit | curr.amt | curr. | reconcile | partial |
80
 
      | %Y-02-15 | 02/%Y   | Creditors                      |1000.00 |        |          |       | yes       |         |
81
 
      | %Y-02-15 | 02/%Y   | Write-off                      | 150.00 |        |          |       |           |         |
82
 
      | %Y-02-15 | 02/%Y   | EUR bank account               |        |1150.00 |          |       |           |         |
83
 
 
84
 
  @account_voucher_run @account_voucher_valid_invoice_423wo
85
 
  Scenario: validate voucher
86
 
    Given My invoice "SI_423wo" is in state "paid" reconciled with a residual amount of "0.0"