7.0 - fix account_asset.yml

This commit is contained in:
luc-demeyer
2014-10-05 15:54:31 +02:00
parent dca02203b3
commit ba1480ce73
2 changed files with 1 additions and 28 deletions

View File

@@ -15,7 +15,7 @@
self.compute_depreciation_board(cr, uid, [ref("account_asset_asset_vehicle0")])
asset = self.browse(cr, uid, ref("account_asset_asset_vehicle0"))
# remark: check infra only valid for prorata == False and method_period == 'year'
assert asset.method_number == len(asset.depreciation_line_ids), 'Depreciation lines not created correctly'
assert asset.method_number == (len(asset.depreciation_line_ids) - 1), 'Depreciation lines not created correctly'
-
I create an account move for the first depreciation line.
-

View File

@@ -1,27 +0,0 @@
-
I create a record to change the duration of asset for calculating depreciation.
-
!record {model: asset.modify, id: asset_modify_number_0, context: "{'active_id': ref('account_asset_asset_office0')}"}:
method_number: 10.0
-
I change the duration.
-
!python {model: asset.modify}: |
context = {"active_id":ref('account_asset_asset_office0')}
self.modify(cr, uid, [ref("asset_modify_number_0")], context=context)
-
I check the proper depreciation lines created.
-
!assert {model: account.asset.asset, id: account_asset.account_asset_asset_office0}:
- method_number == len(depreciation_line_ids) -1
-
I create a period to compute a asset on period.
-
!record {model: asset.depreciation.confirmation.wizard, id: asset_compute_period_0}:
{}
-
I compute a asset on period.
-
!python {model: asset.depreciation.confirmation.wizard}: |
context = {"active_ids": [ref("menu_asset_depreciation_confirmation_wizard")], "active_id":ref('menu_asset_depreciation_confirmation_wizard')}
self.asset_compute(cr, uid, [ref("asset_compute_period_0")], context=context)