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>
This commit is contained in:
gsinghpal
2026-04-01 22:02:29 -04:00
parent 8c01deb2e3
commit 39e007b42f
2 changed files with 18 additions and 8 deletions

View File

@@ -30,6 +30,7 @@
<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"/>