← Back to team overview

openerp-india team mailing list archive

[Bug 984066] Re: problem update fields in inherited view form.

 

Hello ,

I have checked your Issue. You must have to change xpath after change 
place of field in ref view. you have to change it manually because 
its not working like artificial intelligent .So we can not consider this as bug and 
I am closing this issue.

Thank you!


** Changed in: openobject-server
       Status: New => Invalid

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/984066

Title:
  problem update fields in inherited view form.

Status in OpenERP Server:
  Invalid

Bug description:
  i make simple class for test API:

  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('Unit Name',size=256,required=True),
          '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>
  <....>

  this code work fine in web and gtk-client.

  After it i make subclass.
  extended_simpleunit.py:
  <....>
  class extend_simple_unit(osv.osv):
      _name='simple.unit'
      _inherit='simple.unit'
      _columns={
          'parkur_lvl':fields.selection([('beginner','Beginner'),('middle','Middle'),('pro','Pro')],'Parkur lvl'),
          'parkur_stage':fields.integer('Parkur Stage(years)'),
          'parkur_style':fields.char('Parkur Style',size=40,readonly=False),     
          'parkur_jumps':fields.char('Count jumps',size=40,readonly=False),     
      }    
  extend_simple_unit()
  <....>

  and extended_simpleunit_view.xml:
  <....>
          <record model="ir.ui.view" id="extend_simple_unit_form_inherit">
              <field name="name">extend.simple.unit.form.inherit</field>
              <field name="model">simple.unit</field>
              <field name="type">form</field>
              <field name="inherit_id" ref="simpleunit.simple_unit_form"/>
              <field name="arch" type="xml">
                  <xpath expr="/form/group[@name='My_group']" position="after">
                      <group colspan="4" string="Parkur">
                          <field name="parkur_lvl"/>
                          <filed name="parkur_jumps"/>
                          <group colspan="2" string="internal_group">
                                  <filed name="parkur_jumps"/>
                          </group>
                      </group>
                  </xpath>
              </field>
          </record>
  <....>

  
  This code work, but if i move some field to another place in view form(move to new group/pages etc), then this field is disappear -it's wonderfull but useless.  And more if i add new field in subclass and inherit view form they disappear too.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/984066/+subscriptions