[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:
parent
5bb5d20244
commit
f8ef927a9e
5 changed files with 52 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
12
website_sale_aplicoop/models/product_category_extension.py
Normal file
12
website_sale_aplicoop/models/product_category_extension.py
Normal 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue