~openerp-spain-team/openerp-spain/6.0

« back to all changes in this revision

Viewing changes to l10n_es_account_asset/test/account_asset.yml

  • Committer: Ana Juaristi
  • Date: 2012-03-09 16:21:34 UTC
  • Revision ID: ajuaristio@gmail.com-20120309162134-sjlzxy4afkkuvtpn
[ADD] l10n_es_account_asset, l10n_es_prev_tesoreria: Incluidos modulos prevision tesoreria y activos/amortizaciones.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
-
 
2
  In order to test Account Asset I create Asset and confirm it and check it's Depriciation lines
 
3
 
4
  I Create an Asset Category
 
5
 
6
  !record {model: account.asset.category, id: account_asset_category_landbuildings0}:
 
7
    account_asset_id: account.xfa
 
8
    account_depreciation_id: account.xfa
 
9
    account_expense_depreciation_id: account.a_expense
 
10
    journal_id: account.expenses_journal
 
11
    name: Land & Buildings
 
12
 
13
  I Create an Account Asset
 
14
 
15
  !record {model: account.asset.asset, id: account_asset_asset_Land0}:
 
16
    category_id: account_asset_category_landbuildings0
 
17
    code: land
 
18
    name: Land
 
19
    partner_id: base.res_partner_14
 
20
    purchase_value: 5000.0
 
21
    state: draft
 
22
-
 
23
  I check Initially that Account Asset is in the "Draft" state
 
24
-
 
25
  !assert {model: account.asset.asset, id: account_asset_asset_Land0}:
 
26
    - state == 'draft'
 
27
-
 
28
  I Confirm Account Asset using Confirm Asset button
 
29
-
 
30
  !python {model: account.asset.asset}: |
 
31
    self.validate(cr, uid, [ref("account_asset_asset_Land0")])
 
32
-
 
33
  I check Asset is in running state after pressing Confirm button on asset
 
34
-
 
35
  !assert {model: account.asset.asset, id: account_asset_asset_Land0}:
 
36
    - state == 'open'
 
37
-
 
38
  I Compute Account Asset using Compute button and check the number of depreciation lines created
 
39
-
 
40
  !python {model: account.asset.asset}: |
 
41
    self.compute_depreciation_board(cr, uid, [ref("account_asset_asset_Land0")])
 
42
    # pressing computation button can be remove if creation of depreciation lines while asset is created
 
43
    value = self.browse(cr, uid, [ref("account_asset_asset_Land0")])[0]
 
44
    assert value.method_number == len(value.depreciation_line_ids)
 
45
-
 
46
  I Create Account Move using create move button on depreciation lines
 
47
-
 
48
  !python {model: account.asset.depreciation.line}: |
 
49
    ids = self.search(cr, uid, [('asset_id','=',ref('account_asset_asset_Land0'))])
 
50
    self.create_move(cr, uid, ids)
 
51
-
 
52
  I Check that After creating all the moves of depreciation lines the state is in "Close" state
 
53
-
 
54
  !assert {model: account.asset.asset, id: account_asset_asset_Land0}:
 
55
    - state == 'close'