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

Error in report_saleorder.xml template #277

Open
readylan opened this issue Jul 2, 2024 · 1 comment
Open

Error in report_saleorder.xml template #277

readylan opened this issue Jul 2, 2024 · 1 comment
Labels

Comments

@readylan
Copy link

readylan commented Jul 2, 2024

Module

sale_comment_template

Describe the bug

Installation is ok, but when you try to print a sale order with comments it raises an error because de template has an erroneous expression (

)

To Reproduce

Affected versions: 14.0

Steps to reproduce the behavior:

  1. Install module
  2. Create a template from Sales > Configuration > Comments..
  3. Create / edit a sale order and link created comments above.
  4. Print sale order report

Expected behavior
Sale order report must print configured "Comments" (on top/bottom as defined) but it raises an error:
Odoo Server Error
Traceback (most recent call last):
File "/odoo/odoo-server/odoo/addons/base/models/qweb.py", line 331, in _compiled_fn
return compiled(self, append, new, options, log)
File "", line 1, in template_sale_report_saleorder_document_1838
File "", line 2, in body_call_content_1836
File "", line 1, in foreach_1835
AttributeError: 'sale.order' object has no attribute 'render_comment'

Additional context
There are other related modules (account_comment_template) running fine. The problem is in module template (sale_comment_template/views/report_saleorder.xml):

THIS ONE FAILS
THIS ONE RUNS

@readylan readylan added the bug label Jul 2, 2024
@readylan
Copy link
Author

readylan commented Jul 2, 2024

the current code that fails:
<div t-raw="doc.render_comment(comment_template_top)" />
the sugested code than runs:
<div t-raw="comment_template_top.text" />

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

No branches or pull requests

1 participant