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.

0

openerp form view don't display field data

By
Qamar Soft
on 3/28/14, 9:44 AM 908 views

I found a problem with the stock module. I want to add some fields the data are well stored in the database but they are not displayed in the view! you find files module test


test_view.xml

<openerp> <data>

    <record id="view_picking_out_form_test" model="ir.ui.view">
    <field name="name">stock.picking.out.form.test</field>
    <field name="type">form</field>
    <field name="model">stock.picking.out</field>
    <field name="inherit_id" ref="stock.view_picking_form"/>
    <field name="arch" type="xml">
        <xpath expr="//field[@name='partner_id']" position="after">
            <field name="test" placeholder="e.g. [0-9][a-zA-Z]"/>
        </xpath>
    </field>
    </record>

</data> </openerp> 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')]),
    }
0

Jagdish Panchal

--Jagdish Panchal--
2674
| 5 3 6
Gandhinagar, India
--Jagdish Panchal--

OpenERP Developer

Jagdish Panchal
On 3/29/14, 1:07 AM

Hi Try this code will help you

    <record id="view_picking_out_form_test" model="ir.ui.view">
    <field name="name">stock.picking.out.form.test</field>
    <field name="type">form</field>
    <field name="model">stock.picking</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>

py file 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')]),
    }

stock_picking_out()

same problem no changes :s

Qamar Soft
on 3/29/14, 6:49 AM

can you paste your update code again ? I have update answer try it.

Jagdish Panchal
on 3/29/14, 6:54 AM

I seen thet code. same as I used no deferance

Qamar Soft
on 3/29/14, 8:37 AM

Have you try my update code ?

Jagdish Panchal
on 3/29/14, 8:56 AM

yes I try it & the Field TEST doesn't apear in the view

Qamar Soft
on 3/29/14, 9:49 AM

yes I try it & the Field TEST doesn't apear in the view

Qamar Soft
on 3/29/14, 9:50 AM

Problem solve ?

Jagdish Panchal
on 3/31/14, 3:56 AM

nop because, I want the field to display the value and now it doesn't apear in the view

Qamar Soft
on 3/31/14, 6:34 AM

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

0 follower(s)

Stats

Asked: 3/28/14, 9:44 AM
Seen: 908 times
Last updated: 3/16/15, 8:10 AM