feat(sub12a): res.company.x_fc_default_recipe_editor setting

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>
This commit is contained in:
gsinghpal
2026-04-27 20:34:12 -04:00
parent 91681d722e
commit 95debabc28
3 changed files with 29 additions and 0 deletions

View File

@@ -161,3 +161,15 @@ class ResCompany(models.Model):
string='CGP Registered',
help='Show the Controlled Goods Program logo on certificates.',
)
# =====================================================================
# Sub 12a — Default recipe editor
# =====================================================================
x_fc_default_recipe_editor = fields.Selection(
[('tree', 'Tree Editor'), ('simple', 'Simple Editor')],
string='Default Recipe Editor',
default='tree',
help='Which editor opens when a new recipe is created OR when a '
'recipe with preferred_editor=auto is selected. Per-recipe '
'preferred_editor (tree/simple) overrides this.',
)

View File

@@ -55,3 +55,10 @@ class ResConfigSettings(models.TransientModel):
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',
)