$ python tryton_demo.py --help
Traceback (most recent call last):
File "tryton_demo.py", line 4, in <module>
from dateutil.relativedelta import relativedelta
ImportError: No module named dateutil.relativedelta
Previously I did try to run directly with ./tryton_demo.py
(and gave same error)
I see now that the bug begins with same script at its first line: #!/usr/bin/env python
it should be: #!/usr/bin/env python3
Where is there some more documentation about tryton_demo.py ? I want to know how to list all available modules (with this script or any other tool) and if specified database must exist, should exist, must not exist and/or it fills an already deployed database with trytond-admin
/usr/lib/python3/dist-packages/ldap3/utils/ciDict.py:30: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
class CaseInsensitiveDict(collections.MutableMapping):
Traceback (most recent call last):
File "tryton_demo.py", line 968, in <module>
config_file=options.config_file)
File "tryton_demo.py", line 874, in main
from trytond.modules.country.scripts.import_countries import do_import
ModuleNotFoundError: No module named 'trytond.modules.country.scripts'
Aleady tried with /hg.tryton.org/tryton-tools/raw-file/effe927cf4a0/tryton_demo.py but got another error:
/usr/lib/python3/dist-packages/ldap3/utils/ciDict.py:30: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
class CaseInsensitiveDict(collections.MutableMapping):
Traceback (most recent call last):
File "tryton_demo.py", line 955, in <module>
config_file=options.config_file)
File "tryton_demo.py", line 892, in main
setup_product(config, activated, company=company)
File "tryton_demo.py", line 302, in setup_product
unit, = Uom.find([('name', '=', 'Unit')])
ValueError: not enough values to unpack (expected 1, got 0)
Which language this you have for the admin user? If you have a diferent language than ‘en’ it will fail to find the Unit values. So you have two options here:
Tried with “en” for admin. (Process really spends many time!)
New result (I don’t know if it’s an error or a warning):
class CaseInsensitiveDict(collections.MutableMapping):
Field action of 131@ir.ui.menu not updated (id: menu_location_form), because it has changed since the last update
Yes, this worked by applying tryton_demo.py just after initializing database with trytond-admin and not customizing anything in until this script completes.
Once this is done, I’ve done following:
customized “admin” account
enabled the rest of modules available (tryton_demo.py only enables ~50% of tryton-modules-all)
Assigned all permissions to demo_* accounts except main “Administration”