2
0

[14.0][FIX] account_asset_management, singleton error on asset_count

This commit is contained in:
Kitti U 2021-09-28 10:28:10 +07:00 committed by Rodrigo
parent 426d1bd3d6
commit 0dea77f078

View File

@ -36,7 +36,7 @@ class AccountMove(models.Model):
for rec in self:
assets = (
self.env["account.asset.line"]
.search([("move_id", "=", self.id)])
.search([("move_id", "=", rec.id)])
.mapped("asset_id")
)
rec.asset_count = len(assets)