hello I found a problem with the stock module I want to add some fields the data are stored in the database but not displayed in the view!!!
__init__.py
import test
openerp.py
{
"name" : "Test",
"version" : "1.0",
"category" : "",
'complexity' : "normal",
"author" : "xxxxxx",
"website" : "www.you.com",
"depends" : ["stock"],
"summary" : "Test",
"description" : """ Test """,
"data" : ['test_view.xml'],
"application": False,
"installable": True
}
test.py
from openerp.osv import fields, osv
class stock_picking_out(osv.osv):
_inherit = 'stock.picking.out'
_columns = {
'test': fields.char('Test Field', size=8, select=True, states={'done': [('readonly', True)]}, domain=[('type', '=', 'out')]),
}
test_view.xml
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_picking_out_form_test" model="ir.ui.view">
<field name="name">stock.picking.out.form.test</field>
<field name="model">stock.picking.out</field>
<field name="inherit_id" ref="stock.view_picking_out_form" />
<field name="arch" type="xml">
<field name="partner_id" position="after">
<field name="test" placeholder="e.g. [0-9][a-zA-Z]" />
</field>
</field>
</record>
</data>
</openerp>
Finally I now to fix this. This is OpenERP bug (ref: lp996816). You must add the new field in two model by inheriting stock.picking & stock.picking.out. See in sale_stock module > stock.py (on last line) there is FIXME comment. Add that new field in new inherit stock.view_picking_out_form with model stock.picking.out. Thx all...