Se rendre au contenu
Menu
Cette question a été signalée
2 Réponses
6090 Vues

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
Ignorer
Meilleure réponse

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
Ignorer
Auteur Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
0
sept. 19
98
1
juil. 17
4361
4
août 16
8568
1
mai 16
5183
1
mars 16
5216