feat: customizable portal gradient theme + LTC repair form fixes
- Add portal gradient branding settings with 4 presets (Green/Teal, Blue/Purple, Sunset Orange, Dark Slate) and custom color picker - Live preview in settings, onchange updates colors reactively - Dynamic gradient applied across portal home, CSS, and card elements - Fix after photos visibility (conditional on resolved=yes) - Fix technician section gating on portal repair form - Move Create Sale Order button to form header for visibility - Fix portal home row width inconsistency (xpath target change) Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -10,6 +10,9 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Repair Request">
|
||||
<header>
|
||||
<button name="action_create_sale_order" type="object"
|
||||
string="Create Sale Order" class="btn-primary"
|
||||
invisible="sale_order_id"/>
|
||||
<field name="stage_id" widget="statusbar"
|
||||
options="{'clickable': '1'}"/>
|
||||
</header>
|
||||
@@ -98,9 +101,6 @@
|
||||
<field name="repair_value"/>
|
||||
</group>
|
||||
</group>
|
||||
<button name="action_create_sale_order" type="object"
|
||||
string="Create Sale Order" class="btn-primary"
|
||||
invisible="sale_order_id"/>
|
||||
</page>
|
||||
|
||||
<page string="Photos & Notes" name="photos">
|
||||
|
||||
@@ -519,6 +519,67 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ===== PORTAL BRANDING ===== -->
|
||||
<h2>Portal Branding</h2>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-12 o_setting_box">
|
||||
<div class="o_setting_right_pane">
|
||||
<span class="o_form_label">Portal Gradient Theme</span>
|
||||
<div class="text-muted mb-3">
|
||||
Choose a preset gradient or customize your own colors for the portal dashboard.
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<field name="fc_portal_gradient_preset" widget="radio"/>
|
||||
</div>
|
||||
|
||||
<div class="d-flex flex-wrap gap-2 mb-3">
|
||||
<button type="object" name="action_set_gradient_green_teal"
|
||||
class="btn btn-sm btn-outline-secondary d-flex align-items-center gap-2">
|
||||
<span style="display:inline-block;width:20px;height:20px;border-radius:4px;background:linear-gradient(135deg,#5ba848 0%,#3a8fb7 60%,#2e7aad 100%);"/>
|
||||
Green to Teal
|
||||
</button>
|
||||
<button type="object" name="action_set_gradient_blue_purple"
|
||||
class="btn btn-sm btn-outline-secondary d-flex align-items-center gap-2">
|
||||
<span style="display:inline-block;width:20px;height:20px;border-radius:4px;background:linear-gradient(135deg,#4a90d9 0%,#7b68ee 60%,#6a5acd 100%);"/>
|
||||
Blue to Purple
|
||||
</button>
|
||||
<button type="object" name="action_set_gradient_orange_red"
|
||||
class="btn btn-sm btn-outline-secondary d-flex align-items-center gap-2">
|
||||
<span style="display:inline-block;width:20px;height:20px;border-radius:4px;background:linear-gradient(135deg,#f7971e 0%,#e44d26 60%,#c0392b 100%);"/>
|
||||
Sunset Orange
|
||||
</button>
|
||||
<button type="object" name="action_set_gradient_dark_slate"
|
||||
class="btn btn-sm btn-outline-secondary d-flex align-items-center gap-2">
|
||||
<span style="display:inline-block;width:20px;height:20px;border-radius:4px;background:linear-gradient(135deg,#2c3e50 0%,#4a6274 60%,#34495e 100%);"/>
|
||||
Dark Slate
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3" invisible="fc_portal_gradient_preset != 'custom'">
|
||||
<div class="col-md-4">
|
||||
<span class="o_form_label">Start Color</span>
|
||||
<field name="fc_portal_gradient_start" widget="color"/>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<span class="o_form_label">Mid Color</span>
|
||||
<field name="fc_portal_gradient_mid" widget="color"/>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<span class="o_form_label">End Color</span>
|
||||
<field name="fc_portal_gradient_end" widget="color"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-2">
|
||||
<span class="o_form_label">Preview</span>
|
||||
<div class="text-muted small">Preview updates after saving settings.</div>
|
||||
</div>
|
||||
<field name="fc_portal_gradient_preview" widget="html" readonly="1" class="border-0"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Hidden fields for field mappings (still needed for ir.config_parameter storage) -->
|
||||
<div class="d-none">
|
||||
<field name="fc_field_sale_type"/>
|
||||
|
||||
Reference in New Issue
Block a user