Odoo Help


How do I change the Sale order line product dropdown width?

Ruben Fortunato
on 10/4/16, 2:20 PM 554 views

I'm trying to change the width of the product dropdown list that appears when when creating a sale order line, but I cannot find how to target element for css. Any clue? Thanks


Hi Ruben, try this

Create an additional field near the product to hold it's space.

Add class to the Many2one field and additional field

Then write style to adjust the width and to hide additional field


<page string="Order Lines">

         //Adjust width
         // hide additional field

        <field name="order_line" mode="tree,kanban" attrs="{'readonly': [('state', 'in', ('done','cancel'))]}">
            <form string="Sales Order Lines">
              <tree string="Sales Order Lines" editable="bottom" decoration-info="invoice_status=='to invoice'">
                <field name="sequence" widget="handle"/>
<!-----------------------------------------Both fields---------------------------------------------->
                <field name="product_id" class="Your-Custom-Class" attrs="{'readonly': ['|', ('qty_invoiced', '&gt;', 0), ('procurement_ids', '!=', [])]}" context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom, 'company_id': parent.company_id}" />
                <field name="name" string="" class="to-be-hidden"/>



About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 10/4/16, 2:20 PM
Seen: 554 times
Last updated: 10/6/16, 3:49 PM