Hi, I have been stuck with this for a while now. How can I disable the sort functionality of tree view? Usually when we click on tree view table heading the records get sorted based on the order of that field. I want to prevent that. Is there any way to achieve this? Thanks in Advance.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kirjanpito
- Varastointi
- PoS
- Project
- MRP
Tämä kysymys on merkitty
Hey John Kyte,
I hope you are doing well.
You can prevent the records getting sorted based on the order of that field of tree view by inherit the web.ListRenderer template by disabled events.
Please check code in comment.
Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari
Please find code is here :-
For example:
<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">
<t t-name="custommodule_name.ListRenderer" t-inherit="web.ListRenderer" t-inherit-mode="extension" owl="1">
<xpath expr="//t[@t-foreach='state.columns']//th" position="attributes">
<attribute name="t-on-click"/>
<attribute name="t-on-mouseenter"/>
<attribute name="t-on-mouseleave"/>
<attribute name="t-att-class"/>
</xpath>
</t>
</templates>
FYI: This will disable the records get sort for all the tree view.
Nautitko keskustelusta? Älä vain lue, vaan osallistu!
Luo tili jo tänään nauttiaksesi yksinoikeusominaisuuksista ja osallistuaksesi mahtavaan yhteisöömme!
RekisteröidyAiheeseen liittyviä artikkeleita | Vastaukset | Näkymät | Toimenpide | |
---|---|---|---|---|
|
1
kesäk. 23
|
3471 | ||
|
1
tammik. 24
|
14101 | ||
|
1
huhtik. 25
|
1384 | ||
|
0
jouluk. 23
|
1740 | ||
Odoo App
Ratkaistu
|
|
1
marrask. 23
|
1951 |