feat(plating): Sub 4 — smart button on part form for Contract Review
Adds a "Contract Review" stat button to fp.part.catalog's button box. Shows a coloured state badge (green=complete, blue=manager_review, yellow=assistant_review, muted=dismissed, em-dash when none). Click routes through action_start_contract_review so it opens the existing review or lazy-creates one — same behaviour as the banner / tab. fusion_plating_quality → 19.0.2.2.0 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Fusion Plating — Quality (QMS)',
|
'name': 'Fusion Plating — Quality (QMS)',
|
||||||
'version': '19.0.2.1.0',
|
'version': '19.0.2.2.0',
|
||||||
'category': 'Manufacturing/Plating',
|
'category': 'Manufacturing/Plating',
|
||||||
'summary': 'Native QMS for plating shops: NCR, CAPA, calibration, AVL, FAIR, '
|
'summary': 'Native QMS for plating shops: NCR, CAPA, calibration, AVL, FAIR, '
|
||||||
'internal audits, customer specs, document control. CE + EE compatible.',
|
'internal audits, customer specs, document control. CE + EE compatible.',
|
||||||
|
|||||||
@@ -13,6 +13,30 @@
|
|||||||
<field name="inherit_id" ref="fusion_plating_configurator.view_fp_part_catalog_form"/>
|
<field name="inherit_id" ref="fusion_plating_configurator.view_fp_part_catalog_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
|
|
||||||
|
<!-- ===== Smart button — Contract Review ===== -->
|
||||||
|
<xpath expr="//div[@name='button_box']" position="inside">
|
||||||
|
<button name="action_start_contract_review"
|
||||||
|
type="object"
|
||||||
|
class="oe_stat_button"
|
||||||
|
icon="fa-check-square-o">
|
||||||
|
<div class="o_stat_info">
|
||||||
|
<span class="o_stat_value"
|
||||||
|
invisible="x_fc_contract_review_id">
|
||||||
|
—
|
||||||
|
</span>
|
||||||
|
<field name="x_fc_contract_review_state"
|
||||||
|
widget="badge"
|
||||||
|
class="o_stat_value"
|
||||||
|
decoration-success="x_fc_contract_review_state == 'complete'"
|
||||||
|
decoration-info="x_fc_contract_review_state == 'manager_review'"
|
||||||
|
decoration-warning="x_fc_contract_review_state == 'assistant_review'"
|
||||||
|
decoration-muted="x_fc_contract_review_state == 'dismissed'"
|
||||||
|
invisible="not x_fc_contract_review_id"/>
|
||||||
|
<span class="o_stat_text">Contract Review</span>
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
</xpath>
|
||||||
|
|
||||||
<!-- ===== Reminder banner above the title block ===== -->
|
<!-- ===== Reminder banner above the title block ===== -->
|
||||||
<xpath expr="//div[hasclass('oe_title')]" position="before">
|
<xpath expr="//div[hasclass('oe_title')]" position="before">
|
||||||
<field name="x_fc_contract_review_banner_visible" invisible="1"/>
|
<field name="x_fc_contract_review_banner_visible" invisible="1"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user