[IMP] website_sale_aplicoop: add sequence field to product.category for web ordering

- Add sequence field (default 10) to product.category with _order = "sequence, name"
- Inherit product.category tree view to add drag-handle widget
- Sort category hierarchy and available categories by sequence in controller
- Migration 18.0.1.9.0: add sequence column to product_category table
- Bump version to 18.0.1.9.0
This commit is contained in:
snt 2026-05-20 12:50:28 +02:00 committed by GitHub Copilot
parent 5bb5d20244
commit f8ef927a9e
5 changed files with 52 additions and 8 deletions

View file

@ -0,0 +1,13 @@
"""Add sequence field to product.category.
Ensures the sequence column exists with a default of 10 for all existing rows.
The ORM will also handle this on upgrade, but we add it explicitly so the
column is present before any post-install logic runs.
"""
def migrate(cr, version):
cr.execute("""
ALTER TABLE product_category
ADD COLUMN IF NOT EXISTS sequence INTEGER NOT NULL DEFAULT 10;
""")