changes
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
"""
|
||||
Fusion Technician Task - Claims Extension
|
||||
Adds sale order, purchase order, LTC facility, and rental inspection
|
||||
Adds sale order, purchase order, and rental inspection
|
||||
features to the base fusion.technician.task model.
|
||||
"""
|
||||
|
||||
@@ -48,13 +48,6 @@ class FusionTechnicianTaskClaims(models.Model):
|
||||
store=True,
|
||||
)
|
||||
|
||||
facility_id = fields.Many2one(
|
||||
'fusion.ltc.facility',
|
||||
string='LTC Facility',
|
||||
tracking=True,
|
||||
help='LTC Home for this visit',
|
||||
)
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# RENTAL INSPECTION
|
||||
# ------------------------------------------------------------------
|
||||
@@ -105,26 +98,6 @@ class FusionTechnicianTaskClaims(models.Model):
|
||||
addr = order.dest_address_id or order.partner_id
|
||||
self._fill_address_from_partner(addr)
|
||||
|
||||
@api.onchange('facility_id')
|
||||
def _onchange_facility_id(self):
|
||||
"""Auto-fill address from the LTC facility."""
|
||||
if self.facility_id and self.task_type == 'ltc_visit':
|
||||
fac = self.facility_id
|
||||
self.address_street = fac.street or ''
|
||||
self.address_street2 = fac.street2 or ''
|
||||
self.address_city = fac.city or ''
|
||||
self.address_state_id = fac.state_id.id if fac.state_id else False
|
||||
self.address_zip = fac.zip or ''
|
||||
self.description = self.description or _(
|
||||
'LTC Visit at %s', fac.name
|
||||
)
|
||||
|
||||
@api.onchange('task_type')
|
||||
def _onchange_task_type_ltc(self):
|
||||
if self.task_type == 'ltc_visit':
|
||||
self.sale_order_id = False
|
||||
self.purchase_order_id = False
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# CONSTRAINTS
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user