Per-company default for which editor opens for new recipes / recipes with preferred_editor=auto. Defaults to 'tree' to preserve existing behavior. Surfaces in Settings → Fusion Plating → Recipe Editor. Naming follows the existing x_fc_* convention used throughout res_company.py for company-level Fusion Plating defaults. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
65 lines
2.3 KiB
Python
65 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 ResConfigSettings(models.TransientModel):
|
|
"""Expose Fusion Plating company-level settings on the Settings page.
|
|
|
|
Today this only carries the default timezone, but it's the single
|
|
place to add new shop-wide preferences (default facility, currency
|
|
overrides, etc.).
|
|
"""
|
|
_inherit = 'res.config.settings'
|
|
|
|
x_fc_default_tz = fields.Selection(
|
|
related='company_id.x_fc_default_tz',
|
|
readonly=False,
|
|
string='Fusion Plating Timezone',
|
|
)
|
|
x_fc_default_mastery_threshold = fields.Integer(
|
|
related='company_id.x_fc_default_mastery_threshold',
|
|
readonly=False,
|
|
string='Default Mastery Threshold',
|
|
)
|
|
|
|
# ----- Unit-of-measure defaults --------------------------------------
|
|
x_fc_default_temp_uom = fields.Selection(
|
|
related='company_id.x_fc_default_temp_uom',
|
|
readonly=False, string='Temperature Unit',
|
|
)
|
|
x_fc_default_thickness_uom = fields.Selection(
|
|
related='company_id.x_fc_default_thickness_uom',
|
|
readonly=False, string='Thickness Unit',
|
|
)
|
|
x_fc_default_volume_uom = fields.Selection(
|
|
related='company_id.x_fc_default_volume_uom',
|
|
readonly=False, string='Volume Unit',
|
|
)
|
|
x_fc_default_mass_uom = fields.Selection(
|
|
related='company_id.x_fc_default_mass_uom',
|
|
readonly=False, string='Mass Unit',
|
|
)
|
|
x_fc_default_pressure_uom = fields.Selection(
|
|
related='company_id.x_fc_default_pressure_uom',
|
|
readonly=False, string='Pressure Unit',
|
|
)
|
|
x_fc_default_current_density_uom = fields.Selection(
|
|
related='company_id.x_fc_default_current_density_uom',
|
|
readonly=False, string='Current Density Unit',
|
|
)
|
|
x_fc_default_area_uom = fields.Selection(
|
|
related='company_id.x_fc_default_area_uom',
|
|
readonly=False, string='Area Unit',
|
|
)
|
|
|
|
# ----- Sub 12a — recipe editor default ------------------------------
|
|
x_fc_default_recipe_editor = fields.Selection(
|
|
related='company_id.x_fc_default_recipe_editor',
|
|
readonly=False,
|
|
string='Default Recipe Editor',
|
|
)
|