Not get currency when create a new company
- Create a new database and install company and account modules.
- Run perform activation/upgrade wizard
- Try to create a new company. First, create the party:
Traceback (most recent call last):
File "/home/raimon/projectes/nandev2/nancore/trytond/trytond/protocols/wrappers.py", line 208, in wrapper
result = func(request, pool, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/raimon/projectes/nandev2/nancore/trytond/trytond/protocols/dispatcher.py", line 216, in _dispatch
result = rpc.result(meth(*c_args, **c_kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/raimon/projectes/nandev2/nancore/trytond/trytond/model/modelsql.py", line 1194, in read
getter_results = field.get(
^^^^^^^^^^
File "/home/raimon/projectes/nandev2/nancore/trytond/trytond/model/fields/function.py", line 27, in wrapper
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/raimon/projectes/nandev2/nancore/trytond/trytond/transaction.py", line 50, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/raimon/projectes/nandev2/nancore/trytond/trytond/model/fields/function.py", line 159, in get
return dict((name, call(name)) for name in names)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/raimon/projectes/nandev2/nancore/trytond/trytond/model/fields/function.py", line 159, in <genexpr>
return dict((name, call(name)) for name in names)
^^^^^^^^^^
File "/home/raimon/projectes/nandev2/nancore/trytond/trytond/model/fields/function.py", line 133, in call
return {r.id: convert(method(r, name), name) for r in records}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/raimon/projectes/nandev2/nancore/trytond/trytond/model/fields/function.py", line 133, in <dictcomp>
return {r.id: convert(method(r, name), name) for r in records}
^^^^^^^^^^^^^^^
File "/home/raimon/projectes/nandev2/nancore/trytond/trytond/modules/account/party.py", line 114, in get_currency
if company_id >= 0:
^^^^^^^^^^^^^^^
TypeError: '>=' not supported between instances of 'NoneType' and 'int'`
version 7.1