c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #14505
[Bug 555271] Re: Number of ressources in osv.osv_memory object
Actually, as we've seen with a recent duplicate of this bug, this is a real issue - let me reopen it.
We're working on a solution...
** Changed in: openobject-server
Importance: Undecided => High
** Changed in: openobject-server
Status: Invalid => Confirmed
** Changed in: openobject-server
Milestone: None => 6.0.2
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/555271
Title:
Number of ressources in osv.osv_memory object
Status in OpenERP Server:
Confirmed
Bug description:
On a wizard based on two osv.osv_memory objects with one2many
relationship, i canno't create more than 211 lines in the "many"
object.
I want to do a "pre" import of many csv lines into the osv.osv_memory
object before validating in the wizard and do the actual import in an
osv.osv object.
i made a simple scenario to check if it was a bug :
from osv import fields,osv
class test_school(osv.osv_memory):
def _do_import(self, cr, uid, ids, context={}):
myself=self.browse(cr, uid, ids, context)[0]
for i in range(0,myself.size):
self.pool.get("test.person").create(cr, uid, {
"name":"Doe",
"age":i,
"school_id":myself.id
})
return True
_name = "test.school"
_columns = {
"name":fields.char("name",size=20),
"size":fields.integer("size"),
"students":fields.one2many("test.person","school_id","students"),
}
test_school()
class test_person(osv.osv_memory):
_name = "test.person"
_columns = {
"name":fields.char("name",size=20),
"age":fields.integer("age"),
"school_id":fields.many2one("test.school","school",ondelete="cascade"),
}
test_person()
This is a silly example but you can make tests with size over 211 :
the number of lines will remains 211 (sometimes 201...) and only the
last added lines will remain in the table...
Follow ups