Skip to Content
Menu
This question has been flagged
2 Replies
6089 Zobrazenia

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?

Avatar
Zrušiť
Best Answer

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?

Avatar
Zrušiť
Autor Best Answer

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?

Avatar
Zrušiť
Related Posts Replies Zobrazenia Aktivita
0
sep 19
98
1
júl 17
4361
4
aug 16
8568
1
máj 16
5183
1
mar 16
5216