mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[MIG] account_asset_management: Migration to 11.0
This commit is contained in:
committed by
João Marques
parent
6a7789526e
commit
b08d477d8f
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2009-2018 Noviat
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
@@ -41,22 +40,20 @@ class AccountAssetCompute(models.TransientModel):
|
||||
'context': {'asset_move_ids': created_move_ids},
|
||||
}
|
||||
|
||||
domain = "[('id', 'in', [" + \
|
||||
','.join(map(str, created_move_ids)) + "])]"
|
||||
return {
|
||||
'name': _('Created Asset Moves'),
|
||||
'view_type': 'form',
|
||||
'view_mode': 'tree,form',
|
||||
'res_model': 'account.move',
|
||||
'view_id': False,
|
||||
'domain': domain,
|
||||
'domain': [('id', 'in', created_move_ids)],
|
||||
'type': 'ir.actions.act_window',
|
||||
}
|
||||
|
||||
@api.multi
|
||||
def view_asset_moves(self):
|
||||
self.ensure_one()
|
||||
domain = [('id', 'in', self._context.get('asset_move_ids', []))]
|
||||
domain = [('id', 'in', self.env.context.get('asset_move_ids', []))]
|
||||
return {
|
||||
'name': _('Created Asset Moves'),
|
||||
'view_type': 'form',
|
||||
|
||||
Reference in New Issue
Block a user