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:
@@ -57,6 +57,12 @@ class FusionADPDeviceCode(models.Model):
|
||||
index=True,
|
||||
help='Device manufacturer',
|
||||
)
|
||||
build_type = fields.Selection(
|
||||
[('modular', 'Modular'), ('custom_fabricated', 'Custom Fabricated')],
|
||||
string='Build Type',
|
||||
index=True,
|
||||
help='Build type for positioning/seating devices: Modular or Custom Fabricated',
|
||||
)
|
||||
device_description = fields.Char(
|
||||
string='Device Description',
|
||||
help='Detailed device description from mobility manual',
|
||||
@@ -242,6 +248,16 @@ class FusionADPDeviceCode(models.Model):
|
||||
device_type = self._clean_text(item.get('Device Type', '') or item.get('device_type', ''))
|
||||
manufacturer = self._clean_text(item.get('Manufacturer', '') or item.get('manufacturer', ''))
|
||||
device_description = self._clean_text(item.get('Device Description', '') or item.get('device_description', ''))
|
||||
|
||||
# Parse build type (Modular / Custom Fabricated)
|
||||
build_type_raw = self._clean_text(item.get('Build Type', '') or item.get('build_type', ''))
|
||||
build_type = False
|
||||
if build_type_raw:
|
||||
bt_lower = build_type_raw.lower().strip()
|
||||
if bt_lower in ('modular', 'mod'):
|
||||
build_type = 'modular'
|
||||
elif bt_lower in ('custom fabricated', 'custom_fabricated', 'custom'):
|
||||
build_type = 'custom_fabricated'
|
||||
|
||||
# Parse quantity
|
||||
qty_val = item.get('Quantity', 1) or item.get('Qty', 1) or item.get('quantity', 1)
|
||||
@@ -277,6 +293,8 @@ class FusionADPDeviceCode(models.Model):
|
||||
'last_updated': fields.Datetime.now(),
|
||||
'active': True,
|
||||
}
|
||||
if build_type:
|
||||
vals['build_type'] = build_type
|
||||
|
||||
if existing:
|
||||
existing.write(vals)
|
||||
|
||||
Reference in New Issue
Block a user