3
3
< html xmlns ="http://www.w3.org/1999/xhtml " xml:lang ="en " lang ="en ">
4
4
< head >
5
5
< meta http-equiv ="Content-Type " content ="text/html; charset=utf-8 " />
6
- < meta name ="generator " content ="Docutils 0.15.1 : http://docutils.sourceforge.net/ " />
6
+ < meta name ="generator " content ="Docutils: http://docutils.sourceforge.net/ " />
7
7
< title > Base Comments Templates</ title >
8
8
< style type ="text/css ">
9
9
@@ -366,8 +366,10 @@ <h1 class="title">Base Comments Templates</h1>
366
366
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
367
367
!! This file is generated by oca-gen-addon-readme !!
368
368
!! changes will be overwritten. !!
369
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370
+ !! source digest: sha256:4966991ab1adb1982184b91796980b2c34d83e03680619bd013630fc774110eb
369
371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
370
- < p > < a class ="reference external " href ="https://odoo-community.org/page/development-status "> < img alt ="Beta " src ="https://img.shields.io/badge/maturity-Beta-yellow.png " /> </ a > < a class ="reference external " href ="http://www.gnu.org/licenses/agpl-3.0-standalone.html "> < img alt ="License: AGPL-3 " src ="https://img.shields.io/badge/licence-AGPL--3-blue.png " /> </ a > < a class ="reference external " href ="https://github.com/OCA/reporting-engine/tree/16.0/base_comment_template "> < img alt ="OCA/reporting-engine " src ="https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github " /> </ a > < a class ="reference external " href ="https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-base_comment_template "> < img alt ="Translate me on Weblate " src ="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png " /> </ a > < a class ="reference external " href ="https://runbot.odoo-community.org/runbot/143/16.0 "> < img alt ="Try me on Runbot " src ="https://img.shields.io/badge/runbot-Try%20me-875A7B.png " /> </ a > </ p >
372
+ < p > < a class ="reference external " href ="https://odoo-community.org/page/development-status "> < img alt ="Beta " src ="https://img.shields.io/badge/maturity-Beta-yellow.png " /> </ a > < a class ="reference external " href ="http://www.gnu.org/licenses/agpl-3.0-standalone.html "> < img alt ="License: AGPL-3 " src ="https://img.shields.io/badge/licence-AGPL--3-blue.png " /> </ a > < a class ="reference external " href ="https://github.com/OCA/reporting-engine/tree/16.0/base_comment_template "> < img alt ="OCA/reporting-engine " src ="https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github " /> </ a > < a class ="reference external " href ="https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-base_comment_template "> < img alt ="Translate me on Weblate " src ="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png " /> </ a > < a class ="reference external " href ="https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&target_branch=16.0 "> < img alt ="Try me on Runboat " src ="https://img.shields.io/badge/runboat-Try%20me-875A7B.png " /> </ a > </ p >
371
373
< p > Add a new mixin class to define templates of comments to print on documents.
372
374
The comment templates can be defined like make templates, so you can use variables from linked models.</ p >
373
375
< p > Two positions are available for the comments:</ p >
@@ -380,13 +382,13 @@ <h1 class="title">Base Comments Templates</h1>
380
382
It has a priority field (smaller number = higher priority)</ p >
381
383
< p > In existing reports, if you add this line will get the comment template if you created one like</ p >
382
384
< ul class ="simple ">
383
- < li > <span t-raw =”o.get_comment_template(‘position’,company_id=o.company_id, partner_id=o.parnter_id )”/> ( or without any parameter)</ li >
385
+ < li > <span t-out =”o.get_comment_template(‘position’,company_id=o.company_id, partner_id=o.parnter_id )”/> ( or without any parameter)</ li >
384
386
</ ul >
385
387
< p > This module is the base module for following modules:</ p >
386
388
< ul class ="simple ">
387
389
< li > sale_comment_template</ li >
388
390
< li > purchase_comment_template</ li >
389
- < li > invoice_comment_template </ li >
391
+ < li > account_comment_template </ li >
390
392
< li > stock_picking_comment_template</ li >
391
393
</ ul >
392
394
< p > < strong > Table of contents</ strong > </ p >
@@ -435,12 +437,12 @@ <h1><a class="toc-backref" href="#id2">Usage</a></h1>
435
437
< p > Change the report related to the model from configuration and add a statement like:</ p >
436
438
< dl class ="docutils ">
437
439
< dt > <t t-foreach=”o.comment_template_ids.filtered(lambda x: x.position == ‘before_lines’)” t-as=”comment_template_top”></ dt >
438
- < dd > <div t-raw =”o.render_comment(comment_template_top)” /></ dd >
440
+ < dd > <div t-out =”o.render_comment(comment_template_top)” /></ dd >
439
441
</ dl >
440
442
< p > </t></ p >
441
443
< dl class ="docutils ">
442
444
< dt > <t t-foreach=”o.comment_template_ids.filtered(lambda x: x.position == ‘after_lines’)” t-as=”comment_template_bottom”></ dt >
443
- < dd > <div t-raw =”o.render_comment(comment_template_bottom)” /></ dd >
445
+ < dd > <div t-out =”o.render_comment(comment_template_bottom)” /></ dd >
444
446
</ dl >
445
447
< p > </t></ p >
446
448
< p > You should always use t-if since the method returns False if no template is found.</ p >
@@ -454,15 +456,15 @@ <h1><a class="toc-backref" href="#id2">Usage</a></h1>
454
456
< p > so you could use it :</ p >
455
457
< dl class ="docutils ">
456
458
< dt > <t t-foreach=”o.comment_template_ids.filtered(lambda x: x.position == ‘before_lines’)” t-as=”comment_template_top”></ dt >
457
- < dd > <div t-raw =”o.render_comment(comment_template_top, engine=’qweb’, add_context={my dict}, postprocess=True)” /></ dd >
459
+ < dd > <div t-out =”o.render_comment(comment_template_top, engine=’qweb’, add_context={my dict}, postprocess=True)” /></ dd >
458
460
</ dl >
459
461
< p > </t></ p >
460
462
</ div >
461
463
< div class ="section " id ="bug-tracker ">
462
464
< h1 > < a class ="toc-backref " href ="#id3 "> Bug Tracker</ a > </ h1 >
463
465
< p > Bugs are tracked on < a class ="reference external " href ="https://github.com/OCA/reporting-engine/issues "> GitHub Issues</ a > .
464
466
In case of trouble, please check there if your issue has already been reported.
465
- If you spotted it first, help us smashing it by providing a detailed and welcomed
467
+ If you spotted it first, help us to smash it by providing a detailed and welcomed
466
468
< a class ="reference external " href ="https://github.com/OCA/reporting-engine/issues/new?body=module:%20base_comment_template%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior** "> feedback</ a > .</ p >
467
469
< p > Do not contact contributors directly about support or help with technical issues.</ p >
468
470
</ div >
0 commit comments