[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 sbiosca-s73
parent f9ebd0e960
commit 618d503395

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)