# Can not update module lists

**URL:** https://discuss.tryton.org/t/can-not-update-module-lists/5260
**Category:** System Administrator
**Created:** [May 13, 2022, 1:33am UTC](https://discuss.tryton.org/t/can-not-update-module-lists/5260 "2022-05-13T01:33:33Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Tonerp](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/tonerp/32/1873_2.png) [@Tonerp](https://discuss.tryton.org/u/Tonerp)
#### Post date: [May 13, 2022, 1:33am UTC](https://discuss.tryton.org/t/can-not-update-module-lists/5260/1 "2022-05-13T01:33:34Z")

</div>

Hi,  
when i run the command:  
`sudo trytond-admin -c /etc/tryton/trytond.conf -d tryton --update-modules-list`

i receive errors:

```auto
Traceback (most recent call last):
  File "/usr/local/bin/trytond-admin", line 23, in <module>
    admin.run(options)
  File "/usr/local/lib/python3.8/dist-packages/trytond/admin.py", line 63, in run
    Module.update_list()
  File "/usr/local/lib/python3.8/dist-packages/trytond/ir/module.py", line 300, in update_list
    module, = cls.create([{
  File "/usr/local/lib/python3.8/dist-packages/trytond/model/modelsql.py", line 161, in wrapper
    return func(cls, *args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/trytond/model/modelsql.py", line 728, in create
    cls.trigger_create(records)
  File "/usr/local/lib/python3.8/dist-packages/trytond/model/modelstorage.py", line 91, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/trytond/model/modelstorage.py", line 201, in trigger_create
    triggers = Trigger.get_triggers(cls. __name__ , 'create')
  File "/usr/local/lib/python3.8/dist-packages/trytond/ir/trigger.py", line 174, in get_triggers
    triggers = cls.search([
  File "/usr/local/lib/python3.8/dist-packages/trytond/model/modelsql.py", line 1515, in search
    cursor.execute(*select)
  File "/usr/local/lib/python3.8/dist-packages/trytond/backend/postgresql/database.py", line 68, in execute
    cursor.execute(self, sql, args)
psycopg2.errors.UndefinedColumn: column a.action does not exist
LINE 1: SELECT "a"."id" AS "id", "a"."action" AS "action", "a"."acti...
                                 ^
HINT: Perhaps you meant to reference the column "a.active".

```

i installed modules by the script i created: [Need help for Installing all modules with shell script - #2 by pokoli](https://discuss.tryton.org/t/need-help-for-installing-all-modules-with-shell-script/5259/2)

and installed tryton on ubuntu by `apt install tryton-server` as suggested.

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [May 13, 2022, 7:41am UTC](https://discuss.tryton.org/t/can-not-update-module-lists/5260/2 "2022-05-13T07:41:48Z")

</div>

It seems your database is not updated with your server version.  
You should update the database using the following comand:

`trytond-admin -c /etc/tryton/trytond.conf -d tryton --all`

Once the update process is finished you should be able to update the module list without problems.

---

<div class="post-metadata">

### Author: ![Tonerp](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/tonerp/32/1873_2.png) [@Tonerp](https://discuss.tryton.org/u/Tonerp)
#### Post date: [May 13, 2022, 10:14am UTC](https://discuss.tryton.org/t/can-not-update-module-lists/5260/3 "2022-05-13T10:14:51Z")

</div>

> [@pokoli](#):
>
> trytond-admin -c /etc/tryton/trytond.conf -d tryton --all

```bash
Traceback (most recent call last):
  File "/usr/local/bin/trytond-admin", line 23, in <module>
    admin.run(options)
  File "/usr/local/lib/python3.8/dist-packages/trytond/admin.py", line 57, in run
    pool.init(update=options.update, lang=list(lang),
  File "/usr/local/lib/python3.8/dist-packages/trytond/pool.py", line 165, in init
    restart = not load_modules(
  File "/usr/local/lib/python3.8/dist-packages/trytond/modules/ __init__.py", line 438, in load_modules
    _load_modules(update)
  File "/usr/local/lib/python3.8/dist-packages/trytond/modules/ __init__.py", line 406, in _load_modules
    load_module_graph(graph, pool, update, lang)
  File "/usr/local/lib/python3.8/dist-packages/trytond/modules/ __init__.py", line 238, in load_module_graph
    cls. __register__ (module)
  File "/usr/local/lib/python3.8/dist-packages/trytond/model/modelsql.py", line 219, in __register__
    super(ModelSQL, cls). __register__ (module_name)
  File "/usr/local/lib/python3.8/dist-packages/trytond/model/model.py", line 126, in __register__
    ModelField.register(cls, module_name, model_id)
  File "/usr/local/lib/python3.8/dist-packages/trytond/ir/model.py", line 287, in register
    cursor.execute(*ir_model_field.join(ir_model,
  File "/usr/local/lib/python3.8/dist-packages/trytond/backend/postgresql/database.py", line 68, in execute
    cursor.execute(self, sql, args)
psycopg2.errors.UndefinedColumn: column a.access does not exist
LINE 1: ..., "a"."module" AS "module", "a"."help" AS "help", "a"."acces...
                                                             ^

```

now i got this.

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [May 13, 2022, 10:28am UTC](https://discuss.tryton.org/t/can-not-update-module-lists/5260/4 "2022-05-13T10:28:09Z")

</div>

It seems you are missing some queries from the [5.8 to 6.0 migration](https://discuss.tryton.org/t/migration-from-5-8-to-6-0/3603)

---

<div class="post-metadata">

### Author: ![Tonerp](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/tonerp/32/1873_2.png) [@Tonerp](https://discuss.tryton.org/u/Tonerp)
#### Post date: [May 13, 2022, 7:41pm UTC](https://discuss.tryton.org/t/can-not-update-module-lists/5260/5 "2022-05-13T19:41:55Z")

</div>

i tried section `[SQL] fix currency, invoice_type and party on invoice line`  
but i got;

> ERROR: relation “account\_invoice\_line” does not exist  
> LINE 1: UPDATE account\_invoice\_line SET currency = (SELECT currency …  
> ^  
> SQL state: 42P01  
> Character: 8

but i applied `[SQL] before update, add access on field` and i got another error;

> 24442 139667543680832 [2022-05-13 19:42:55,162] ERROR trytond.convert Could not delete id 2 from model res.user.  
> There may be a relation that points to this resource that must be manually fixed before restarting the update.  
> Traceback (most recent call last):  
> File “/usr/local/lib/python3.8/dist-packages/trytond/convert.py”, line 811, in post\_import  
> Model.delete([Model(db\_id)])  
> File “/usr/local/lib/python3.8/dist-packages/trytond/res/user.py”, line 420, in delete  
> raise DeleteError(gettext(‘res.msg\_user\_delete\_forbidden’))  
> trytond.res.user.DeleteError: For logging purposes users cannot be deleted, instead they should be deactivated. -

id 2 is “user\_cron\_trigger” should i delete it ? i dont think so!

---

<div class="post-metadata">

### Author: ![Tonerp](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/tonerp/32/1873_2.png) [@Tonerp](https://discuss.tryton.org/u/Tonerp)
#### Post date: [May 13, 2022, 7:52pm UTC](https://discuss.tryton.org/t/can-not-update-module-lists/5260/6 "2022-05-13T19:52:34Z")

</div>

but this `sudo trytond-admin -c /etc/tryton/trytond.conf -d tryton --update-modules-list` worked without error after applying `[SQL] before update, add access on field` but later tryton client gives error;

> Traceback (most recent call last):  
> File “/Users/ced/tryton-5.0/tryton/gui/main.py”, line 275, in do\_activate  
> File “/Users/ced/tryton-5.0/tryton/common/common.py”, line 998, in **init**  
> File “/Users/ced/tryton-5.0/tryton/rpc.py”, line 88, in login  
> File “/usr/local/Cellar/python/3.7.6\_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/xmlrpc/client.py”, line 1112, in **call**  
> File “/Users/ced/tryton-5.0/tryton/jsonrpc.py”, line 286, in \_\_request  
> tryton.jsonrpc.Fault: \<Fault ‘column a.action\_function does not exist\nLINE 1: SELECT “a”.“id” AS “id”, “a”.“action\_function” AS "action\_fu…\n ^\n’: ‘Traceback (most recent call last):\n File “/trytond/wsgi.py”, line 73, in dispatch\_request\n return endpoint(request, \*\*request.view\_args)\n File “/trytond/protocols/dispatcher.py”, line 45, in rpc\n return methods.get(request.rpc\_method, \_dispatch)(\n File “/trytond/protocols/dispatcher.py”, line 62, in login\n session = security.login(\n File “/trytond/security.py”, line 51, in login\n session = user\_id, Session.new()\n File “/trytond/ir/session.py”, line 51, in new\n session, = cls.create([values])\n File “/trytond/ir/session.py”, line 149, in create\n return super(Session, cls).create(vlist)\n File “/trytond/model/modelsql.py”, line 147, in wrapper\n return func(cls, \*args, \*\*kwargs)\n File “/trytond/model/modelsql.py”, line 659, in create\n cls.trigger\_create(records)\n File “/trytond/model/modelstorage.py”, line 36, in wrapper\n return func(\*args, \*\*kwargs)\n File “/trytond/model/modelstorage.py”, line 119, in trigger\_create\n triggers = Trigger.get\_triggers(cls. **name** , 'create')\n File “/trytond/ir/trigger.py”, line 156, in get\_triggers\n triggers = cls.search([\n File “/trytond/model/modelsql.py”, line 1242, in search\n cursor.execute(\*select)\n File “/trytond/backend/postgresql/database.py”, line 66, in execute\n cursor.execute(self, sql, args)\npsycopg2.errors.UndefinedColumn: column a.action\_function does not exist\nLINE 1: SELECT “a”.“id” AS “id”, “a”.“action\_function” AS "action\_fu…\n ^\n\n’\>

---

<div class="post-metadata">

### Author: ![Tonerp](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/tonerp/32/1873_2.png) [@Tonerp](https://discuss.tryton.org/u/Tonerp)
#### Post date: [May 15, 2022, 9:11pm UTC](https://discuss.tryton.org/t/can-not-update-module-lists/5260/7 "2022-05-15T21:11:24Z")

</div>

i solved the problems by reinstalling from the beginning.
