This question has been flagged
7 Replies
21897 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

Avatar
Discard

Have add this field successfully.

Best Answer

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.

Avatar
Discard

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?

Best Answer

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.

Avatar
Discard
Best Answer

@Jagadish: how have you achieved this ?

Avatar
Discard
Best Answer

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).

Avatar
Discard
Author

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.