2
0

[FIX] account_asset_management: Fix error from group_ids in asset when set profile_id

This commit is contained in:
Víctor Martínez 2021-04-30 11:36:21 +02:00 committed by Rodrigo
parent ab3e333b21
commit 79cc93f3dd

View File

@ -313,8 +313,9 @@ class AccountAsset(models.Model):
@api.depends("profile_id")
def _compute_group_ids(self):
for asset in self.filtered("profile_id"):
asset.group_ids = asset.profile_id.group_ids
for asset in self:
if asset.profile_id:
asset.group_ids = asset.profile_id.group_ids
@api.depends("profile_id")
def _compute_method(self):