2018-08-05 20:33:56 +02:00
|
|
|
# Copyright 2009-2018 Noviat
|
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
|
|
|
|
|
|
from odoo import fields, models
|
|
|
|
|
|
|
|
|
|
|
|
class AccountAssetRecomputeTrigger(models.Model):
|
2020-01-29 18:34:31 +01:00
|
|
|
_name = "account.asset.recompute.trigger"
|
2018-08-05 20:33:56 +02:00
|
|
|
_description = "Asset table recompute triggers"
|
|
|
|
|
2022-04-13 12:18:36 +02:00
|
|
|
reason = fields.Char(required=True)
|
2020-01-29 18:34:31 +01:00
|
|
|
company_id = fields.Many2one("res.company", string="Company", required=True)
|
2018-08-05 20:33:56 +02:00
|
|
|
date_trigger = fields.Datetime(
|
2020-01-29 18:34:31 +01:00
|
|
|
"Trigger Date",
|
2018-08-05 20:33:56 +02:00
|
|
|
readonly=True,
|
2020-01-29 18:37:08 +01:00
|
|
|
help="Date of the event triggering the need to recompute the Asset Tables.",
|
2020-01-29 18:34:31 +01:00
|
|
|
)
|
|
|
|
date_completed = fields.Datetime("Completion Date", readonly=True)
|
2018-08-05 20:33:56 +02:00
|
|
|
state = fields.Selection(
|
2020-01-29 18:34:31 +01:00
|
|
|
selection=[("open", "Open"), ("done", "Done")],
|
|
|
|
default="open",
|
|
|
|
readonly=True,
|
|
|
|
)
|