← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 720173] [NEW] O2Ms nested in O2M form can not be used if the O2M form object has no mandatory attribute

 

Public bug reported:

1. Install a database with base_contact

2. Go to Sales > Address Book > Customers and create a new customer

3. Set a customer name and save (via Save and Edit)

At this point, the contacts o2m not editable (and neither should the
Address o2m be: the background is that of non-editable and there is a
readonly field attribute set, but it's still editable)

4. Click [New] next to address

5. Click [New] next to contacts

Expected:
Should create a new line in Contacts so it's possible to create a contact for the address

Observed:
Reloads the form over and over and over

Note that if you enter anything in a field of address (even though it's
not required) then it will work.

The problem is that the address is not created because all its fields
are empty (as per addons/openerp/utils/utils.py line 70), and so the
contacts o2m tries to create its line even though there is no parent
(because the address was not created).

Of course the fix was probably included to stop creating e.g. empty
addresses every time you created a customer in the first place...

** Affects: openobject-client-web
     Importance: Medium
     Assignee: OpenERP SA's Web Client R&D (openerp-dev-web)
         Status: Confirmed

** Changed in: openobject-client-web
       Status: New => Confirmed

** Changed in: openobject-client-web
   Importance: Undecided => Medium

** Changed in: openobject-client-web
     Assignee: (unassigned) => OpenERP SA's Web Client R&D (openerp-dev-web)

-- 
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/720173

Title:
  O2Ms nested in O2M form can not be used if the O2M form object has no
  mandatory attribute

Status in OpenERP Web Client:
  Confirmed

Bug description:
  1. Install a database with base_contact

  2. Go to Sales > Address Book > Customers and create a new customer

  3. Set a customer name and save (via Save and Edit)

  At this point, the contacts o2m not editable (and neither should the
  Address o2m be: the background is that of non-editable and there is a
  readonly field attribute set, but it's still editable)

  4. Click [New] next to address

  5. Click [New] next to contacts

  Expected:
  Should create a new line in Contacts so it's possible to create a contact for the address

  Observed:
  Reloads the form over and over and over

  Note that if you enter anything in a field of address (even though
  it's not required) then it will work.

  The problem is that the address is not created because all its fields
  are empty (as per addons/openerp/utils/utils.py line 70), and so the
  contacts o2m tries to create its line even though there is no parent
  (because the address was not created).

  Of course the fix was probably included to stop creating e.g. empty
  addresses every time you created a customer in the first place...





Follow ups

References