Files
Odoo-Modules/fusion_plating/fusion_plating_logistics/models/fp_route_stop.py
gsinghpal 8c76a16366 chore(plating): de-dash shipped code + intake-neutral customer emails
Replace em-dashes and en-dashes with hyphens across 789 shipped source
files (py/xml/js/scss) so the delivered module reads as human-written;
em-dashes had become a recognizable AI-generated tell. Internal .md dev
notes are excluded. The WO-sticker mojibake strippers keep their dash
search targets (now written — / –). No logic changes: comments
and display strings only; validated with py_compile + lxml parse.

Rewrite the 7 customer notification emails to be intake-neutral
(ship-in / drop-off / pickup) and repair-aware, and fix the Shipped
email documents line (packing slip vs bill of lading; certificate only
when issued). Subjects use a hyphen separator.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 00:16:19 -04:00

87 lines
2.3 KiB
Python

# -*- coding: utf-8 -*-
# Copyright 2026 Nexa Systems Inc.
# License OPL-1 (Odoo Proprietary License v1.0)
# Part of the Fusion Plating product family.
from odoo import fields, models
class FpRouteStop(models.Model):
"""A single stop on a route.
A stop is one of: pickup, delivery, transfer (between facilities),
fuel, or break. Pickup and delivery stops link back to the source
records so the driver can open them from the route. Non-transactional
stops (fuel, break) just carry an address and a planned time.
"""
_name = 'fusion.plating.route.stop'
_description = 'Fusion Plating - Route Stop'
_order = 'route_id, sequence, id'
route_id = fields.Many2one(
'fusion.plating.route',
string='Route',
required=True,
ondelete='cascade',
)
sequence = fields.Integer(
string='Sequence',
default=10,
)
stop_type = fields.Selection(
[
('pickup', 'Pickup'),
('delivery', 'Delivery'),
('transfer', 'Facility Transfer'),
('fuel', 'Fuel'),
('break', 'Break'),
],
string='Stop Type',
default='pickup',
required=True,
)
pickup_request_id = fields.Many2one(
'fusion.plating.pickup.request',
string='Pickup Request',
)
delivery_id = fields.Many2one(
'fusion.plating.delivery',
string='Delivery',
)
address_id = fields.Many2one(
'res.partner',
string='Address',
)
planned_time = fields.Datetime(
string='Planned Time',
)
actual_time = fields.Datetime(
string='Actual Time',
)
state = fields.Selection(
[
('pending', 'Pending'),
('arrived', 'Arrived'),
('completed', 'Completed'),
('skipped', 'Skipped'),
],
string='Status',
default='pending',
required=True,
)
notes = fields.Text(
string='Notes',
)
def action_mark_arrived(self):
self.write({
'state': 'arrived',
'actual_time': fields.Datetime.now(),
})
def action_mark_completed(self):
self.write({'state': 'completed'})
def action_mark_skipped(self):
self.write({'state': 'skipped'})