fix: remove deprecated attrs/states attributes for Odoo 19 compatibility
Converted all attrs= expressions to inline invisible/readonly attributes in wizard XML views (woo_product_fetch_views.xml, woo_setup_wizard_views.xml). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -7,13 +7,15 @@
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='picking_move_tree']" position="before">
|
||||
<group string="WooCommerce Shipping" invisible="not is_woo_delivery">
|
||||
<xpath expr="//page[@name='extra']" position="after">
|
||||
<page string="WooCommerce" name="woo_shipping" invisible="not is_woo_delivery">
|
||||
<group>
|
||||
<field name="woo_tracking_number"/>
|
||||
<field name="woo_carrier_id"/>
|
||||
<group string="Shipping Details">
|
||||
<field name="woo_tracking_number"/>
|
||||
<field name="woo_carrier_id"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="instance_id"
|
||||
attrs="{'readonly': [('state', '!=', 'draft')]}"/>
|
||||
readonly="state != 'draft'"/>
|
||||
<field name="state" readonly="1"/>
|
||||
</group>
|
||||
|
||||
<group string="Results"
|
||||
attrs="{'invisible': [('state', '=', 'draft')]}">
|
||||
invisible="state == 'draft'">
|
||||
<group>
|
||||
<field name="total_fetched"/>
|
||||
<field name="auto_matched"/>
|
||||
@@ -26,12 +26,12 @@
|
||||
</group>
|
||||
|
||||
<div class="alert alert-info" role="alert"
|
||||
attrs="{'invisible': [('state', '!=', 'draft')]}">
|
||||
invisible="state != 'draft'">
|
||||
Select a WooCommerce instance and click Fetch Products. All products and variations will be imported and matched to Odoo products by SKU or name similarity.
|
||||
</div>
|
||||
|
||||
<div class="alert alert-success" role="alert"
|
||||
attrs="{'invisible': [('state', '!=', 'done')]}">
|
||||
invisible="state != 'done'">
|
||||
Fetch complete! Review the product mapping to confirm or adjust suggestions.
|
||||
</div>
|
||||
</sheet>
|
||||
@@ -40,11 +40,11 @@
|
||||
<button type="object" name="action_fetch"
|
||||
string="Fetch Products"
|
||||
class="btn-primary"
|
||||
attrs="{'invisible': [('state', '!=', 'draft')]}"/>
|
||||
invisible="state != 'draft'"/>
|
||||
<button type="object" name="action_open_mapping"
|
||||
string="Open Product Mapping"
|
||||
class="btn-primary"
|
||||
attrs="{'invisible': [('state', '!=', 'done')]}"/>
|
||||
invisible="state != 'done'"/>
|
||||
<button string="Close" class="btn-secondary" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
|
||||
@@ -11,41 +11,41 @@
|
||||
<div class="o_statusbar_status mb-3">
|
||||
<button type="object" name="action_back"
|
||||
class="btn btn-secondary me-1"
|
||||
attrs="{'invisible': [('step', '=', 'connection')]}">
|
||||
invisible="step == 'connection'">
|
||||
← Back
|
||||
</button>
|
||||
<span class="badge bg-primary me-1"
|
||||
attrs="{'invisible': [('step', '!=', 'connection')]}">
|
||||
invisible="step != 'connection'">
|
||||
Step 1: Connection
|
||||
</span>
|
||||
<span class="badge bg-secondary me-1"
|
||||
attrs="{'invisible': [('step', '=', 'connection')]}">
|
||||
invisible="step == 'connection'">
|
||||
Step 1: Connection ✓
|
||||
</span>
|
||||
<span class="badge bg-primary me-1"
|
||||
attrs="{'invisible': [('step', '!=', 'config')]}">
|
||||
invisible="step != 'config'">
|
||||
Step 2: Configuration
|
||||
</span>
|
||||
<span class="badge bg-secondary me-1"
|
||||
attrs="{'invisible': [('step', 'in', ('connection', 'config'))]}">
|
||||
invisible="step in ('connection', 'config')">
|
||||
Step 2: Configuration ✓
|
||||
</span>
|
||||
<span class="badge bg-muted me-1"
|
||||
attrs="{'invisible': [('step', 'in', ('config', 'done'))]}">
|
||||
invisible="step in ('config', 'done')">
|
||||
Step 2: Configuration
|
||||
</span>
|
||||
<span class="badge bg-primary me-1"
|
||||
attrs="{'invisible': [('step', '!=', 'done')]}">
|
||||
invisible="step != 'done'">
|
||||
Step 3: Done
|
||||
</span>
|
||||
<span class="badge bg-muted me-1"
|
||||
attrs="{'invisible': [('step', '=', 'done')]}">
|
||||
invisible="step == 'done'">
|
||||
Step 3: Done
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Step 1: Connection -->
|
||||
<group attrs="{'invisible': [('step', '!=', 'connection')]}">
|
||||
<group invisible="step != 'connection'">
|
||||
<group string="WooCommerce Connection">
|
||||
<field name="name" placeholder="e.g. My WooCommerce Store"/>
|
||||
<field name="url" placeholder="https://mystore.com"/>
|
||||
@@ -54,11 +54,11 @@
|
||||
</group>
|
||||
<group>
|
||||
<div class="alert alert-info" role="alert"
|
||||
attrs="{'invisible': [('connection_tested', '=', True)]}">
|
||||
invisible="connection_tested == True">
|
||||
Enter your WooCommerce store URL and REST API credentials, then test the connection.
|
||||
</div>
|
||||
<div class="alert alert-success" role="alert"
|
||||
attrs="{'invisible': [('connection_tested', '=', False)]}">
|
||||
invisible="connection_tested == False">
|
||||
Connection successful! Click Next to continue.
|
||||
</div>
|
||||
<field name="connection_tested" invisible="1"/>
|
||||
@@ -67,7 +67,7 @@
|
||||
</group>
|
||||
|
||||
<!-- Step 2: Configuration -->
|
||||
<group attrs="{'invisible': [('step', '!=', 'config')]}">
|
||||
<group invisible="step != 'config'">
|
||||
<group string="Sync Configuration">
|
||||
<field name="default_warehouse_id"/>
|
||||
<field name="sync_interval"/>
|
||||
@@ -75,7 +75,7 @@
|
||||
</group>
|
||||
|
||||
<!-- Step 3: Done -->
|
||||
<group attrs="{'invisible': [('step', '!=', 'done')]}">
|
||||
<group invisible="step != 'done'">
|
||||
<group string="Setup Complete">
|
||||
<div class="alert alert-success" role="alert">
|
||||
<strong>Your WooCommerce instance has been created successfully!</strong>
|
||||
@@ -92,27 +92,27 @@
|
||||
<button type="object" name="action_test_connection"
|
||||
string="Test Connection"
|
||||
class="btn-primary"
|
||||
attrs="{'invisible': [('step', '!=', 'connection')]}"/>
|
||||
invisible="step != 'connection'"/>
|
||||
<button type="object" name="action_next_step"
|
||||
string="Next"
|
||||
class="btn-primary"
|
||||
attrs="{'invisible': [('step', '!=', 'connection')]}"/>
|
||||
invisible="step != 'connection'"/>
|
||||
|
||||
<!-- Config step buttons -->
|
||||
<button type="object" name="action_complete"
|
||||
string="Complete Setup"
|
||||
class="btn-primary"
|
||||
attrs="{'invisible': [('step', '!=', 'config')]}"/>
|
||||
invisible="step != 'config'"/>
|
||||
|
||||
<!-- Done step buttons -->
|
||||
<button type="object" name="action_fetch_products"
|
||||
string="Fetch Products"
|
||||
class="btn-primary"
|
||||
attrs="{'invisible': [('step', '!=', 'done')]}"/>
|
||||
invisible="step != 'done'"/>
|
||||
<button type="object" name="action_open_instance"
|
||||
string="Open Instance"
|
||||
class="btn-secondary"
|
||||
attrs="{'invisible': [('step', '!=', 'done')]}"/>
|
||||
invisible="step != 'done'"/>
|
||||
|
||||
<button string="Close" class="btn-secondary" special="cancel"/>
|
||||
</footer>
|
||||
|
||||
Reference in New Issue
Block a user