This commit is contained in:
gsinghpal
2026-05-22 18:01:31 -04:00
parent d127e19b45
commit f661724c72
34 changed files with 1011 additions and 59 deletions

View File

@@ -17,12 +17,26 @@ class AccountMove(models.Model):
string='Fax Count',
compute='_compute_fax_count',
)
x_ff_show_send_fax_button = fields.Boolean(
string='Show Send Fax Button',
compute='_compute_show_send_fax_button',
help='Driven by the Settings toggle '
'(fusion_faxes.show_send_fax_button).',
)
@api.depends('x_ff_fax_ids')
def _compute_fax_count(self):
for move in self:
move.x_ff_fax_count = len(move.x_ff_fax_ids)
def _compute_show_send_fax_button(self):
param = self.env['ir.config_parameter'].sudo().get_param(
'fusion_faxes.show_send_fax_button', 'True',
)
show = str(param).lower() not in ('false', '0', '')
for move in self:
move.x_ff_show_send_fax_button = show
def action_send_fax(self):
"""Open the Send Fax wizard pre-filled with this invoice."""
self.ensure_one()