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.

1

Show Delivery Orders on the Customer record

By
Ray Carnes
on 12/19/13, 7:06 PM 1,340 views

Can the list of Delivery Orders for each Customer (both waiting and done) be shown on the Customer form view?

2

Ray Carnes

--Ray Carnes--
15717
| 9 7 9
Greater Los Angeles, United States
--Ray Carnes--

Senior Odoo Analyst

OpenERP 6.1, 7.0 and Odoo 8.0, 9.0 (Since 2012)

Completed Functional and Technical Training.

Major Skills:

  • Needs Discovery and Requirements Analysis;

  • Function and Technical Specifications;

  • Project Planning;

  • Prototyping and Proof of concepts;

  • Data migration;

  • Configuration & Customization (UI and modules);

  • Integration - data, business logic and service levels;

  • Training and Knowledge transfer;

  • Go Live support;

  • Help desk;

  • Version Migration.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

Ray Carnes
On 12/19/13, 7:21 PM

It is possible, and I have been asked for this customization many times.

While it might seem acceptable to add a tab to the Customer form view and list the Delivery Orders there, OpenERP has moved away from having 1 to many relationshiops shown this way (prefering a full screen to show lists of items because full search, filtering, grouping and sorting capabilities are supported).

A good approach is to create a new Window Action to define the list view, and add a button to the Form view.

Something like:

<record id="action_customer_deliveries" model="ir.actions.act_window">
  <field name="name">Delivery Orders</field>
  <field name="res_model">stock.picking.out</field>
  <field name="type">ir.actions.act_window</field>
  <field name="view_type">form</field>
  <field name="view_mode">tree,form,calendar</field>
  <field name="domain">[('type','=','out')]</field>
  <field name="context">{'search_default_partner_id': active_id}</field>
  <field name="search_view_id" ref="stock.view_picking_out_search"/>
  <field name="help" type="html">
    <p class="oe_view_nocontent_create">
     Click to create a delivery order. 
    </p>
    <p>
     This is the list of all delivery orders that have to be
     prepared, according to your different sales orders and your
     logistics rules.
    </p>
  </field>
</record>

<record model="ir.ui.view" id="res_partner_view_buttons2">
  <field name="name">res.partner.view.buttons2</field>
  <field name="model">res.partner</field>
  <field name="inherit_id" ref="base.view_partner_form" />
  <field name="arch" type="xml">
    <xpath expr="//div[@name='buttons']" position="inside">
      <button type="action" string="Delivery Orders" 
           attrs="{'invisible': [('customer', '=', False)]}" 
           name="%(module_name.action_partner_deliveries)d" 
           context="{'search_default_partner_id': active_id}"/> 
    </xpath>
  </field>
</record>

This shows up as a button like this:

image description

Which when clicked, shows all orders for that Customer:

image description

Is there a module to implement this in v7?

Gilles Lehoux
on 1/31/14, 6:43 PM

Please email me and I will share it - it will take a few more weeks to get it up in the Apps store. rcarnes at ursainfosystems.com

Bista Solutions US, Ray Carnes
on 2/10/14, 4:07 PM

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

1 follower(s)

Stats

Asked: 12/19/13, 7:06 PM
Seen: 1340 times
Last updated: 3/16/15, 8:10 AM