Odoo Help


3 Answers

Akhil P Sivan

--Akhil P Sivan--

| 6 4 9
Kochi, India
--Akhil P Sivan--

Odoo Developer

email-id : akhilpsivan01@gmail.com

Akhil P Sivan
10/20/15, 1:48 AM


Yes it is possible. But first you need to bring that to the picking form view. Then you can call it in report.

A many2one field relation is already there called "sale_id", so we just need to add a related field in stock.picking

You may try the following:

1. Inherit stock.picking and add a related field

class stock_picking(models.Model):

client_ref = fields.Char(related="sale_id.client_order_ref", string="Client Description")

2. Call that in picking form view

<record id="view_picking_form_inherited" model="ir.ui.view">
<field name="name">view.picking.form.view.inherited</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_form"/>
<field name="arch" type="xml">
<field name="partner_id" position="after">
<field name="client_ref" />

3. call it in picking report by inheriting the template

<?xml version="1.0" encoding="utf-8"?>
<template id="report_picking_inherited" inherit_id="stock.report_picking">
<xpath expr="//t/div/table[1]/thead/tr/th[1]" position="after">
<th>Client Reference</th>


<xpath expr="//t/div/table[1]/tbody/tr/td[1]" position="after">
<span t-field="o.client_ref"/>

10/21/15, 4:48 PM

Akhil provided a very good and comprehensive example for the form, 

For the PDF report is actually very simple and I found it later here: https://www.odoo.com/forum/help-1/question/solved-how-do-i-add-the-client-order-reference-description-their-po-number-to-a-deliver-order-picking-report-saas-version-82994

1 Comment
Akhil P Sivan
10/21/15, 11:23 PM

Sorry, I thought you want to have that in form view and also in report. And if you make changes from front end, it will be effective only in your current database as you may know.

Ask a Question
Keep Informed
1 follower(s)
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 eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now