Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
6078 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer
Auteur Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
0
sep. 19
98
1
jul. 17
4360
4
aug. 16
8568
1
mei 16
5180
1
mrt. 16
5216