feat(configurator): drop legacy description column after dual-field migration (Sub 2 Task 27)
Removes the `description` field from `fp.sale.description.template` now that all readers (reports, wizard, sale line) consume the new `internal_description` + `customer_facing_description` pair. - Model: drop `description = fields.Text(...)` declaration - Migration 19.0.9.0.0 Step 6: `ALTER TABLE ... DROP COLUMN IF EXISTS description` - Template form/search views: swap `description` for the two new fields - Seed data: write new fields instead of legacy column (dupes old text into both) - Direct-order wizard: remove `tpl.description` fallback in both onchange handlers Entech column dropped via Odoo's auto-schema-sync during module upgrade (migration step is for fresh installs). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -72,4 +72,13 @@ def migrate(cr, version):
|
||||
cr.rowcount,
|
||||
)
|
||||
|
||||
# Step 6: Drop legacy description column (all reads migrated to new fields).
|
||||
# Runs after Steps 3 duplicated data into internal_description +
|
||||
# customer_facing_description. Idempotent via IF EXISTS.
|
||||
cr.execute("""
|
||||
ALTER TABLE fp_sale_description_template
|
||||
DROP COLUMN IF EXISTS description
|
||||
""")
|
||||
_logger.info("Sub 2: dropped legacy description column")
|
||||
|
||||
_logger.info("Sub 2: migration complete")
|
||||
|
||||
Reference in New Issue
Block a user