0

I have 13 column in my one2many field and I can't reduce cause of requirement. The problem is my many2one column is very less space. When I remove some column , many2one field take perfect column width.But I can't reduce. How can I do that? I try to write css class for my tree view but not working.In image, I can only see Ac text but the really name is Account. enter image description here

<page string="Yearly Budget">
    <field name="budget_yearly_line">
        <tree string="Yearly" editable="buttom" class="custom_class">
            <field name="account_id"/>
            <field name="jan"/>
            <field name="feb"/>
            <field name="march"/>
            <field name="april"/>
            <field name="may"/>
            <field name="june"/>
            <field name="july"/>
            <field name="auguest"/>
            <field name="sep"/>
            <field name="october"/>
            <field name="november"/>
            <field name="dec"/>
            <field name="amount"/>
        </tree>
    </field>
    <group class="oe_subtotal_footer oe_right">
            <field name="amount_untaxed"/>
        </group>
</page>
Neural
  • 370
  • 1
  • 11
  • 1
    You can force the width of the column header by adding the style inside the form. Odoo define the ``width`` and ``max-width`` attributes. Try `` – Kenly Nov 23 '21 at 15:49
  • @Kenly. I am not clear what you mean.I added my xml code.How can I do that? – Neural Nov 24 '21 at 03:36
  • Try to define the style inside the form tag – Kenly Nov 24 '21 at 08:15
  • @Kenly. I tried but not working – Neural Nov 24 '21 at 09:07
  • The above example is tested on sale order, for example in invoice form view you need to change the selector to `thead tr th:nth-child(2)` and according to your code above you need to select the `first th child`. – Kenly Nov 24 '21 at 12:29
  • 1
    Did you succeed to apply the style – Kenly Nov 26 '21 at 14:52
  • @Kenly. I did it with custom class. I forgot the 'important' that why not working and now work .Thanks for your help – Neural Nov 27 '21 at 07:39

0 Answers0