Odoo Help


Custom module value of field stays zero

on 8/4/14, 1:46 PM 981 views

I made this custom module for an extra field in the delivery order. Only the value flips back to 0 once you save the form. However I checked the value in the database with pgAdmin and it is saved. When I ad the field directly to the stock module it does show the value from the database. What am I doing wrong?


from openerp.modules import get_module_resource, get_module_path
import delivery_order_reference


from openerp.osv import fields, osv

class delivery_order_reference(osv.osv):
  _name = "stock.picking.out"
  _inherit = "stock.picking.out"

  _columns = {
    'delivery_order_reference': fields.integer('Klant referentie', size=64)



    'name': "Delivery order reference",
    'version': "1.0",
    'author': "M2tec",
    'category': "Warehouse Management",
    'depends': ['stock'],
    'data': ['delivery_order_reference.xml'],
    'demo': [],
    'installable': True,


<?xml version="1.0" encoding="utf-8"?>
    <record model="ir.ui.view" id="delivery_order_reference_ui">
        <field name="name">stock.picking.out.form</field>
        <field name="model">stock.picking.out</field>
        <field name="inherit_id" ref="stock.view_picking_out_form" />
        <field name="arch" type="xml">
            <xpath expr="/form/sheet/group/group[1]/field[@name='stock_journal_id']" position="after">
                <field name="delivery_order_reference" placeholder="e.g. 1234" class="oe_inline" />


Ben Bernard

--Ben Bernard--

| 4 3 6
Jakarta, Indonesia
--Ben Bernard--
Ben Bernard
On 8/4/14, 5:35 PM

Remove the _name line in delivery_order_reference class.

On 8/6/14, 2:35 AM

Thanks it didn't work. Actually this is my mistake. I was very much inpired by this article (see link). The tutorial works as expected, also on my system in the projects module. Here the file does not have the name field, which is correct. Sorry but not yet a solution :)


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

1 follower(s)


Asked: 8/4/14, 1:46 PM
Seen: 981 times
Last updated: 3/16/15, 8:10 AM