Files
Odoo-Modules/fusion-woo-odoo/fusion_woocommerce/wizard/woo_variant_push_views.xml
gsinghpal 39e007b42f feat: default variant selector — user picks which variant is the default
Added 'Default' toggle column in variant push wizard. First variant is
pre-selected as default. User can change it. The default variant's
attribute values are set as WC product's default_attributes using
WC attribute IDs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 22:02:29 -04:00

59 lines
2.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="woo_variant_push_wizard_form" model="ir.ui.view">
<field name="name">woo.variant.push.wizard.form</field>
<field name="model">woo.variant.push.wizard</field>
<field name="arch" type="xml">
<form string="Push Variants to WooCommerce">
<sheet>
<field name="instance_id" invisible="1"/>
<field name="product_map_id" invisible="1"/>
<group>
<group>
<field name="product_name" string="Product"/>
<field name="woo_product_id" string="WC Product ID"/>
</group>
<group>
<field name="product_template_id" string="Odoo Template" readonly="1"/>
</group>
</group>
<separator string="Variants to Push"/>
<div class="alert alert-info" role="alert">
Review and edit each variant's pricing, SKU, and image.
New variants will be created, already synced variants will be updated.
Uncheck "Include" to skip a variant.
</div>
<field name="line_ids">
<list editable="bottom">
<field name="include" widget="boolean_toggle"/>
<field name="is_default" string="Default" widget="boolean_toggle" force_save="1"/>
<field name="product_id" column_invisible="1"/>
<field name="variant_name" readonly="1" force_save="1"/>
<field name="attribute_values" readonly="1" force_save="1"/>
<field name="sku"/>
<field name="regular_price" string="Standard Price"/>
<field name="sale_price"/>
<field name="cost_price" readonly="1" force_save="1"/>
<field name="image" widget="image" options="{'size': [48, 48]}"/>
<field name="already_synced" column_invisible="1" force_save="1"/>
<field name="wc_variation_id" column_invisible="1" force_save="1"/>
<field name="map_id" column_invisible="1" force_save="1"/>
</list>
</field>
</sheet>
<footer>
<button name="action_push" type="object"
string="Save &amp; Sync to WooCommerce" class="oe_highlight"
icon="fa-cloud-upload"/>
<button string="Cancel" class="btn-secondary" special="cancel"/>
</footer>
</form>
</field>
</record>
</odoo>