Launchpad automatic translations update.
[odoo/odoo.git] / addons / account_asset / test / account_asset_wizard.yml
1 -
2   I create a record to change the duration of asset for calculating depreciation.
3 -
4   !record {model: asset.modify, id: asset_modify_number_0, context: "{'active_id': ref('account_asset_asset_office0')}"}:
5     method_number: 10.0
6 -
7   I change the duration.
8 -
9   !python {model: asset.modify}: |
10     context = {"active_id":ref('account_asset_asset_office0')}
11     self.modify(cr, uid, [ref("asset_modify_number_0")], context=context)
12 -
13   I check the proper depreciation lines created.
14 -
15   !assert {model: account.asset.asset, id: account_asset.account_asset_asset_office0}:
16     - method_number == len(depreciation_line_ids) -1
17 -
18   I create a period to compute a asset on period.
19 -
20   !record {model: asset.depreciation.confirmation.wizard, id: asset_compute_period_0}:
21     {}
22 -
23   I compute a asset on period.
24 -
25   !python {model: asset.depreciation.confirmation.wizard}: |
26     context = {"active_ids": [ref("menu_asset_depreciation_confirmation_wizard")], "active_id":ref('menu_asset_depreciation_confirmation_wizard')}
27     self.asset_compute(cr, uid, [ref("asset_compute_period_0")], context=context)