feat: separate fusion field service and LTC into standalone modules, update core modules
- 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
This commit is contained in:
@@ -105,9 +105,11 @@ class AccountMove(models.Model):
|
||||
try:
|
||||
report = self.env.ref('fusion_claims.action_report_mod_invoice')
|
||||
pdf_content, _ = report._render_qweb_pdf(report.id, [self.id])
|
||||
client_name = (so.partner_id.name or 'Client').replace(' ', '_').replace(',', '')
|
||||
name_parts = (so.partner_id.name or 'Client').strip().split()
|
||||
first = name_parts[0] if name_parts else 'Client'
|
||||
last = name_parts[-1] if len(name_parts) > 1 else ''
|
||||
att = Attachment.create({
|
||||
'name': f'Invoice - {client_name} - {self.name}.pdf',
|
||||
'name': f'{first}_{last}_MOD_Invoice_{self.name}.pdf',
|
||||
'type': 'binary',
|
||||
'datas': base64.b64encode(pdf_content),
|
||||
'res_model': 'account.move',
|
||||
|
||||
Reference in New Issue
Block a user