fix(plating-perms): deploy-time cascade fixes from entech I3

5 fixes discovered during the live deploy to entech LXC 111:

1. pre-migrate.py to rename old configurator's 'Shop Manager' group BEFORE
   new core 'Shop Manager v2' XML loads (cross-module name collision on
   res_groups_name_uniq).

2. res_company_views.xml: dropped ref() inside <field domain=> attribute
   (Odoo 19 view validator interprets it as a field name).

3. sale_order_views.xml: replaced 3 separate xpaths for amount_total /
   amount_untaxed / amount_tax with a single xpath on tax_totals widget
   (Odoo 19 sale.view_order_form uses one widget instead of separate fields).

4. fp_cert_security.xml: certificate_type field, not cert_type. FAIR is a
   separate model so the rule only restricts cert_type='nadcap_cert' now.

5. fp_certificate_views.xml + fp_capa_views.xml + fp_customer_spec_views.xml:
   stripped user_has_groups() from invisible= / readonly= attrs (Odoo 19
   view validator interprets as field name). Model-layer ACLs and ir.rules
   already enforce the same restrictions.

Also fixed res.groups.users -> user_ids in fp_migration.py (Odoo 19 rename,
caught when manually invoking _fp_notify_owners post-deploy).

CLAUDE.md updated with 4 new rules (13e cross-module name collisions,
13f ref() in domain, 13g tax_totals widget, 13h user_has_groups in attrs).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsinghpal
2026-05-24 09:07:13 -04:00
parent 0047f49d2c
commit 7bcbcb4008
9 changed files with 120 additions and 48 deletions

View File

@@ -74,41 +74,41 @@
<group>
<group>
<field name="type"
readonly="not user_has_groups('fusion_plating.group_fp_quality_manager')"/>
/>
<field name="ncr_id"
readonly="not user_has_groups('fusion_plating.group_fp_quality_manager')"/>
/>
<field name="facility_id" readonly="1"/>
<field name="owner_id"
readonly="not user_has_groups('fusion_plating.group_fp_quality_manager')"/>
/>
</group>
<group>
<field name="due_date"
readonly="not user_has_groups('fusion_plating.group_fp_quality_manager')"/>
/>
<field name="is_overdue" readonly="1"/>
<field name="verification_date"
readonly="not user_has_groups('fusion_plating.group_fp_quality_manager')"/>
/>
<field name="verification_by_id"
readonly="not user_has_groups('fusion_plating.group_fp_quality_manager')"/>
/>
<field name="is_effective" readonly="1"/>
</group>
</group>
<notebook>
<page string="Description">
<field name="description"
readonly="not user_has_groups('fusion_plating.group_fp_quality_manager')"/>
/>
</page>
<page string="Root Cause Analysis">
<field name="root_cause_analysis"
placeholder="5 Whys, fishbone, or any other structured method."
readonly="not user_has_groups('fusion_plating.group_fp_quality_manager')"/>
/>
</page>
<page string="Action Plan">
<field name="action_plan"
readonly="not user_has_groups('fusion_plating.group_fp_quality_manager')"/>
/>
</page>
<page string="Effectiveness">
<field name="effectiveness_notes"
readonly="not user_has_groups('fusion_plating.group_fp_quality_manager')"/>
/>
</page>
</notebook>
</sheet>

View File

@@ -38,43 +38,43 @@
stays visible — only inputs lock for non-QM. -->
<label for="name"/>
<h1><field name="name"
readonly="not user_has_groups('fusion_plating.group_fp_quality_manager')"/></h1>
/></h1>
</div>
<group>
<group>
<field name="code"
readonly="not user_has_groups('fusion_plating.group_fp_quality_manager')"/>
/>
<field name="revision"
readonly="not user_has_groups('fusion_plating.group_fp_quality_manager')"/>
/>
<field name="spec_type"
readonly="not user_has_groups('fusion_plating.group_fp_quality_manager')"/>
/>
<field name="partner_id"
readonly="not user_has_groups('fusion_plating.group_fp_quality_manager')"/>
/>
</group>
<group>
<field name="effective_date"
readonly="not user_has_groups('fusion_plating.group_fp_quality_manager')"/>
/>
<field name="document_url" widget="url"
readonly="not user_has_groups('fusion_plating.group_fp_quality_manager')"/>
/>
</group>
</group>
<group string="Applicable Processes" name="applicable_processes">
<field name="process_type_ids" widget="many2many_tags" nolabel="1"
readonly="not user_has_groups('fusion_plating.group_fp_quality_manager')"/>
/>
</group>
<group string="Applicable Recipes" name="applicable_recipes">
<field name="recipe_ids" widget="many2many_tags" nolabel="1"
options="{'no_create_edit': True}"
readonly="not user_has_groups('fusion_plating.group_fp_quality_manager')"/>
/>
</group>
<group>
<field name="print_on_cert"
readonly="not user_has_groups('fusion_plating.group_fp_quality_manager')"/>
/>
</group>
<notebook>
<page string="Notes">
<field name="notes"
readonly="not user_has_groups('fusion_plating.group_fp_quality_manager')"/>
/>
</page>
</notebook>
</sheet>