multi_company_products fails at template creation

Bug #566519 reported by Eric Caudal - www.elico-corp.com
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
Ravindra Mekhiya(OpenERP)

Bug Description

When I try to save a product with the module multi_company_product I get the following error:

Environment Information :
System : Linux-2.6.31-20-generic-i686-with-Ubuntu-9.10-karmic
OS Name : posix
LSB Version: core-2.0-ia32:core-2.0-noarch:core-3.0-ia32:core-3.0-noarch:core-3.1-ia32:core-3.1-noarch:core-3.2-ia32:core-3.2-noarch:core-4.0-ia32:core-4.0-noarch:cxx-3.0-ia32:cxx-3.0-noarch:cxx-3.1-ia32:cxx-3.1-noarch:cxx-3.2-ia32:cxx-3.2-noarch:cxx-4.0-ia32:cxx-4.0-noarch:desktop-3.1-ia32:desktop-3.1-noarch:desktop-3.2-ia32:desktop-3.2-noarch:desktop-4.0-ia32:desktop-4.0-noarch:graphics-2.0-ia32:graphics-2.0-noarch:graphics-3.0-ia32:graphics-3.0-noarch:graphics-3.1-ia32:graphics-3.1-noarch:graphics-3.2-ia32:graphics-3.2-noarch:graphics-4.0-ia32:graphics-4.0-noarch:qt4-3.1-ia32:qt4-3.1-noarch
Distributor ID: Ubuntu
Description: Ubuntu 9.10
Release: 9.10
Codename: karmic
Operating System Release : 2.6.31-20-generic
Operating System Version : #58-Ubuntu SMP Fri Mar 12 05:23:09 UTC 2010
Operating System Architecture : 32bit
Operating System Locale : en_US.UTF8
Python Version : 2.5.4
OpenERP-Client Version : 5.0.6
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/openerp-server/netsvc.py", line 244, in dispatch
    result = LocalService(service_name)(method, *params)
  File "/usr/lib/python2.5/site-packages/openerp-server/netsvc.py", line 73, in __call__
    return getattr(self, method)(*params)
  File "/usr/lib/python2.5/site-packages/openerp-server/service/web_services.py", line 576, in execute
    res = service.execute(db, uid, object, method, *args)
  File "/usr/lib/python2.5/site-packages/openerp-server/osv/osv.py", line 58, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/openerp-server/osv/osv.py", line 119, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/lib/python2.5/site-packages/openerp-server/osv/osv.py", line 111, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/lib/python2.5/site-packages/openerp-server/addons/multi_company_product/product.py", line 65, in create
    standard_ids=vals['standard_price_ids']
KeyError: 'standard_price_ids'

It seems that the systems trie to read the standard prices when obviously it is not possible as the template is not even created.

Revision history for this message
gpa(OpenERP) (gpa-openerp) wrote :

This has been fixed in following revision of stable extra addons :4292 <email address hidden>.
Thanks

Changed in openobject-addons:
status: New → Fix Released
Revision history for this message
Eric Caudal - www.elico-corp.com (elicoidal) wrote :

Quick and efficient!

It works fine. Thanks
Eric

Changed in openobject-addons:
importance: Undecided → Low
milestone: none → 5.0.10
Revision history for this message
Carlos Vásquez (ClearCorp) (cv.clearcorp) wrote :

I am using extra-addons stable revision 4343 and I am having the same exact bug. It is impossible to save a product template.

Changed in openobject-addons:
status: Fix Released → Incomplete
Revision history for this message
Eric Caudal - www.elico-corp.com (elicoidal) wrote :

There was a regression in the last fix released for /multi_company_product/product.py:
You should change the line
        standard_ids=vals['standard_price_ids']
with the following one:
 standard_ids=vals.get('standard_price_ids',False)

I dont know the reason why in the last fix, they modify this line.

Revision history for this message
Peter Glock (peter-glock) wrote :

elicoidal: That seems to work, thank you very much.

Changed in openobject-addons:
assignee: nobody → RME(OpenERP) (rme-openerp)
Revision history for this message
Ravindra Mekhiya(OpenERP) (rme-openerp) wrote :

Thanks for pointing, it has been fixed by revision 4392 <email address hidden>.

Changed in openobject-addons:
status: Incomplete → Fix Released
Changed in openobject-addons:
milestone: 5.0.10 → 5.0.12
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.