- fusion.asset: lifecycle (draft -> running -> paused -> disposed) - mail.thread + mail.activity.mixin tracking - 3 depreciation methods + 3 prorate conventions selections - monetary cost / salvage with check constraints (models.Constraint) - computed book_value, total_depreciated, last_posted_date - action_set_running / pause / resume / set_draft transitions - minimal stubs for fusion.asset.category and fusion.asset.depreciation.line so the One2many / Many2one comodels resolve at registry build time; expanded in Tasks 9 + 10 - 7 new tests (47 total) Made-with: Cursor
20 lines
654 B
Python
20 lines
654 B
Python
"""Per-period depreciation board lines for an asset.
|
|
|
|
Stub created with Task 8 (so fusion.asset One2many resolves). Fully
|
|
elaborated in Task 9.
|
|
"""
|
|
|
|
from odoo import fields, models
|
|
|
|
|
|
class FusionAssetDepreciationLine(models.Model):
|
|
_name = "fusion.asset.depreciation.line"
|
|
_description = "Asset Depreciation Board Line"
|
|
_order = "asset_id, scheduled_date"
|
|
|
|
asset_id = fields.Many2one('fusion.asset', required=True, ondelete='cascade')
|
|
scheduled_date = fields.Date(required=True)
|
|
amount = fields.Monetary()
|
|
currency_id = fields.Many2one(related='asset_id.currency_id', store=True)
|
|
is_posted = fields.Boolean(default=False)
|