Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

concurrent update on same record

orm
By
Vincent Myo
on 7/12/13, 3:12 AM 1,056 views

problem is first read the record and take the necessary data. after that update that record. that time shows the concurrent update error.

anyone should any idea to solve? if have send this mail, wiseguuy@gmail.com or comment in here. Thanks

code snipped is followed.

class A

obj = self.pool.get('customer.internal.related.data.lastid')
lastid = obj.retrive_customer_id(cr, uid, '1', context=context)

#some process ..................... .....................

lastid = obj.create_customer_topup_lastid(cr, uid, customer_id, flg, context=context)


class B

def retrive_customer_id(self, cr, uid, state, context={}):
def create_customer_topup_lastid(self, cr, uid, ids, flg, context={}):

read the record from Table-A. and make some process to Table-B. and then update the Table-A again...then show concurrent update. i understand current cursor point to read operation and then i make update again, concurrent update.how am i solve for that?

0
Vincent Myo
On 7/15/13, 1:53 AM

have installed by myself. code snipped is followed.

class A

obj = self.pool.get('customer.internal.related.data.lastid') lastid = obj.retrive_customer_id(cr, uid, '1', context=context)

some process ..................... .....................

lastid = obj.create_customer_topup_lastid(cr, uid, customer_id, flg, context=context)


class B

def retrive_customer_id(self, cr, uid, state, context={}):

def create_customer_topup_lastid(self, cr, uid, ids, flg, context={}):


read the record first to Table-A. and then some process make to Table-B. and then update process make to Table-A. got what i mean?

0

patrick

--patrick--
1958
| 5 4 7
Baarn, Netherlands
--patrick--
patrick
On 7/12/13, 7:37 PM

The described behaviour is something I have not experienced with default modules. The only time ythat might occur if multiple users are accessing the same record for what ever reason...

Have you installed any custom module (downloaded from internet or made yourself)? Do you get this error with a specific user, or with other users as well? Have you tried to restart the server?

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 7/12/13, 3:12 AM
Seen: 1056 times
Last updated: 3/16/15, 8:10 AM