Files
Odoo-18.0-20251222/account_asset_compute_batch/models/account_asset_line.py
tocmo0nlord adbe430761
Some checks failed
pre-commit / pre-commit (push) Has been cancelled
tests / Detect unreleased dependencies (push) Has been cancelled
tests / test with OCB (push) Has been cancelled
tests / test with Odoo (push) Has been cancelled
Initial commit: Odoo 18.0-20251222 extra-addons
2026-03-13 20:43:25 +00:00

17 lines
593 B
Python
Executable File

# 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 AccountAssetLine(models.Model):
_inherit = "account.asset.line"
def _setup_move_line_data(self, depreciation_date, account, ml_type, move):
move_line_data = super()._setup_move_line_data(
depreciation_date, account, ml_type, move
)
if self.env.context.get("compute_batch_id"):
move_line_data["compute_batch_id"] = self.env.context["compute_batch_id"]
return move_line_data