[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
16
website_sale_aplicoop/views/product_category_views.xml
Normal file
16
website_sale_aplicoop/views/product_category_views.xml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="product_category_view_tree_sequence" model="ir.ui.view">
|
||||
<field name="name">product.category.list.sequence</field>
|
||||
<field name="model">product.category</field>
|
||||
<field name="inherit_id" ref="product.product_category_list_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//list" position="attributes">
|
||||
<attribute name="default_order">sequence, name</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//list/field[1]" position="before">
|
||||
<field name="sequence" widget="handle"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Loading…
Add table
Add a link
Reference in a new issue