it-projects-llc / odoo-saas-tools

Odoo SaaS Tools — tools for SaaS Businesses. Sale and manage Odoo databases.
https://saas.it-projects.info
GNU Lesser General Public License v3.0
566 stars 579 forks source link

AssertionError: Element openerp has extra content: data, line 3 #736

Closed W360S closed 6 years ago

W360S commented 6 years ago

Hi, im trying to test with v11 and get that error anyone has same? Error: Odoo Server Error

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/odoo/http.py", line 646, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/usr/lib/python3/dist-packages/odoo/http.py", line 307, in _handle_exception raise pycompat.reraise(type(exception), exception, sys.exc_info()[2]) File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 87, in reraise raise value 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 339, in _call_function return checked_call(self.db, *args, *kwargs) File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 97, in wrapper return f(dbname, args, kwargs) File "/usr/lib/python3/dist-packages/odoo/http.py", line 332, in checked_call result = self.endpoint(*a, kw) File "/usr/lib/python3/dist-packages/odoo/http.py", line 927, in call return self.method(*args, *kw) File "/usr/lib/python3/dist-packages/odoo/http.py", line 512, in response_wrap response = f(args, kw) File "/home/en-addons/addons/web/controllers/main.py", line 928, in call_button action = self._call_kw(model, method, args, {}) File "/home/en-addons/addons/web/controllers/main.py", line 916, in _call_kw return call_kw(request.env[model], method, args, kwargs) File "/usr/lib/python3/dist-packages/odoo/api.py", line 689, in call_kw return call_kw_multi(method, model, args, kwargs) File "/usr/lib/python3/dist-packages/odoo/api.py", line 680, in call_kw_multi result = method(recs, *args, *kwargs) File "", line 2, in button_immediate_install File "/home/en-addons/addons/base/module/module.py", line 71, in check_and_log return method(self, args, **kwargs) File "/home/en-addons/addons/base/module/module.py", line 446, in button_immediate_install return self._button_immediate_function(type(self).button_install) File "/home/en-addons/addons/base/module/module.py", line 539, 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 85, in new odoo.modules.load_modules(registry._db, force_demo, status, update_module) File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 343, in load_modules loaded_modules, update_module) File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 242, in load_marked_modules loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks) File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 156, in load_module_graph _load_data(cr, module_name, idref, mode, kind='data') File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 94, in _load_data tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report) File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 788, in convert_file convert_xml_import(cr, module, fp, idref, mode, noupdate, report) File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 836, in convert_xmlimport relaxng.assert(doc) File "src/lxml/lxml.etree.pyx", line 3501, in lxml.etree.Validator.assert (src/lxml/lxml.etree.c:194922) AssertionError: Element openerp has extra content: data, line 3

gridworkz commented 6 years ago

Hi: Yes, I got this error as well. I fixed it but I need to dig into which file it was. Which module is giving you this message? Cheers, Dave

gridworkz commented 6 years ago

I was getting the error when installing the saas_portal_start module. Edit line 18 of

..addons/saas_portal_start/views/website.xml => and remove page="True"

Dave

gridworkz commented 6 years ago

It's also in ..addons/saas_portal_templates/views/website.xml

W360S commented 6 years ago

thank will try

W360S commented 6 years ago

yeap it work, totally forgot that page no longer require in v11 :)

W360S commented 6 years ago

fixed #738 #737

gridworkz commented 6 years ago

Great! You'll hit another bug/change in module: website_sale_stock_status

CRON declarations have changed in v11.

Edit ../addons/website_sale_stock_status/website_sale_stock_status_data.xml

This is the new Cron setup:

<data noupdate="1">
    <record id="ir_cron_update_ribbons" model="ir.cron">
        <field name="name">Update product stock status</field>
        <field name="model_id" ref="product.model_product_template"/>
        <field name="state">code</field>
        <field name="code">model.update_stock_status_all()</field>
        <field name="user_id" ref="base.user_root"/>
        <field name="interval_number">1</field>
        <field name="interval_type">hours</field>
        <field name="numbercall">-1</field>
        <field eval="False" name="doall"/>
    </record>
</data>

Cheers, Dave

On Sat, Jan 27, 2018 at 2:22 AM, World 360° Services < notifications@github.com> wrote:

fixed #738 https://github.com/it-projects-llc/odoo-saas-tools/pull/738

737 https://github.com/it-projects-llc/odoo-saas-tools/pull/737

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/it-projects-llc/odoo-saas-tools/issues/736#issuecomment-360966580, or mute the thread https://github.com/notifications/unsubscribe-auth/ASt2yGaojwP6ei7g_DDAlASl7WX9fm4Vks5tOs6ygaJpZM4RuAdu .

gridworkz commented 6 years ago

I think the only other changes I made were the following in: ../addons/saas_portal_demo module (a few changes)

1) views/templates.xml

=> to <xpath expr="//div[@class='row']" position="after">

2) views/saas_portal_demo_templates.xml

=> <xpath expr="//ul[contains(@class,'o_portal_submenu')]" position="inside"> to <xpath expr="//ol[contains(@class,'o_portal_submenu')]" position="inside"> => <xpath expr="//div[contains(@class,'o_my_home_content')]" position="inside"> to <xpath expr="//div[contains(@class,'o_portal')]" position="inside">

3) data/ir_cron.xml (re-formatted using new model_id for v11)

<?xml version="1.0" encoding="utf-8"?>

Update repositories with demo code model.update_repositories() 1 days -1 Restart server with demo code model.restart_server() 1 days -1 Update templates for demo code model.update_all_templates() 1 days -1

So that covers pretty much all saasportal* modules and their dependencies (I didn't do saas_portal_backup - I use AWS for all that). Also, saas_server ran fine out of the box so far. These changes got me a functioning saas system on Odoo v11. I'm still testing....so far so good.

Cheers, Dave

On Sat, Jan 27, 2018 at 11:35 AM, Dave Cook dave@gridworkz.com wrote:

Great! You'll hit another bug/change in module: website_sale_stock_status

CRON declarations have changed in v11.

Edit ../addons/website_sale_stock_status/website_salestock status_data.xml

This is the new Cron setup:

<data noupdate="1">
    <record id="ir_cron_update_ribbons" model="ir.cron">
        <field name="name">Update product stock status</field>
        <field name="model_id" ref="product.model_product_template"/>
        <field name="state">code</field>
        <field name="code">model.update_stock_status_all()</field>
        <field name="user_id" ref="base.user_root"/>
        <field name="interval_number">1</field>
        <field name="interval_type">hours</field>
        <field name="numbercall">-1</field>
        <field eval="False" name="doall"/>
    </record>
</data>

Cheers, Dave

On Sat, Jan 27, 2018 at 2:22 AM, World 360° Services < notifications@github.com> wrote:

fixed #738 https://github.com/it-projects-llc/odoo-saas-tools/pull/738

737 https://github.com/it-projects-llc/odoo-saas-tools/pull/737

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/it-projects-llc/odoo-saas-tools/issues/736#issuecomment-360966580, or mute the thread https://github.com/notifications/unsubscribe-auth/ASt2yGaojwP6ei7g_DDAlASl7WX9fm4Vks5tOs6ygaJpZM4RuAdu .

W360S commented 6 years ago

Hi @gridworkz I have checked and fixed some of them :) that work for me now but still get an error from the log 2018-01-28 08:01:03,895 2404 ERROR ? odoo.http: Exception during JSON request handling. Traceback (most recent call last): File "/usr/lib/python3/dist-packages/odoo/http.py", line 646, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/usr/lib/python3/dist-packages/odoo/http.py", line 307, in _handle_exception raise pycompat.reraise(type(exception), exception, sys.exc_info()[2]) File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 87, in reraise raise value File "/usr/lib/python3/dist-packages/odoo/http.py", line 1442, in _dispatch_nodb func, arguments = self.nodb_routing_map.bind_to_environ(request.httprequest.environ).match() File "/usr/local/lib/python3.6/dist-packages/werkzeug/routing.py", line 1563, in match raise NotFound() werkzeug.exceptions.NotFound: 404: Not Found so you have somethings same?

gridworkz commented 6 years ago

Hi:

hmmm, I haven't seen that one. I'm running on Ubuntu 16.04 and python 3.5.2. Does this happen when you restart Odoo?

Cheers, Dave

On Sun, Jan 28, 2018 at 3:04 AM, World 360° Services < notifications@github.com> wrote:

Hi @gridworkz https://github.com/gridworkz I have checked and fixed some of them :) that work for me now but still get an error from the log 2018-01-28 08:01:03,895 2404 ERROR ? odoo.http: Exception during JSON request handling. Traceback (most recent call last): File "/usr/lib/python3/dist-packages/odoo/http.py", line 646, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/usr/lib/python3/dist-packages/odoo/http.py", line 307, in _handle_exception raise pycompat.reraise(type(exception), exception, sys.exc_info()[2]) File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 87, in reraise raise value File "/usr/lib/python3/dist-packages/odoo/http.py", line 1442, in _dispatch_nodb func, arguments = self.nodb_routing_map.bindto environ(request.httprequest.environ).match() File "/usr/local/lib/python3.6/dist-packages/werkzeug/routing.py", line 1563, in match raise NotFound() werkzeug.exceptions.NotFound: 404: Not Found so you have somethings same?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/it-projects-llc/odoo-saas-tools/issues/736#issuecomment-361045401, or mute the thread https://github.com/notifications/unsubscribe-auth/ASt2yMT9lvLKop6V7_WPrLPceLtRT9PTks5tPCoAgaJpZM4RuAdu .

gridworkz commented 6 years ago

Hi:

I found something similar here: https://www.odoo.com/forum/help-1/question/error-notfound-404-not-found-73702

I'm sure you've tried clearing the cache and all that. Looks like a routing issue with locating the dbs.

Cheers, Dave

On Sun, Jan 28, 2018 at 3:04 AM, World 360° Services < notifications@github.com> wrote:

Hi @gridworkz https://github.com/gridworkz I have checked and fixed some of them :) that work for me now but still get an error from the log 2018-01-28 08:01:03,895 2404 ERROR ? odoo.http: Exception during JSON request handling. Traceback (most recent call last): File "/usr/lib/python3/dist-packages/odoo/http.py", line 646, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/usr/lib/python3/dist-packages/odoo/http.py", line 307, in _handle_exception raise pycompat.reraise(type(exception), exception, sys.exc_info()[2]) File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 87, in reraise raise value File "/usr/lib/python3/dist-packages/odoo/http.py", line 1442, in _dispatch_nodb func, arguments = self.nodb_routing_map.bindto environ(request.httprequest.environ).match() File "/usr/local/lib/python3.6/dist-packages/werkzeug/routing.py", line 1563, in match raise NotFound() werkzeug.exceptions.NotFound: 404: Not Found so you have somethings same?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/it-projects-llc/odoo-saas-tools/issues/736#issuecomment-361045401, or mute the thread https://github.com/notifications/unsubscribe-auth/ASt2yMT9lvLKop6V7_WPrLPceLtRT9PTks5tPCoAgaJpZM4RuAdu .