[14.0][ADD] account_asset_compute_batch

This commit is contained in:
Kitti U
2021-09-10 20:38:12 +07:00
committed by ps-tubtim
parent 63870113a6
commit e92683f6a9
23 changed files with 798 additions and 7 deletions

View File

@@ -0,0 +1,16 @@
# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class AccountAsset(models.Model):
_inherit = "account.asset"
def _get_asset_line_domain(self, date_end):
domain = super()._get_asset_line_domain(date_end)
if self.env.context.get("compute_profile_ids"):
domain.append(
("asset_id.profile_id", "in", self.env.context["compute_profile_ids"])
)
return domain