Skip to Content
Menu
This question has been flagged
3 Replies
2975 Views

Application behaviour

When updating a module through the menupath "apps", "updates", the system provides error message 

button_immediate_upgrade() takes 1 positional argument but 2 were given

 When I do the exact same update from the "apps" menu, ("apps" menu, then "main apps", finding the corresponding module, clicking the three dots in the righ upper corner of the module, then clicking "upgrade", the update works fine.

Installation:

  • 14.0, version 1-april-2022
  • In docker environment on synology NAS

Steps to reproduce:

  • Download the module from the apps store, put it in the addons folder, confirming permissions etc.
  • Stop and restart the odoo container
  • Start, apps, update module list
  • Updates (the module to be updated does appear and the "update" button is visible)
  • When clicking the "update" button, system provides an error

Example application

This recently happened when updating 

account_fiscal_year - v 14.0.1.1.1

Local: 14.0.1.2.0 | Remote: 14.0.1.2.0


Full Error message

Odoo Server Error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 685, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 361, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 349, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 914, in __call__
return self.method(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 533, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1394, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1386, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 399, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 386, in _call_kw_multi
result = method(recs, *args, **kwargs)
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 641, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 317, in _handle_exception
raise exception.with_traceback(None) from new_cause
TypeError: button_immediate_upgrade() takes 1 positional argument but 2 were given
Avatar
Discard
Best Answer

Hi,

This menu is not intended for upgrading the modules, this module will shows that has got newer versions in odoo apps store. Suppose if you are using a module named xyz and version 14.0.1.0 which is downloaded from odoo app store, and then the module author made some updates in the codes and released 14.0.2.0, now in your odoo instance the version is 1.0 and in odoo apps store it is 2.0, so this menu will give you info that the module is not the latest code.

Now we have to manually download the latest from odoo apps, add to odoo instance, restart and upgrade from the apps menu,

Thanks

Avatar
Discard
Best Answer

This is still broken V16.

Avatar
Discard
Author Best Answer

Hello Niyas, thanks for taking the time to provide such kind answer. I am not sure if I entirely agree with your statement.

I dó agree with the first part of your analysis: "Now we have to manually download the latest from odoo apps, add to odoo instance, restart".

Before doing so, the the update button in "apps", "updates", menu is just "greyed out". After having done what you described, the update button becomes green and does definitely allows an update proces to start. However that update proces results in the described python error.

So whilst I agree with you that this is not a blocking issue, I am just curious how I can make this upgrade proces work as designed (when I worked in odoo11 it definitely worked as I described).


Avatar
Discard