Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
7 Trả lời
23984 Lượt xem

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

Ảnh đại diện
Huỷ bỏ

Have add this field successfully.

Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ

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?

Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

@Jagadish: how have you achieved this ?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Tác giả

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.

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 5 16
3528
3
thg 8 25
238
4
thg 8 25
1448
Block sale. Đã xử lý
3
thg 8 25
455
2
thg 8 25
523