thanks, yes thats an good idea. Now I can modify the custom modules, reload the modules with docker exec -it trytond bash -c "trytond-admin --config /etc/tryton/trytond.conf --all" and test the changes.
Now I am stuck with this error:
File "/trytond/wsgi.py", line 79, in dispatch_request
return endpoint(request, **request.view_args)
File "/trytond/protocols/dispatcher.py", line 45, in rpc
request, database_name, *request.rpc_params)
File "/trytond/protocols/dispatcher.py", line 62, in login
database_name, user, parameters, context=context)
File "/trytond/security.py", line 31, in login
pool = _get_pool(dbname)
File "/trytond/security.py", line 18, in _get_pool
pool.init()
File "/trytond/pool.py", line 160, in init
lang=lang, activatedeps=activatedeps)
File "/trytond/modules/__init__.py", line 423, in load_modules
_load_modules(update)
File "/trytond/modules/__init__.py", line 388, in _load_modules
load_module_graph(graph, pool, update, lang)
File "/trytond/modules/__init__.py", line 270, in load_module_graph
pool.setup()
File "/trytond/pool.py", line 236, in setup
cls.__post_setup__()
File "/trytond/model/modelview.py", line 203, in __post_setup__
for button in cls._buttons:
AttributeError: type object \'party.address\' has no attribute \'_buttons\'
btw is there any better option to test my custom modules? Right now I always start the tryton client and check the errors reported there.
For me it looks like some module is extending party.address and override __setup__ method without calling super().__setup__ so the _buttons attribute is not set by ModelView.
figured it out, indeed super().__setup__() was missing. Now I am stuck with the next error beeing:
File "/trytond/wsgi.py", line 79, in dispatch_request
return endpoint(request, **request.view_args)
File "/trytond/protocols/dispatcher.py", line 45, in rpc
request, database_name, *request.rpc_params)
File "/trytond/protocols/dispatcher.py", line 62, in login
database_name, user, parameters, context=context)
File "/trytond/security.py", line 34, in login
user_id = User.get_login(loginname, parameters)
File "/trytond/res/user.py", line 643, in get_login
count_ip = LoginAttempt.count_ip()
File "/trytond/res/user.py", line 827, in count_ip
& (table.create_date >= cls.delay())))
File "/trytond/backend/postgresql/database.py", line 67, in execute
cursor.execute(self, sql, args)
psycopg2.ProgrammingError: column a.ip_network does not exist
LINE 1: ...\'*\') FROM "res_user_login_attempt" AS "a" WHERE (("a"."ip_ne...
The field ip_network is defined in trytond/trytond/res/user.py. So it seems you are missing the migration step which adds the field to the database. This is done via:
trytond-admin -d DB --all
If this doesnāt work, a missing or wrong super call in __setup__ or __register__ could make such problems.
It looks like your database connection via Tryton detects no configuration table and tries to install a new base setup. This speaks for different owners of the database tables (OwnerA) and the database connection (OwnerB) in trytond.conf.
It is good to make a backup of the original database without owner, via psql. E.g.:
The tables must be owned by the user used by trytond.
So probably the best is to restore your backup with owner like with pg_restore --no-owner but using the same user as trytond.
itās strange. In the postgres-container when I do: select * from ir_configuration_seq; I get this error: ERROR: relation "ir_configuration_seq" does not exist
which seems to be right.
but with trytond-admin -d mydatabase --all -c /etc/tryton/trytond.conf I get