Odoo Help

Welcome!

This community 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.

0

How to add a column to SO list views

By
janu
on 2/21/13, 4:45 AM 7,406 views

Hi,

Our delivery to Customer need CUSTOMER REFERENCE as reference no. I want to add the column Customer Reference on :

  1. SO List View
  2. DO List view and Form View
  3. Delivery Slip How to do that ?

I want to add Vehicle (Truck) No to Delivery Slip, how to do that ?

Thanks

Have add this field successfully.

Jagdish Panchal
on 4/16/14, 5:49 AM
0
Trevor Wilson
On 7/13/13, 6:11 AM

Hi. Eventually worked out how to do this: I think you need permission for the 'technical features'. You give this option to yourself under settings > users > usability > then tick technical features.

Go to settings > user interface > views Select the relevant view. For me it was sequence 2, sale order tree. Then edit the architecture to:

<?xml version="1.0"?>
<tree string="Sales Orders" fonts="bold:message_unread==True" colors="grey:state=='cancel';blue:state in ('waiting_date','manual');red:state in ('invoice_except','shipping_except')">
                    <field name="message_unread" invisible="1"/>
                    <field name="name" string="Order Number"/>
                    <field name="date_order"/>
                    <field name="client_order_ref"/>
                    <field name="partner_id"/>
                    <field name="user_id"/>
                    <field name="amount_total" sum="Total Tax Included"/>
                    <field name="state"/>
                </tree>

Basically that's adding <field name="client_order_ref"/> wherever you want the column.

0
Laurens
On 4/26/13, 8:26 AM

Actually if you just have to add one field, I find it way less complicated to just edit the original xml files. For instance, if you want to add the reference field to the list view of the sale orders: just edit sale_view.xml under the sale module (Openerp/server/server/openerp/addons/sale) and add your field.

Example:

            <tree string="Sales Orders" fonts="bold:message_unread==True" colors="grey:state=='cancel';blue:state in ('waiting_date','manual');red:state in ('invoice_except','shipping_except')">
                <field name="message_unread" invisible="1"/>
                <field name="name" string="Order Number"/>
                <field name="date_order"/>
                <field name="partner_id"/>
                <field name="user_id"/>
                <field name="client_order_ref"/>
                <field name="amount_total" sum="Total Tax Included"/>
                <field name="state"/>
            </tree>
        </field>
    </record>

    <record id="view_quotation_tree" model="ir.ui.view">
        <field name="name">sale.order.tree</field>
        <field name="model">sale.order</field>
        <field name="priority">4</field>
        <field name="arch" type="xml">
            <tree string="Quotation" fonts="bold:message_unread==True" colors="grey:state=='cancel';blue:state in ('waiting_date','manual');red:state in ('invoice_except','shipping_except')">
                <field name="message_unread" invisible="1"/>
                <field name="name" string="Quotation Number"/>
                <field name="date_order"/>
                <field name="partner_id"/>
                <field name="user_id"/>
                <field name="client_order_ref"/>
                <field name="amount_total" sum="Total Tax Included"/>
                <field name="state"/>

If you take this approach for the list view, adding "<field name="client_order_ref"/>" in between the existing fields will be sufficient. No other parameters have to be adjusted.

Hi. Thank you Laurens - your answer is exactly what I'm trying to do... however I'm not having any joy! I'm using ERP7, and I'm finding the sale_view.xml file in /usr/lib/pymodules/python2.6/openerp/addons/sale ... when I make your changes, I get exactly the same Sales Order list view. Any ideas?

Trevor Wilson
on 7/10/13, 4:00 PM
0
Angela
On 2/21/13, 5:01 AM

You have to create an extension module and inherit the views in order to add "customer reference" to them (alternatly you can go into settings/parameters/user interface/views" and do the changes there... but a module is better in my opinion).

Hi Angela, I used openerp 7, I try to find setting/paramenters/user...... But I cannot find that menu, please could you tell more detail.

janu
on 2/28/13, 12:37 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 2/21/13, 4:45 AM
Seen: 7406 times
Last updated: 3/16/15, 8:10 AM