← Back to team overview

openerp-india team mailing list archive

[Bug 983909] [NEW] don't update data table after during/after update module

 

You have been subscribed to a public bug:

OpenERP 6.1.

I write and install simple module for test api.
When i add new field in class and viewform system don't update current fields( i change help notation) and don't add new field in data tables, in following gui view can't find new data field and don't work.

Example code.
simpleunit.py:

<...>
class simpleunit(osv.osv):
    _name="simple.unit"
    _description="For keeping some test personal data"
    _columns={
        'unit_id':fields.char('Registration ID Number',size=256,required=True),
        'unit_name':fields.char('Some name',size=256,required=True,help="Some help"),  //field with help and some gui information
        'father_name':fields.char('Father Name',size=256,required=True),
        'gender':fields.selection([('male','Male'),('female','Female')],'Gender'),
        'contact_number':fields.char('Contuct number',size=256,required=False)
    }
simpleunit()
<....>

simpleunit_view.xml:
<...>
<record model="ir.ui.view" id="simple_unit_form">
            <field name="name">simple.unit.form</field>
            <field name="model">simple.unit</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Simple Unit Form">
                    <group colspan="4" string="My_group">
                    <field name="unit_id"/>
                    <field name="unit_name"/>
                    <field name="father_name"/>
                    <field name="gender"/>
                    <field name="contact_number"/>
                    </group>
                </form>
            </field>
        </record>
<...>


New code for update module:

simpleunit.py:
simpleunit.py:

<...>
class simpleunit(osv.osv):
    _name="simple.unit"
    _description="For keeping some test personal data"
    _columns={
        'unit_id':fields.char('Registration ID Number',size=256,required=True),
        'unit_name':fields.char('NEW name',size=256,required=True,help="NEW help"),    //change feild
        'father_name':fields.char('Father Name',size=256,required=True),
        'gender':fields.selection([('male','Male'),('female','Female')],'Gender'),
        'contact_number':fields.char('Contuct number',size=256,required=False),
        'new_field':field.char('New field',size=16)                                                                           //new field
    }
simpleunit()
<....>

when i update this module change not commit and gui not find `field
new_field`.

** Affects: openobject-addons
     Importance: Undecided
         Status: New

-- 
don't update data table after during/after update module
https://bugs.launchpad.net/bugs/983909
You received this bug notification because you are a member of OpenERP Indian Team, which is subscribed to OpenERP Addons.