trytond-admin -c /app/trytond.conf -d umbrella --all
While running the above command, I get the following error.
Traceback (most recent call last):
File “/usr/local/bin/trytond-admin”, line 33, in
admin.run(options)
File “/usr/local/lib/python3.12/site-packages/trytond/admin.py”, line 59, in run
pool.init(update=options.update, lang=list(lang),
File “/usr/local/lib/python3.12/site-packages/trytond/pool.py”, line 144, in init
restart = not load_modules(
^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/trytond/modules/init.py”, line 402, in load_modules
_load_modules(update)
File “/usr/local/lib/python3.12/site-packages/trytond/modules/init.py”, line 372, in _load_modules
load_module_graph(graph, pool, update, lang, indexes)
File “/usr/local/lib/python3.12/site-packages/trytond/modules/init.py”, line 200, in load_module_graph
cls.register(module)
File “/usr/local/lib/python3.12/site-packages/trytond/ir/model.py”, line 1001, in register
super().register(module_name)
File “/usr/local/lib/python3.12/site-packages/trytond/model/fields/fmany2one.py”, line 34, in register
super().register(module)
File “/usr/local/lib/python3.12/site-packages/trytond/model/modelsql.py”, line 543, in register
table.add_constraint(ident, constraint)
File “/usr/local/lib/python3.12/site-packages/trytond/backend/postgresql/table.py”, line 513, in add_constraint
cursor.execute(
File “/usr/local/lib/python3.12/site-packages/trytond/backend/postgresql/database.py”, line 76, in execute
cursor.execute(self, sql, args)
psycopg2.errors.SyntaxError: syntax error at or near ““active””
LINE 1: …USING BTREE (“name” WITH =, “model” WITH =) WHERE “active” =…
After some debugging, I found the line causing the problem in trytond/ir/model.py line 1013.
@classmethod
def __setup__(cls):
super(ModelButton, cls).__setup__()
cls.__access__.add('model_ref')
t = cls.__table__()
cls._sql_constraints += [
('name_model_exclude',
Exclude(t, (t.name, Equal), (t.model, Equal),
where=(t.active == Literal(True))),
'ir.msg_button_name_unique'),
]
cls._order.insert(0, ('model', 'ASC'))
This issue was discovered recently; it had been working correctly before.
I am using trytond==7.4.0.
Thanks in advance for your help.