Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[11.0][web_responsive]Latest commit make a break inside this theme #67

Open
SalahAdDin opened this issue Aug 3, 2018 · 9 comments
Open

Comments

@SalahAdDin
Copy link
Contributor

SalahAdDin commented Aug 3, 2018

I am using this theme for my client and it is great, but i got the next bug today after update all addons:

docker exec -it odoo.web /bin/bash
odoo@983425fe5a7c:/$ cat var/log/odoo/openerp-server.log
2018-08-03 13:47:26,866 73 WARNING ? odoo.addons.base.ir.ir_cron: Exception in cron:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_cron.py", line 258, in _acquire_job
    cls._process_jobs(db_name)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_cron.py", line 172, in _process_jobs
    (version,) = cr.fetchone()
TypeError: 'NoneType' object is not iterable
2018-08-03 13:47:27,854 74 WARNING ? odoo.addons.base.ir.ir_cron: Exception in cron:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_cron.py", line 258, in _acquire_job
    cls._process_jobs(db_name)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_cron.py", line 172, in _process_jobs
    (version,) = cr.fetchone()
TypeError: 'NoneType' object is not iterable
2018-08-03 13:53:27,043 67 ERROR rotafilo werkzeug: Error on request:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 205, in run_wsgi
    execute(self.server.app)
  File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 193, in execute
    application_iter = app(environ, start_response)
  File "/usr/lib/python3/dist-packages/odoo/service/wsgi_server.py", line 166, in application
    return application_unproxied(environ, start_response)
  File "/usr/lib/python3/dist-packages/odoo/service/wsgi_server.py", line 154, in application_unproxied
    result = handler(environ, start_response)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1318, in __call__
    return self.dispatch(environ, start_response)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1292, in __call__
    return self.app(environ, start_wrapped)
  File "/usr/lib/python3/dist-packages/werkzeug/wsgi.py", line 599, in __call__
    return self.app(environ, start_response)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1490, in dispatch
    result = ir_http._dispatch()
  File "/usr/lib/python3/dist-packages/odoo/addons/auth_signup/models/ir_http.py", line 19, in _dispatch
    return super(Http, cls)._dispatch()
  File "/usr/lib/python3/dist-packages/odoo/addons/web_editor/models/ir_http.py", line 22, in _dispatch
    return super(IrHttp, cls)._dispatch()
  File "/usr/lib/python3/dist-packages/odoo/addons/http_routing/models/ir_http.py", line 393, in _dispatch
    result = super(IrHttp, cls)._dispatch()
  File "/usr/lib/python3/dist-packages/odoo/addons/utm/models/ir_http.py", line 26, in _dispatch
    response = super(IrHttp, cls)._dispatch()
  File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_http.py", line 212, in _dispatch
    return cls._handle_exception(e)
  File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_http.py", line 169, in _handle_exception
    return super(Http, cls)._handle_exception(exception)
  File "/usr/lib/python3/dist-packages/odoo/addons/utm/models/ir_http.py", line 31, in _handle_exception
    response = super(IrHttp, cls)._handle_exception(exc)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_http.py", line 182, in _handle_exception
    return request._handle_exception(exception)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 770, in _handle_exception
    return super(HttpRequest, self)._handle_exception(exception)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 310, 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/addons/base/ir/ir_http.py", line 208, in _dispatch
    result = request.dispatch()
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 829, in dispatch
    r = self._call_function(**self.params)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 342, 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 338, in checked_call
    result.flatten()
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1269, in flatten
    self.response.append(self.render())
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1262, in render
    return env["ir.ui.view"].render_template(self.template, self.qcontext)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_ui_view.py", line 1195, in render_template
    return self.browse(self.get_view_id(template)).render(values, engine)
  File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_ui_view.py", line 113, in render
    return super(View, self).render(values, engine=engine)
  File "/usr/lib/python3/dist-packages/odoo/addons/web_editor/models/ir_ui_view.py", line 27, in render
    return super(IrUiView, self).render(values=values, engine=engine)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_ui_view.py", line 1204, in render
    return self.env[engine].render(self.id, qcontext)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_qweb/ir_qweb.py", line 57, in render
    return super(IrQWeb, self).render(id_or_xml_id, values=values, **context)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_qweb/qweb.py", line 271, in render
    self.compile(template, options)(self, body.append, values or {})
  File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_qweb/qweb.py", line 349, in _compiled_fn
    raise QWebException("Error to render compiling AST", e, path, node and etree.tostring(node[0], encoding='unicode'), name)
odoo.addons.base.ir.ir_qweb.qweb.QWebException: 'chatter_position'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_qweb/qweb.py", line 342, in _compiled_fn
    return compiled(self, append, new, options, log)
  File "<template>", line 1, in template_171_12
  File "<template>", line 2, in body_call_content_11
KeyError: 'chatter_position'

Error to render compiling AST
KeyError: 'chatter_position'
Template: 171
Path: /templates/t/t/div
Node: <div class="o_main" t-attf-class="o_main o_chatter_position_{{ json.loads(session_info)['chatter_position'] }}">
                
            <div id="app-sidebar" class="app-sidebar-panel">
                <div class="app-sidebar navbar-collapse collapse">
                    <ul id="sidebar" class="app-sidebar-menu">
                        <li class="nav-item" t-as="menu" t-foreach="menu_data['children']">
                            <t t-set="debug_param" t-value="''"/>
                            <a t-att-href="'/web%s#menu_id=%s&amp;action=' % (debug_param, menu['id'])" t-att-class="'nav-link nav-toggle' if menu.get('children') else 'nav-link '" t-att-data-menu="menu['id']" t-att-data-menu-xmlid="menu.get('xmlid')" t-att-data-action-model="menu['action'] and menu['action'].split(',')[0] or None" t-att-data-action-id="menu['action'] and menu['action'].split(',')[1] or None">
                                <img t-attf-src="/web/image/ir.ui.menu/{{ menu['id'] }}/web_icon_data" t-att-alt="menu['name']" class="app-sidebar-menuitem" t-att-title="menu['name']"/>
                                <span class="title">
                                    <t t-esc="menu['name']"/>
                                </span>
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        <div class="o_main_content"/>
            </div>

Searching deep in this bug i found the involucred line:
lineaconelproblema

And also i saw in web_responsive because i found that chatter_position is related with that module; so, i found the last commit development related and i found the change that broke this theme:

            <attribute name="t-attf-class">o_main o_chatter_position_{{ json.loads(session_info)['chatter_position'] }}</attribute>
            <attribute name="t-attf-class">o_main o_chatter_position_{{ request.env.user.chatter_position or 'normal' }}</attribute>

So, how can we solve this problem?

SalahAdDin referenced this issue in OCA/web Aug 3, 2018
* [IMP] Chatter Position
* [IMP] Clean unused stuff
* [IMP] FieldStatus hidden-xs
* [IMP] Improvements suggested in #540
* [WIP] Suggested changes
* [WIP] Improve FieldStatus-Responsive
* [IMP] Statusbar Buttons & FieldStatus
* [IMP] Statusbar Buttons Style
* [IMP] Button 'Task' style
@SalahAdDin
Copy link
Contributor Author

I found that this problem appears only in an existing database with this module installed, i tested it with a clean database with demo data an all works well:
migracionbasededatoslimpia

@mgielissen
Copy link
Contributor

I think the sidechatter can be removed in the theme because web_responsive now handles it.

@SalahAdDin
Copy link
Contributor Author

what does it mean?

@jchanme
Copy link

jchanme commented Aug 8, 2018

I had the same problem every time I updated some app, update solved my problems. Just stop the server and start the server by adding a parameter to the end: "--update all" (without quotes). Mine is /opt/odoo/odoo-bin -c /etc/odoo-server.conf --update all
After the update is done, restart your server normally.

@SalahAdDin
Copy link
Contributor Author

--update=all or --update-all?

@jchanme
Copy link

jchanme commented Aug 8, 2018

--update all

@SalahAdDin
Copy link
Contributor Author

SalahAdDin commented Aug 9, 2018

@jchanme, unfortunately, i couldn't test that command, it seems my database is totally incompatible with the current modules' state; but i will use it since now.

How can i put that option in the default configuration file?

@Boss1669
Copy link

Have you found a solution am facing this issue too

@ghost
Copy link

ghost commented Aug 11, 2018

same issue. after downgrading this and web_responsive running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants