POS Membership Management in Odoo SO2020/1248771 (#65)
Status: OPEN
Date: 09/12/2020
Assigned to
Contact
Ujjaval Patel
ujjavalpatel@browseinfo.in

Description
Hello,

we got Errors on :

Print

"Membership Card Front Image"

"Membership Card Full Front Image"
"Membership Card Back Image"
"Membership Card Full Back Image" :

Error:

Odoo Server Error



Traceback (most recent call last):

File "/opt/odoo14/odoo/api.py", line 790, in get

return field_cache[record._ids[0]]

KeyError: 1



During handling of the above exception, another exception occurred:



Traceback (most recent call last):

File "/opt/odoo14/odoo/fields.py", line 948, in __get__

value = env.cache.get(record, self)

File "/opt/odoo14/odoo/api.py", line 793, in get

raise CacheMiss(record, field)

odoo.exceptions.CacheMiss: 'pos.membership.front.image(1,).membership_template'



During handling of the above exception, another exception occurred:



Traceback (most recent call last):

File "/opt/odoo14/odoo/addons/base/models/qweb.py", line 331, in _compiled_fn

return compiled(self, append, new, options, log)

File "<template>", line 1, in template_pos_membership_odoo_report_pos_membership_card_front_image_2046

File "<template>", line 2, in body_call_content_2044

File "<template>", line 3, in foreach_2043

File "/opt/odoo14/odoo/fields.py", line 2445, in __get__

return super().__get__(records, owner)

File "/opt/odoo14/odoo/fields.py", line 982, in __get__

_("(Record: %s, User: %s)") % (record, env.uid),

odoo.exceptions.MissingError: Record does not exist or has been deleted.

(Record: pos.membership.front.image(1,), User: 2)



During handling of the above exception, another exception occurred:



Traceback (most recent call last):

File "/opt/odoo14/addons/web/controllers/main.py", line 2106, in report_download

response = self.report_routes(reportname, docids=docids, converter=converter, context=context)

File "/opt/odoo14/odoo/http.py", line 531, in response_wrap

response = f(*args, **kw)

File "/opt/odoo14/addons/web/controllers/main.py", line 2041, in report_routes

pdf = report.with_context(context)._render_qweb_pdf(docids, data=data)[0]

File "/opt/odoo14/odoo/addons/base/models/ir_actions_report.py", line 769, in _render_qweb_pdf

html = self_sudo.with_context(context)._render_qweb_html(res_ids, data=data)[0]

File "/opt/odoo14/odoo/addons/base/models/ir_actions_report.py", line 809, in _render_qweb_html

return self._render_template(self.sudo().report_name, data), 'html'

File "/opt/odoo14/odoo/addons/base/models/ir_actions_report.py", line 580, in _render_template

return view_obj._render_template(template, values)

File "/opt/odoo14/odoo/addons/base/models/ir_ui_view.py", line 1708, in _render_template

return self.browse(self.get_view_id(template))._render(values, engine)

File "/opt/odoo14/addons/web_editor/models/ir_ui_view.py", line 28, in _render

return super(IrUiView, self)._render(values=values, engine=engine, minimal_qcontext=minimal_qcontext)

File "/opt/odoo14/odoo/addons/base/models/ir_ui_view.py", line 1716, in _render

return self.env[engine]._render(self.id, qcontext)

File "/opt/odoo14/odoo/addons/base/models/ir_qweb.py", line 55, in _render

result = super(IrQWeb, self)._render(id_or_xml_id, values=values, **context)

File "/opt/odoo14/odoo/addons/base/models/qweb.py", line 258, in _render

self.compile(template, options)(self, body.append, values or {})

File "/opt/odoo14/odoo/addons/base/models/qweb.py", line 338, in _compiled_fn

raise QWebException("Error to render compiling AST", e, path, node and etree.tostring(node[0], encoding='unicode'), name)

odoo.addons.base.models.qweb.QWebException: Record does not exist or has been deleted.

(Record: pos.membership.front.image(1,), User: 2)

Traceback (most recent call last):

File "/opt/odoo14/odoo/api.py", line 790, in get

return field_cache[record._ids[0]]

KeyError: 1



During handling of the above exception, another exception occurred:



Traceback (most recent call last):

File "/opt/odoo14/odoo/fields.py", line 948, in __get__

value = env.cache.get(record, self)

File "/opt/odoo14/odoo/api.py", line 793, in get

raise CacheMiss(record, field)

odoo.exceptions.CacheMiss: 'pos.membership.front.image(1,).membership_template'



During handling of the above exception, another exception occurred:



Traceback (most recent call last):

File "/opt/odoo14/odoo/addons/base/models/qweb.py", line 331, in _compiled_fn

return compiled(self, append, new, options, log)

File "<template>", line 1, in template_pos_membership_odoo_report_pos_membership_card_front_image_2046

File "<template>", line 2, in body_call_content_2044

File "<template>", line 3, in foreach_2043

File "/opt/odoo14/odoo/fields.py", line 2445, in __get__

return super().__get__(records, owner)

File "/opt/odoo14/odoo/fields.py", line 982, in __get__

_("(Record: %s, User: %s)") % (record, env.uid),

odoo.exceptions.MissingError: Record does not exist or has been deleted.

(Record: pos.membership.front.image(1,), User: 2)



Error to render compiling AST

MissingError: Record does not exist or has been deleted.

(Record: pos.membership.front.image(1,), User: 2)

Template: pos_membership_odoo.report_pos_membership_card_front_image

Path: /t/t/t/t[1]

Node: <t t-if="o.membership_template">

<div class="page">

<t t-if="o.membership_template.card_front_image">

<div style="margin-left:auto;margin-right:auto;">

<div class="img img-responsive">

<img t-if="o.membership_template.card_front_image" t-att-src="'data:image/png;base64,%s' % to_text(o.membership_template.card_front_image)" t-attf-style="border-radius: 15px;display:block;width: #{o.membership_template.label_width or '100'}% ; height: #{o.membership_template.label_hight or '100'}px ;"/>

</div>

</div>

</t>

<t t-if="not o.membership_template.card_front_image">

<div class="row" style="background:yellow !important;">

<div class="img img-responsive">

<img src="/pos_membership_odoo/static/src/img/comman.jpg" style="width:100%;"/>

</div>

<div class="col-xs-12 ml8" style="position:absolute;top:20px;right:50px;left:200px;max-width:50%;">

<img t-att-src="'data:image/png;base64,%s' % to_text(o.partner_id.company_id.logo)" style="max-width:60%;"/>

<br/>

<span t-field="o.partner_id.company_id.name" style="color:white !important;"/>

<br/>

<span t-field="o.partner_id.company_id.street" style="color:white !important;"/>

<span t-field="o.partner_id.company_id.street2" style="color:white !important;"/>

<br/>

<span t-field="o.partner_id.company_id.city" style="color:white !important;"/>

</div>

</div>

</t>

</div>

</t>



Message and communication history