openerp-community team mailing list archive
-
openerp-community team
-
Mailing list archive
-
Message #01094
Re: OpenERP 6.1 transaction issue
On 18-06-12 10:16, Sam Lefever wrote:
Dear community,
We are facing a problem passing our code in 6.1 version.
We try to insert data in a transaction and in the same transaction,
looking for those data.
It was working perfectly in 6.0, but not anymore in 6.1.
Does someone have an idea for what is the change between versions?
Hi Sam,
What it reminds me of is the need to refresh browse records after having
written to them (in OpenERP 6.1):
partner = self.pool.get('res.partner').browse(cr, uid, 1)
print partner.name # prints old name
self.pool.get('res.partner').write(cr, uid, {'name': 'New name'}
print partner.name # prints old name
partner.refresh()
print partner.name # prints new name
But this was more problematic in 6.0 as the refresh() method was not yet
available, and a new browse record needed to be created instead.
If you are facing a different issue, can you give a snippet of the code
that illustrates your problem?
Cheers,
Stefan.
--
Therp - Maatwerk in open ontwikkeling
Stefan Rijnhart - Ontwerp en implementatie
mail: stefan@xxxxxxxx
tel: +31 (0) 614478606
http://therp.nl
https://twitter.com/therp_stefan
Follow ups
References