- fusion_claims: separated field service logic, updated controllers/views - fusion_tasks: updated task views and map integration - fusion_authorizer_portal: added page 11 signing, schedule booking, migrations - fusion_shipping: new standalone shipping module (Canada Post, FedEx, DHL, Purolator) - fusion_ltc_management: new standalone LTC management module
29 lines
784 B
Python
29 lines
784 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
from odoo import api, fields, models, _
|
|
|
|
|
|
class FusionLoanerCheckoutAssessment(models.Model):
|
|
_inherit = 'fusion.loaner.checkout'
|
|
|
|
assessment_id = fields.Many2one(
|
|
'fusion.assessment',
|
|
string='Assessment',
|
|
ondelete='set null',
|
|
tracking=True,
|
|
help='Assessment during which this loaner was issued',
|
|
)
|
|
|
|
def action_view_assessment(self):
|
|
self.ensure_one()
|
|
if not self.assessment_id:
|
|
return
|
|
return {
|
|
'name': self.assessment_id.display_name,
|
|
'type': 'ir.actions.act_window',
|
|
'res_model': 'fusion.assessment',
|
|
'view_mode': 'form',
|
|
'views': [(False, 'form')],
|
|
'res_id': self.assessment_id.id,
|
|
}
|