[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

@ -1,7 +1,9 @@
from . import group_order
from . import product_extension
from . import res_config_settings
from . import res_partner_extension
from . import sale_order_extension
from . import stock_picking_extension
from . import js_translations
from . import group_order # noqa: F401
from . import group_order_slot # noqa: F401
from . import product_category_extension # noqa: F401
from . import product_extension # noqa: F401
from . import res_config_settings # noqa: F401
from . import res_partner_extension # noqa: F401
from . import sale_order_extension # noqa: F401
from . import stock_picking_extension # noqa: F401
from . import js_translations # noqa: F401

View file

@ -0,0 +1,12 @@
# Copyright 2026 Criptomart
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields
from odoo import models
class ProductCategory(models.Model):
_inherit = "product.category"
_order = "sequence, name"
sequence = fields.Integer(default=10)