minhng92 / odoo-14-docker-compose

Set up Odoo 14 (released 2020) quickly for development/production using Docker Compose.
90 stars 99 forks source link

Cannot install eCommerce module and or event ticketing sales module #5

Open JGStyle opened 3 years ago

JGStyle commented 3 years ago

im not sure wether it has something to do with the docker installation or just a bad configuration from my side but when trying to install the eCommerce module or the event online sales module, the following error appears

Fehler:
Odoo Server Error

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 677, in _tag_root
    f(rec)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 580, in _tag_record
    record = model._load_records([data], self.mode == 'update')
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 4200, in _load_records
    data['record']._load_records_write(data['values'])
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 4137, in _load_records_write
    self.write(values)
  File "/usr/lib/python3/dist-packages/odoo/addons/website_sale/models/product.py", line 63, in write
    self._check_website_pricelist()
  File "/usr/lib/python3/dist-packages/odoo/addons/website_sale/models/product.py", line 90, in _check_website_pricelist
    raise UserError(_("With this action, '%s' website would not have any pricelist available.") % (website.name))
odoo.exceptions.UserError: With this action, 'CENSORED' website would not have any pricelist available.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 683, in dispatch
    result = self._call_function(**self.params)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 359, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 347, in checked_call
    result = self.endpoint(*a, **kw)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 912, in __call__
    return self.method(*args, **kw)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 531, in response_wrap
    response = f(*args, **kw)
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1393, in call_button
    action = self._call_kw(model, method, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1381, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 396, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 383, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "<decorator-gen-72>", line 2, in button_immediate_install
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 73, in check_and_log
    return method(self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 474, in button_immediate_install
    return self._button_immediate_function(type(self).button_install)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 592, in _button_immediate_function
    modules.registry.Registry.new(self._cr.dbname, update_module=True)
  File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 89, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 455, in load_modules
    loaded_modules, update_module, models_to_check)
  File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 348, in load_marked_modules
    perform_checks=perform_checks, models_to_check=models_to_check
  File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 221, in load_module_graph
    load_data(cr, idref, mode, kind='data', package=package)
  File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 69, in load_data
    tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 733, in convert_file
    convert_xml_import(cr, module, fp, idref, mode, noupdate)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 799, in convert_xml_import
    obj.parse(doc.getroot())
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 719, in parse
    self._tag_root(de)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 677, in _tag_root
    f(rec)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 685, in _tag_root
    )) from e
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 639, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 315, in _handle_exception
    raise exception.with_traceback(None) from new_cause
odoo.tools.convert.ParseError: while parsing /usr/lib/python3/dist-packages/odoo/addons/website_sale/data/data.xml:44, near
<record model="product.pricelist" id="product.list0">
            <field name="selectable" eval="True"/>
            <field name="website_id" eval="False"/>
        </record>

it would be extremely nice if you knew anything on how to fix this issue, thanks

minhng92 commented 3 years ago

Hi @JGStyle ,

I also cannot install eCommerce module on my local Odoo. It's failed to install the module.

Then I upgrade the Odoo image to the latest one (there is a new update a few days ago, check it out @ https://hub.docker.com/_/odoo). The command:

docker-compose pull

After that, I install eCommerce and Event modules smoothly.

In short, try to upgrade the Odoo image. Hope it works.

JGStyle commented 3 years ago

Thank you @minhng92 ! Will upgrading conflict with my existing data? I already have important data as well as my own modules → will they still exist?

minhng92 commented 3 years ago

Thank you @minhng92 ! Will upgrading conflict with my existing data? I already have important data as well as my own modules → will they still exist?

It means you're on production! Basically, please backup entire your production before doing anything that you think it may harm the data(base). Odoo allows to backup database(s) on UI at: /web/database/manager

I give the solution but I don't have responsibility on your data. Upgrading means you pull a later version of Odoo (still Odoo 14), so I guess it will not affect the existing data.

If you're not sure about that, please try on a sandbox (another machine) before applying to the production.

JGStyle commented 3 years ago

I upgraded the docker image, yet I get the following error when trying to install the eCommerce module

Fehler:
Odoo Server Error

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 677, in _tag_root
    f(rec)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 580, in _tag_record
    record = model._load_records([data], self.mode == 'update')
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 4202, in _load_records
    data['record']._load_records_write(data['values'])
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 4139, in _load_records_write
    self.write(values)
  File "/usr/lib/python3/dist-packages/odoo/addons/website_sale/models/product.py", line 63, in write
    self._check_website_pricelist()
  File "/usr/lib/python3/dist-packages/odoo/addons/website_sale/models/product.py", line 90, in _check_website_pricelist
    raise UserError(_("With this action, '%s' website would not have any pricelist available.") % (website.name))
odoo.exceptions.UserError: With this action, 'censored' website would not have any pricelist available.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 684, in dispatch
    result = self._call_function(**self.params)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 360, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 348, in checked_call
    result = self.endpoint(*a, **kw)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 913, in __call__
    return self.method(*args, **kw)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 532, in response_wrap
    response = f(*args, **kw)
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1393, in call_button
    action = self._call_kw(model, method, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1381, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 396, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 383, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "<decorator-gen-71>", line 2, in button_immediate_install
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 74, in check_and_log
    return method(self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 475, in button_immediate_install
    return self._button_immediate_function(type(self).button_install)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 593, in _button_immediate_function
    modules.registry.Registry.new(self._cr.dbname, update_module=True)
  File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 89, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 460, in load_modules
    loaded_modules, update_module, models_to_check)
  File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 348, in load_marked_modules
    perform_checks=perform_checks, models_to_check=models_to_check
  File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 221, in load_module_graph
    load_data(cr, idref, mode, kind='data', package=package)
  File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 69, in load_data
    tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 733, in convert_file
    convert_xml_import(cr, module, fp, idref, mode, noupdate)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 799, in convert_xml_import
    obj.parse(doc.getroot())
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 719, in parse
    self._tag_root(de)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 677, in _tag_root
    f(rec)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 685, in _tag_root
    )) from e
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 640, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 316, in _handle_exception
    raise exception.with_traceback(None) from new_cause
odoo.tools.convert.ParseError: while parsing /usr/lib/python3/dist-packages/odoo/addons/website_sale/data/data.xml:44, near
<record model="product.pricelist" id="product.list0">
            <field name="selectable" eval="True"/>
            <field name="website_id" eval="False"/>
        </record>

do you have any other idea as to why this might be happening?