← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 705485] [NEW] [TRUNK 4430] Bug when you use a from view in a form view

 

Public bug reported:

Sample of view

server/bin/addons/base/res/partner/partner_view.xml

in partner view, use a form/tree for show the address

<notebook colspan="4">
                        <page string="General">
                            <field colspan="4" mode="form,tree" name="address" nolabel="1" select="1" height="260">


Bug from addons/openerp/widgets/form/_o2m.py REV 4227

f self.view_type == 'form':
            if current.id and not self.id:
                self.id = current.id
                params.id = self.id

Bug Description

If you add other one2many field after the address section, they use the
ID of the address because code change  the TERP_ID.

In my case i have partner id 90, address id 92, when i try to set a
value to other one2many field declare after in the view, openerp
generate a error because he try to read the partner id 92 and i dont
have partner id 92, if i have a partner id 92 he read it and nothing let
us know he read the bad one.


So to reproduce the error, use a partner lined with a address where the address id > last partner id


I dont have time to search why this code os added in revision 4227, but my solution to solve the problem at id to put in comment the line : params.id = self.id, but i<m sure is a better way to solve that, i just dont have time to search.

This a major bug again, because if i have more address than partner
(that happen all time, because many partner have 2 address), each time i
use a partner id link with a address id > last partner_id , is
impossible to set other one2many fields.


Thank

** Affects: openobject-client-web
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/705485

Title:
  [TRUNK 4430] Bug when you use a from view in a form view

Status in OpenERP Web Client:
  New

Bug description:
  Sample of view

  server/bin/addons/base/res/partner/partner_view.xml

  in partner view, use a form/tree for show the address

  <notebook colspan="4">
                          <page string="General">
                              <field colspan="4" mode="form,tree" name="address" nolabel="1" select="1" height="260">

  
  Bug from addons/openerp/widgets/form/_o2m.py REV 4227

  f self.view_type == 'form':
              if current.id and not self.id:
                  self.id = current.id
                  params.id = self.id

  Bug Description

  If you add other one2many field after the address section, they use
  the ID of the address because code change  the TERP_ID.

  In my case i have partner id 90, address id 92, when i try to set a
  value to other one2many field declare after in the view, openerp
  generate a error because he try to read the partner id 92 and i dont
  have partner id 92, if i have a partner id 92 he read it and nothing
  let us know he read the bad one.

  
  So to reproduce the error, use a partner lined with a address where the address id > last partner id

  
  I dont have time to search why this code os added in revision 4227, but my solution to solve the problem at id to put in comment the line : params.id = self.id, but i<m sure is a better way to solve that, i just dont have time to search.

  This a major bug again, because if i have more address than partner
  (that happen all time, because many partner have 2 address), each time
  i use a partner id link with a address id > last partner_id , is
  impossible to set other one2many fields.

  
  Thank





Follow ups

References