Odoo Help


Openerp: How to show new field in Delivery Orders

M. Carmo Leal
on 5/15/14, 8:01 AM 1,577 views

I've added new fields in stock.picking and would like them to appear in the form view as a new page in the Delivery Orders notebook.

I think I'm having trouble because the model used in the Delivery Orders is stock.picking.out, which inherits stock.picking.

As far as I can see, the form view used is stock.view_picking_out_form, which inherits stock.view_picking_form.

I've tried many things in OpenERP 7 and none of them worked.

In version 6.1 it was working like this...


class stock_picking(osv.osv):
    _inherit = "stock.picking"
    _columns = {
        'hash':       fields.char('Assinatura', size=200),
        'hash_control': fields.char('Chave', size=40),
        'system_entry_date':   fields.datetime('Data de confirmação'),
        'write_date':   fields.datetime('Data de alteração'),
        'hashcode': fields.char('Assinatura do Documento', size=5),
        'doc_guia': fields.boolean('Este documento é do tipo Guia?',
                help='Se o documento for do tipo Guia (e.g.: Guia de Transporte, Guia de Remessa, etc) assinale este campo.'),
        'journal_id': fields.many2one('account.journal', 'Tipo de Guia', domain=[('type', '=', 'guia')], readonly=True),
        'guia_number': fields.char('Número da Guia', size=40, readonly=True),
        'at_code': fields.char('Nº Autorização AT', size=200, readonly=True),
        'data_hora_inicio': fields.datetime('Data/Hora Inicio'),
        'data_hora_fim': fields.datetime('Data/Hora Fim'),
        'at_reject': fields.char('Motivo de Rejeição', size=200, readonly=True),
        'tipo_biling': fields.selection([('P', 'Documento criado nesta aplicação'),
                                           ('I', 'Documento criado noutra aplicação e integrada nesta aplicação'),
                                           ('M', 'Documento proveniente de um documento manual')],
                                          "Origem do Documento", readonly=True),
        'nota_breve': fields.char('Referência', size=128),



<record model="ir.ui.view" id="stock_picking_saft_inherit">
            <field name="name">stock.picking.saft.inherit</field>
            <field name="model">stock.picking</field>
            <field name="inherit_id" ref="stock.view_picking_out_form"/>
            <field name="arch" type="xml">
                   <field name="backorder_id" position="after">
                    <group col="6" fill="1" colspan="6">
                        <separator colspan="6" string="Dados da Guia"/>
                          <field name="journal_id" colspan="3"/>
                           <field name="guia_number" colspan="3"/>
                          <field name="data_entrega" colspan="3"/>
                          <field name="matricula_id" colspan="3"/>
                          <field name="local_carga" colspan="3"/>
                          <field name="tipo_biling" colspan="3"/>
                          <field name="doc_guia" invisible="True"/>
                          <field name="nota_breve" colspan="6"/>
                          <separator colspan="6" string="Comunicação AT"/>
                          <field name="at_code" colspan="6"/>
                           <field name="at_reject" colspan="6"/>
                   <tree string="Stock Moves" position="inside">
                     <field name="name" />
                <form string="Stock Moves" position="inside" >
                    <separator colspan="8" string="Descrição do Produto"/>
                    <field name="name" />


Can anyone help?


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 E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 5/15/14, 8:01 AM
Seen: 1577 times
Last updated: 3/16/15, 8:10 AM