Skip to content

Instantly share code, notes, and snippets.

@W360S
Created July 6, 2017 04:55
Show Gist options
  • Save W360S/4f0ef4f140698f9306edb783cbf75837 to your computer and use it in GitHub Desktop.
Save W360S/4f0ef4f140698f9306edb783cbf75837 to your computer and use it in GitHub Desktop.
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 640, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 677, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 333, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/odoo/service/model.py", line 101, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 326, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 935, in __call__
return self.method(*args, **kw)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 506, in response_wrap
response = f(*args, **kw)
File "/home/odoo/en-addons/web/controllers/main.py", line 862, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/home/odoo/en-addons/web/controllers/main.py", line 854, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python2.7/dist-packages/odoo/api.py", line 681, in call_kw
return call_kw_multi(method, model, args, kwargs)
File "/usr/lib/python2.7/dist-packages/odoo/api.py", line 672, in call_kw_multi
result = method(recs, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/odoo/models.py", line 5496, in onchange
record._onchange_eval(name, field_onchange[name], result)
File "/usr/lib/python2.7/dist-packages/odoo/models.py", line 5394, in _onchange_eval
method_res = method(self)
File "/home/odoo/en-addons/mail/wizard/mail_compose_message.py", line 340, in onchange_template_id_wrapper
values = self.onchange_template_id(self.template_id.id, self.composition_mode, self.model, self.res_id)['value']
File "/home/odoo/en-addons/mail/wizard/mail_compose_message.py", line 362, in onchange_template_id
values = self.generate_email_for_composer(template_id, [res_id])[res_id]
File "/home/odoo/en-addons/mail/wizard/mail_compose_message.py", line 499, in generate_email_for_composer
template_values = self.env['mail.template'].with_context(tpl_partners_only=True).browse(template_id).generate_email(res_ids, fields=fields)
File "/home/odoo/oca/social/email_template_qweb/models/mail_template.py", line 24, in generate_email
res_ids, fields=fields
File "/home/odoo/en-addons/mail/models/mail_template.py", line 499, in generate_email
result, format = Template.env['report'].get_pdf([res_id], report_service), 'pdf'
File "/home/odoo/en-addons/report/models/report.py", line 165, in get_pdf
html = self.with_context(context).get_html(docids, report_name, data=data)
File "/home/odoo/en-addons/report/models/report.py", line 139, in get_html
return self.render(report.report_name, docargs)
File "/home/odoo/en-addons/report/models/report.py", line 115, in render
return view_obj.render_template(template, values)
File "/usr/lib/python2.7/dist-packages/odoo/addons/base/ir/ir_ui_view.py", line 1039, in render_template
return self.browse(self.get_view_id(template)).render(values, engine)
File "/home/odoo/en-addons/website/models/ir_ui_view.py", line 110, in render
return super(View, self).render(values, engine=engine)
File "/home/odoo/en-addons/web_editor/models/ir_ui_view.py", line 26, in render
return super(IrUiView, self).render(values=values, engine=engine)
File "/usr/lib/python2.7/dist-packages/odoo/addons/base/ir/ir_ui_view.py", line 1059, in render
return self.env[engine].render(self.id, qcontext)
File "/home/odoo/en-addons/website_version/models/ir_qweb.py", line 43, in render
return super(QWeb, self).render(id_or_xml_id, qwebcontext, loader=loader)
File "/usr/lib/python2.7/dist-packages/odoo/addons/base/ir/ir_qweb/ir_qweb.py", line 53, in render
return super(IrQWeb, self).render(id_or_xml_id, values=values, **context)
File "/usr/lib/python2.7/dist-packages/odoo/addons/base/ir/ir_qweb/qweb.py", line 248, in render
self.compile(template, options)(self, body.append, values or {})
File "/usr/lib/python2.7/dist-packages/odoo/addons/base/ir/ir_qweb/qweb.py", line 317, in _compiled_fn
raise e
QWebException: unsupported operand type(s) for /: 'unicode' and 'float'
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/odoo/addons/base/ir/ir_qweb/qweb.py", line 315, in _compiled_fn
return compiled(self, append, values, options, log)
File "<template>", line 1, in template_general_template_report_sale_order_main_146868
File "<template>", line 3, in body_call_content_146867
File "<template>", line 277, in foreach_146844
File "/usr/lib/python2.7/dist-packages/odoo/addons/base/ir/ir_qweb/ir_qweb.py", line 284, in _get_widget
content = converter.value_to_html(value, field_options)
File "/usr/lib/python2.7/dist-packages/odoo/addons/base/ir/ir_qweb/fields.py", line 324, in value_to_html
formatted_amount = lang.format(fmt, display_currency.round(value),
File "/usr/lib/python2.7/dist-packages/odoo/addons/base/res/res_currency.py", line 93, in round
return tools.float_round(amount, precision_rounding=self.rounding)
File "/usr/lib/python2.7/dist-packages/odoo/tools/float_utils.py", line 52, in float_round
normalized_value = value / rounding_factor # normalize
TypeError: unsupported operand type(s) for /: 'unicode' and 'float'
Error to render compiling AST
TypeError: unsupported operand type(s) for /: 'unicode' and 'float'
Template: general_template.report_sale_order_main
Path: /templates/t/t/div/table/tbody/tr/td/center/table/tr[3]/td/table/tr[3]/t/tr/td[2]/span
Node: <span t-esc="amount_by_group[1]" t-esc-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: o.pricelist_id.currency_id}"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment