There is a way to change the width of a column in a tree view?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Comptabilité
- Inventaire
- PoS
- Project
- MRP
Cette question a été signalée
You can do that with css. First you need to add your own css stylesheet (check help.openerp.com/question/5783/how-to-add-a-custom-css/ on how to do that)
Then, inside your css, you can select your desired column with css attribute selector (www.w3.org/TR/selectors/#attribute-selectors) just like that:
[data-id="name"] {
width: 200px;
}
Of course, you need to fine-grain your selections.
I don't believe custom css works in tree view. Can anyone confirm this?
tim: got it working?
thanks mate... normal classes didn't work and I was loosing hope that this is even possible.
The answer of Pedro JPG Work in odoo V16
Is Working
After a lot of searching I found a solution...I put it in my comments
After a lot of searching I found a solution... with the width attribute with xpath:
<xpath expr="//field[@name='order_line']/tree/field[@name='product_id']" position="attributes">
<attribute name="width" >170px</attribute>.
</xpath>
What works for me in v14 is doing it like this: style="width: 50px !important;"
But this only works on one2many or many2many field in form view.
thanks
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrirePublications associées | Réponses | Vues | Activité | |
---|---|---|---|---|
|
3
avr. 25
|
4635 | ||
Create dynamic tree view
Résolu
|
|
3
sept. 23
|
9441 | |
|
1
sept. 22
|
3707 | ||
|
1
juin 22
|
12543 | ||
|
3
mars 20
|
11008 |
Have you tried that : <field name="name" width="100"/> with the size you want in width ?
@Felipe, is the issue solved?? I am also facing the same problem here... provide me the detail