Aditya Rikhari
Aditya Rikhari

Reputation: 21

In Odoo version 8: "Value error, needs more than one value to unpack"

I installed Odoo version 8, I was going as per the Odoo book to test a business example on it. Initially I was able to create new partners - both customers and suppliers. But, now I find that I am unable to create new customers/ suppliers and product categories, which i was able to do, when I first installed it.

Now whenever I press the create new button for customers, partners and product categories, it shows me the error "Value error, needs more than one value to unpack"

The whole error message is this -

Odoo Server Error

Traceback (most recent call last):
  File "C:\Bitnami\odoo-8.0-11\apps\odoo\Lib\site-packages\odoo-8.0_20150423-py2.7.egg\openerp\http.py", line 530, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "C:\Bitnami\odoo-8.0-11\apps\odoo\Lib\site-packages\odoo-8.0_20150423-py2.7.egg\openerp\http.py", line 567, in dispatch
    result = self._call_function(**self.params)
  File "C:\Bitnami\odoo-8.0-11\apps\odoo\Lib\site-packages\odoo-8.0_20150423-py2.7.egg\openerp\http.py", line 303, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "C:\Bitnami\odoo-8.0-11\apps\odoo\Lib\site-packages\odoo-8.0_20150423-py2.7.egg\openerp\service\model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "C:\Bitnami\odoo-8.0-11\apps\odoo\Lib\site-packages\odoo-8.0_20150423-py2.7.egg\openerp\http.py", line 300, in checked_call
    return self.endpoint(*a, **kw)
  File "C:\Bitnami\odoo-8.0-11\apps\odoo\Lib\site-packages\odoo-8.0_20150423-py2.7.egg\openerp\http.py", line 796, in __call__
    return self.method(*args, **kw)
  File "C:\Bitnami\odoo-8.0-11\apps\odoo\Lib\site-packages\odoo-8.0_20150423-py2.7.egg\openerp\http.py", line 396, in response_wrap
    response = f(*args, **kw)
  File "C:\Bitnami\odoo-8.0-11\apps\odoo\Lib\site-packages\odoo-8.0_20150423-py2.7.egg\openerp\addons\web\controllers\main.py", line 936, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "C:\Bitnami\odoo-8.0-11\apps\odoo\Lib\site-packages\odoo-8.0_20150423-py2.7.egg\openerp\addons\web\controllers\main.py", line 928, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "C:\Bitnami\odoo-8.0-11\apps\odoo\Lib\site-packages\odoo-8.0_20150423-py2.7.egg\openerp\api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "C:\Bitnami\odoo-8.0-11\apps\odoo\Lib\site-packages\odoo-8.0_20150423-py2.7.egg\openerp\api.py", line 336, in old_api
    result = method(recs, *args, **kwargs)
  File "C:\Bitnami\odoo-8.0-11\apps\odoo\Lib\site-packages\odoo-8.0_20150423-py2.7.egg\openerp\models.py", line 1317, in default_get
    defaults[name] = self.env['ir.property'].get(name, self._name)
  File "C:\Bitnami\odoo-8.0-11\apps\odoo\Lib\site-packages\odoo-8.0_20150423-py2.7.egg\openerp\api.py", line 239, in wrapper
    return new_api(self, *args, **kwargs)
  File "C:\Bitnami\odoo-8.0-11\apps\odoo\Lib\site-packages\odoo-8.0_20150423-py2.7.egg\openerp\api.py", line 462, in new_api
    result = method(self._model, cr, uid, *args, **kwargs)
  File "C:\Bitnami\odoo-8.0-11\apps\odoo\Lib\site-packages\odoo-8.0_20150423-py2.7.egg\openerp\addons\base\res\ir_property.py", line 157, in get
    return self.get_by_record(cr, uid, record, context=context)
  File "C:\Bitnami\odoo-8.0-11\apps\odoo\Lib\site-packages\odoo-8.0_20150423-py2.7.egg\openerp\api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "C:\Bitnami\odoo-8.0-11\apps\odoo\Lib\site-packages\odoo-8.0_20150423-py2.7.egg\openerp\addons\base\res\ir_property.py", line 138, in get_by_record
    model, resource_id = record.value_reference.split(',')
ValueError: need more than 1 value to unpack

I have already tried searching about this problem. While this problem has been written by many, but not in this context. I am really stuck and do not know what to do now regarding this.

Upvotes: 2

Views: 1376

Answers (1)

Samir Sadek
Samir Sadek

Reputation: 1690

I have found the problem.

In the documentation, they say that you have to define the property (Defining Properties):

property_account_payable        account.account, AP Payable
property_account_receivable     account.account, AC Receivable
property_account_expense_categ  account.account, P Purchase
property_account_income_categ   account.account, S Sales

By default, you will see that the properties have a format containing a comma (,), and a number:

property_account_payable        account.account, 12
property_account_receivable     account.account, 32
property_account_expense_categ  account.account, 45
property_account_income_categ   account.account, 23

In the guide they ask you to remove the "," and to put everything inside "(" and ")". This triggered the error in their code (because it wait a comma) in line 138: model, resource_id = record.value_reference.split(',')

Just set the properties back to what it was. At least, remove the "()" and the characters.

Regards,

Upvotes: 2

Related Questions