← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 693258] Re: Problems adding more contact to partner (base_contact)

 

I confirm this is a web client issue, as far as I can see.

Here is the succession of the RPC calls that matter when executing the scenario of the bug with the web client (revno 4240).
Notice that in Step 2 when refreshing the res.address,12 record, the server gives the new __last_update: '2011-01-04 16:45:39.18499'.
But when the Web client tries to add another contact in Step 3 the same __last_update as in Step 1 is passed for res.partner.address,12:  '2011-01-04 09:58:33.429967'
The web client should use the new data everywhere and thus should pass the newer update date in the context for Step 3.

Step 1. Creation of the first contact:
['test_install',
 4,
 '*',
 'res.partner.address',
 'write',
 [12],
 {'job_ids': [[0,
                 0,
                 {'contact_id': 8,
                  'email': False,
                  'extension': False,
                  'fax': False,
                  'function': 'test',
                  'other': False,
                  'phone': False,
                  'sequence_partner': 1}]]},
                    {'__last_update': {'res.partner,3': '2011-01-04 09:58:33.429967',
                     'res.partner.address,12': '2011-01-04 09:58:33.429967',    <<<<<< HERE
                     'res.partner.category,11': '2011-01-04 09:58:33.429967'}}]

Step 2. Web Client refreshes the partner, address and job, here's the RPC call for the address:
['test_install',
 1,
 '*',
 'res.partner.address',
 'read',
 [12],
 ['city',
  'fax',
  'zip',
  'street2',
  'country_id',
  'email',
  'phone',
  'street',
  'state_id',
  'type',
  'job_ids',
  '__last_update'],
 {'bin_size': True,
  'client': 'web',
  'department_id': False,
  'lang': 'en_US',
  'section_id': False,
  'tz': False}]
result:[{'__last_update': '2011-01-04 16:45:39.18499',           <<<<<< HERE
result:  'city': u'Wavre',
result:  'country_id': (20, u'Belgium'),
result:  'email': False,
result:  'fax': False,
result:  'id': 12,
result:  'job_ids': [33],
result:  'phone': False,
result:  'state_id': False,
result:  'street': u'71 rue de Chimay',
result:  'street2': False,
result:  'type': u'delivery',
result:  'zip': u'5478'}]


Step 3: Web client tries to add another contact and fails:
['test_install',
 1,
 '*',
 'res.partner.address',
 'write',
 [12],
 {'job_ids': [[0,
               0,
               {'contact_id': 22,
                'email': False,
                'extension': False,
                'fax': False,
                'function': 'sylvie',
                'other': False,
                'phone': False,
                'sequence_partner': 2}]]},
 {'__last_update': {'res.partner,3': '2011-01-04 09:58:33.429967',
                    'res.partner.address,12': '2011-01-04 09:58:33.429967',  <<<<<< HERE
                    'res.partner.category,11': '2011-01-04 09:58:33.429967',
                    'res.partner.job,33': '2011-01-04 16:45:39.18499'}}]

=> A document was modified since you last viewed it (Partner Address:12)

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

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

** Changed in: openobject-client-web
    Milestone: None => 6.0-rc2

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

Title:
  Problems adding more contact to partner (base_contact)

Status in OpenObject Web Client:
  Confirmed

Bug description:
  I've got this new problem insert contact under partner form (last is https://bugs.launchpad.net/bugs/691816 , installation is the same).
I open partner form, in the bottom part I add a contact (specify function for not to have loop problems, as described in last bug), the first I save works fine, If I try to add a second contact (created before as first) I've got always this error:

"Warning Message
	A document was modified since you last viewed it (Partner Address:24)"

There I have only OK button, for exit I have to save and edit partner form, lost information about second contact and reinsert with new now works.
So the procedure is: 
1 new contact, save contact, save and edit partner, 
2 new contact, save contact,  save and edit partner 
... and so on..





References