mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[MIG] account_asset_batch_compute: Migration to 13.0
This commit is contained in:
@@ -1,24 +1,13 @@
|
||||
# Copyright 2016 ACSONE SA/NV
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
import logging
|
||||
|
||||
from odoo import _, api, models
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
try:
|
||||
from odoo.addons.queue_job.job import job
|
||||
except ImportError:
|
||||
_logger.debug("Can not `import queue_job`.")
|
||||
from odoo import _, models
|
||||
|
||||
|
||||
class AccountAsset(models.Model):
|
||||
|
||||
_inherit = "account.asset"
|
||||
|
||||
@api.multi
|
||||
@job(default_channel="root.account_asset_batch_compute")
|
||||
def _compute_entries(self, date_end, check_triggers=False):
|
||||
if self.env.context.get(
|
||||
"asset_batch_processing", False
|
||||
|
||||
Reference in New Issue
Block a user