← Back to team overview

openerp-india team mailing list archive

[Bug 600533] Re: Problem with read() on orphan _inherits record.

 

** Also affects: openobject-server/6.1
   Importance: Undecided
       Status: New

** No longer affects: openobject-server

** Also affects: openobject-server
   Importance: Undecided
       Status: New

** No longer affects: openobject-server/6.1

** Changed in: openobject-server
   Importance: Undecided => Medium

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/600533

Title:
  Problem with read() on orphan _inherits record.

Status in OpenERP Server:
  New

Bug description:
  Hi,

  When I try to generate variants of a template, the server crashes with
  KeyError: 'dimension_value_ids'

  I create a product 'Pomme de Terre Doria'. When I try to generate variants of this product, I open the product_template view and delete the first variant (which matches with the product_product) and without saving this product_template, I add a dimension type 'Certification' with values 'Ecocert' and 'BIO'.
  When I click on Generate button, the server crashes with KeyError: 'dimension_value_ids

  If I save the template after the deletion of the first variant and
  before add dimension type, it works.

  Traceback :
    File "/home/quentin/Developpement/argabio/argabio_5.0.11/server/bin/netsvc.py", line 247, in dispatch
      result = LocalService(service_name)(method, *params)
    File "/home/quentin/Developpement/argabio/argabio_5.0.11/server/bin/netsvc.py", line 76, in __call__
      return getattr(self, method)(*params)
    File "/home/quentin/Developpement/argabio/argabio_5.0.11/server/bin/service/web_services.py", line 577, in execute
      res = service.execute(db, uid, object, method, *args)
    File "/home/quentin/Developpement/argabio/argabio_5.0.11/server/bin/osv/osv.py", line 58, in wrapper
      return f(self, dbname, *args, **kwargs)
    File "/home/quentin/Developpement/argabio/argabio_5.0.11/server/bin/osv/osv.py", line 119, in execute
      res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
    File "/home/quentin/Developpement/argabio/argabio_5.0.11/server/bin/osv/osv.py", line 111, in execute_cr
      return getattr(object, method)(cr, uid, *args, **kw)
    File "/home/quentin/Developpement/argabio/argabio_5.0.11/server/bin/osv/orm.py", line 2728, in write
      self.pool.get(object)._store_set_values(cr, user, ids, fields, context)
    File "/home/quentin/Developpement/argabio/argabio_5.0.11/server/bin/osv/orm.py", line 2970, in _store_set_values
      result = self._columns[f].get(cr, self, ids, f, uid, context=context)
    File "/home/quentin/Developpement/argabio/argabio_5.0.11/server/bin/osv/fields.py", line 659, in get
      res = self._fnct(obj, cr, user, ids, name, self._arg, context)
    File "/home/quentin/Developpement/argabio/argabio_5.0.11/server/bin/addons/product_variant_multi/product_variant.py", line 139, in _variant_name_get
      r = map(lambda dim: (dim.dimension_id.name or '')+':'+(dim.name or '-'), product.dimension_value_ids)
    File "/home/quentin/Developpement/argabio/argabio_5.0.11/server/bin/osv/orm.py", line 239, in __getattr__
      return self[name]
    File "/home/quentin/Developpement/argabio/argabio_5.0.11/server/bin/osv/orm.py", line 235, in __getitem__
      return self._data[self._id][name]
  KeyError: 'dimension_value_ids'

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/600533/+subscriptions