# -*- 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 ResPartner(models.Model): """Per-customer preferences for what quality documents are generated and emailed when a job ships. Some aerospace customers insist on a full CoC + thickness report; others just want the CoC; some repeat commercial accounts want neither (the PO says "no paperwork required"). Rather than hard-code the shop's policy, each customer controls their own. """ _inherit = 'res.partner' x_fc_send_coc = fields.Boolean( string='Send Certificate of Conformance', default=True, tracking=True, help='When shipping, auto-generate and email a CoC to this customer.', ) x_fc_send_thickness_report = fields.Boolean( string='Send Thickness Report', default=True, tracking=True, help='When shipping, auto-generate and email a thickness report ' 'with the Fischerscope readings for this job.', ) x_fc_send_packing_slip = fields.Boolean( string='Send Packing Slip', default=True, tracking=True, help='Attach the packing slip PDF to the shipping confirmation email.', ) x_fc_send_bol = fields.Boolean( string='Send Bill of Lading', default=False, tracking=True, help='Attach the BoL PDF to the shipping confirmation email. ' 'Usually only for customers that invoice freight separately.', ) x_fc_strict_thickness_required = fields.Boolean( string='Require Thickness Readings on CoC', default=False, tracking=True, help='Aerospace / Nadcap customers expect every CoC to carry ' 'actual Fischerscope readings (not just "meets spec"). When ' 'this is on, action_issue() blocks until at least one ' 'thickness reading has been logged for the MO. Leave off ' 'for commercial customers.', )