Initial commit

This commit is contained in:
gsinghpal
2026-02-22 01:22:18 -05:00
commit 5200d5baf0
2394 changed files with 386834 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
# -*- coding: utf-8 -*-
# Copyright 2026 Nexa Systems Inc.
# License OPL-1 (Odoo Proprietary License v1.0)
from odoo import api, fields, models
class FusionFaxDocument(models.Model):
_name = 'fusion.fax.document'
_description = 'Fax Document Line'
_order = 'sequence, id'
fax_id = fields.Many2one(
'fusion.fax',
string='Fax',
required=True,
ondelete='cascade',
)
sequence = fields.Integer(
string='Order',
default=10,
)
attachment_id = fields.Many2one(
'ir.attachment',
string='Document',
required=True,
ondelete='cascade',
)
file_name = fields.Char(
related='attachment_id.name',
string='File Name',
)
mimetype = fields.Char(
related='attachment_id.mimetype',
string='Type',
)
def action_preview(self):
"""Open the attachment in Odoo's built-in PDF viewer dialog."""
self.ensure_one()
return {
'type': 'ir.actions.client',
'tag': 'fusion_claims.preview_document',
'params': {
'attachment_id': self.attachment_id.id,
'title': self.file_name or 'Document Preview',
},
}