We have implemented a global fix for this issue in the following server 
revisions:
- 6.0: rev 3339 [email protected]
- trunk: rev 3352 revision-id: [email protected]

This revision introduces two new config parameters and the corresponding server 
startup parameters:
- osv_memory_count_limit: limit on number or records in each osv_memory virtual 
table
- osv_memory_age_limit: limit on maximum age of records in each osv_memory 
virtual table

The default values have been changed to count=False (disabled, it used
to be 200) and age=1.0 hour, so that with the default config the server
will only expire osv_memory records that are 1 hour old or more,
avoiding problems related with the use of osv_memory classes that
instantiate a large number of short-lived objects.

Server administrators are free to use the configuration parameters to tweak 
these parameters globally if needed. 
Module developers can also alter the self._max_count and self._max_hours values 
in each osv_memory class directly (but should keep in mind that the server 
admin expects the configured values to be applied!)

** Changed in: openobject-server
       Status: In Progress => Fix Released

-- 
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:
  Fix Released

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...



_______________________________________________
Mailing list: https://launchpad.net/~c2c-oerpscenario
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~c2c-oerpscenario
More help   : https://help.launchpad.net/ListHelp

Reply via email to