diff --git a/fusion_plating/fusion_plating_jobs/models/fp_job.py b/fusion_plating/fusion_plating_jobs/models/fp_job.py index 31883e0f..9958b8d7 100644 --- a/fusion_plating/fusion_plating_jobs/models/fp_job.py +++ b/fusion_plating/fusion_plating_jobs/models/fp_job.py @@ -2379,7 +2379,14 @@ class FpJob(models.Model): if 'contact_name' in Delivery._fields and ship_to.name: vals['contact_name'] = ship_to.name if 'contact_phone' in Delivery._fields: - vals['contact_phone'] = ship_to.phone or ship_to.mobile or '' + # res.partner has no `mobile` field in this Odoo 19 build — + # guard it so the read can't AttributeError (and still picks + # up mobile on instances that do define it). + vals['contact_phone'] = ( + ship_to.phone + or (ship_to.mobile if 'mobile' in ship_to._fields else '') + or '' + ) # Scheduled date — operator can adjust; this just primes it # so they're not staring at a blank field. if so and so.commitment_date and 'scheduled_date' in Delivery._fields: