Hilfe

0

What is wrong with my command line install of a module?

Avatar
Michael Watchorn

I'm writing a script to install some modules. It starts out alright, but errors out part way through. I can't figure out why this is happening.

Here's my command:

/opt/odoo/odoo-server/odoo.py -d "Dev_testDB1" --addons-path "/opt/odoo/odoo-server/addons,/opt/odoo/odoo-server/addons/custom,/opt/odoo/odoo-server/addons/downloaded" -i "stock"

which should just install the stock module. I can log in to the server and install the module through the web interface without problem. Why is the command line causing problems? (I'm running V8)

Why is it saying I "can't create a user from here"?

/opt/odoo/odoo-server/odoo.py -d "Dev_testDB1" --addons-path "/opt/odoo/odoo-server/addons,/opt/odoo/odoo-server/addons/custom,/opt/odoo/odoo-server/addons/downloaded" -i "stock"
2015-01-09 21:16:49,637 30845 INFO ? openerp: OpenERP version 8.0rc1
2015-01-09 21:16:49,638 30845 INFO ? openerp: addons paths: ['/home/teiadmin/.local/share/Odoo/addons/8.0', u'/opt/odoo/odoo-server/addons', u'/opt/odoo/odoo-server/addons/custom', u'/opt/odoo/odoo-server/addons/downloaded', '/opt/odoo/odoo-server/openerp/addons']
2015-01-09 21:16:49,638 30845 INFO ? openerp: database hostname: localhost
2015-01-09 21:16:49,638 30845 INFO ? openerp: database port: 5432
2015-01-09 21:16:49,638 30845 INFO ? openerp: database user: teiadmin
2015-01-09 21:16:49,803 30845 INFO ? openerp.service.server: HTTP service (werkzeug) running on 0.0.0.0:8069
2015-01-09 21:16:49,814 30845 INFO Dev_testDB1 openerp.modules.loading: loading 1 modules...
2015-01-09 21:16:50,003 30845 INFO Dev_testDB1 openerp.modules.loading: 1 modules loaded in 0.19s, 0 queries
2015-01-09 21:16:50,038 30845 INFO Dev_testDB1 openerp.modules.loading: loading 48 modules...
2015-01-09 21:16:50,137 30845 INFO Dev_testDB1 openerp.addons.report.models.report: You need wkhtmltopdf to print a pdf version of the reports.
2015-01-09 21:16:51,299 30845 INFO Dev_testDB1 openerp.modules.module: module stock: creating or updating database tables
2015-01-09 21:16:52,106 30845 INFO Dev_testDB1 openerp.modules.loading: loading stock/security/stock_security.xml
2015-01-09 21:16:53,086 30845 INFO Dev_testDB1 openerp.modules.loading: loading stock/security/ir.model.access.csv
2015-01-09 21:16:53,353 30845 INFO Dev_testDB1 openerp.modules.loading: loading stock/stock_data.xml
2015-01-09 21:16:53,586 30845 INFO Dev_testDB1 openerp.modules.loading: loading stock/stock_data.yml
2015-01-09 21:16:53,651 30845 INFO Dev_testDB1 openerp.modules.loading: loading stock/wizard/stock_move_view.xml
2015-01-09 21:16:53,701 30845 INFO Dev_testDB1 openerp.modules.loading: loading stock/wizard/stock_change_product_qty_view.xml
2015-01-09 21:16:53,745 30845 INFO Dev_testDB1 openerp.modules.loading: loading stock/wizard/stock_return_picking_view.xml
2015-01-09 21:16:53,839 30845 INFO Dev_testDB1 openerp.modules.loading: loading stock/wizard/make_procurement_view.xml
2015-01-09 21:16:53,870 30845 INFO Dev_testDB1 openerp.modules.loading: loading stock/wizard/orderpoint_procurement_view.xml
2015-01-09 21:16:53,924 30845 INFO Dev_testDB1 openerp.modules.loading: loading stock/stock_incoterms.xml
2015-01-09 21:16:53,975 30845 INFO Dev_testDB1 openerp.modules.loading: loading stock/stock_report.xml
2015-01-09 21:16:54,064 30845 INFO Dev_testDB1 openerp.modules.loading: loading stock/stock_view.xml
2015-01-09 21:16:55,792 30845 INFO Dev_testDB1 openerp.modules.loading: loading stock/stock_sequence.xml
2015-01-09 21:16:55,842 30845 INFO Dev_testDB1 openerp.modules.loading: loading stock/product_view.xml
2015-01-09 21:16:56,171 30845 INFO Dev_testDB1 openerp.modules.loading: loading stock/partner_view.xml
2015-01-09 21:16:56,263 30845 INFO Dev_testDB1 openerp.modules.loading: loading stock/report/report_stock_view.xml
2015-01-09 21:16:56,360 30845 INFO Dev_testDB1 openerp.modules.loading: loading stock/res_config_view.xml
2015-01-09 21:16:56,436 30845 INFO Dev_testDB1 openerp.modules.loading: loading stock/views/report_package_barcode.xml
2015-01-09 21:16:56,457 30845 INFO Dev_testDB1 openerp.modules.loading: loading stock/views/report_lot_barcode.xml
2015-01-09 21:16:56,494 30845 INFO Dev_testDB1 openerp.modules.loading: loading stock/views/report_location_barcode.xml
2015-01-09 21:16:56,529 30845 INFO Dev_testDB1 openerp.modules.loading: loading stock/views/report_stockpicking.xml
2015-01-09 21:16:56,565 30845 INFO Dev_testDB1 openerp.modules.loading: loading stock/views/report_stockinventory.xml
2015-01-09 21:16:56,624 30845 INFO Dev_testDB1 openerp.modules.loading: loading stock/views/stock.xml
2015-01-09 21:16:56,718 30845 INFO Dev_testDB1 openerp.modules.loading: loading stock/stock_demo_pre.yml
2015-01-09 21:16:56,802 30845 INFO Dev_testDB1 openerp.modules.loading: loading stock/stock_demo.xml
2015-01-09 21:16:56,808 30845 CRITICAL Dev_testDB1 openerp.service.server: Failed to initialize database `Dev_testDB1`.
Traceback (most recent call last):
  File "/opt/odoo/odoo-server/openerp/service/server.py", line 901, in preload_registries
    registry = RegistryManager.new(dbname, update_module=update_module)
  File "/opt/odoo/odoo-server/openerp/modules/registry.py", line 322, in new
    openerp.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/opt/odoo/odoo-server/openerp/modules/loading.py", line 353, in load_modules
    force, status, report, loaded_modules, update_module)
  File "/opt/odoo/odoo-server/openerp/modules/loading.py", line 263, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "/opt/odoo/odoo-server/openerp/modules/loading.py", line 185, in load_module_graph
    _load_data(cr, module_name, idref, mode, kind='demo')
  File "/opt/odoo/odoo-server/openerp/modules/loading.py", line 118, in _load_data
    tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
  File "/opt/odoo/odoo-server/openerp/tools/convert.py", line 984, in convert_file
    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
  File "/opt/odoo/odoo-server/openerp/tools/convert.py", line 1070, in convert_xml_import
    obj.parse(doc.getroot())
  File "/opt/odoo/odoo-server/openerp/tools/convert.py", line 937, in parse
    self._tags[rec.tag](self.cr, rec, n)
  File "/opt/odoo/odoo-server/openerp/tools/convert.py", line 855, in _tag_record
    id = self.pool['ir.model.data']._update(cr, self.uid, rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode, context=rec_context )
  File "/opt/odoo/odoo-server/openerp/api.py", line 204, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/odoo-server/openerp/addons/base/ir/ir_model.py", line 1027, in _update
    res_id = model_obj.create(cr, uid, values, context=context)
  File "/opt/odoo/odoo-server/openerp/api.py", line 204, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/odoo-server/addons/auth_signup/res_users.py", line 302, in create
    user_id = super(res_users, self).create(cr, uid, values, context=context)
  File "/opt/odoo/odoo-server/openerp/api.py", line 204, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/odoo-server/addons/mail/res_users.py", line 75, in create
    raise openerp.exceptions.RedirectWarning(msg, action_id, _('Go to the configuration panel'))
ParseError: "You cannot create a new user from here.
 To create new user please go to configuration panel.
76
Go to the configuration panel" while parsing /opt/odoo/odoo-server/addons/stock/stock_demo.xml:5, near
<record id="base.user_demo" model="res.users">
            <field eval="[(4, ref('group_stock_user'))]" name="groups_id"/>
        </record>

 

Avatar
Verwerfen
3 Antworten
0
Avatar
Med Said BARA
Best Answer

You are installing "stock" with "Demo Data", which needs to create a "user" !!!

Avatar
Verwerfen
0
Avatar
Mahmoud
Best Answer

You may delete or deactive the demo user in the users ... the demo user is required to install the demo data

you should recreate the demo user

Avatar
Verwerfen
0
Avatar
john5000
Best Answer

Check that the addons path is correct and that you're not picking up a different version of the stock module.

Avatar
Verwerfen