Skip to content

Commit 8211891

Browse files
committed
[IMP] base_comment_template: update readme files
Change deprecated t-raw to t-out. Rename invoice_comment_template to account_comment_template
1 parent 646cb05 commit 8211891

File tree

4 files changed

+29
-24
lines changed

4 files changed

+29
-24
lines changed

base_comment_template/README.rst

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22
Base Comments Templates
33
=======================
44

5-
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
67
!! This file is generated by oca-gen-addon-readme !!
78
!! changes will be overwritten. !!
89
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:4966991ab1adb1982184b91796980b2c34d83e03680619bd013630fc774110eb
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
912
1013
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
1114
:target: https://odoo-community.org/page/development-status
@@ -19,11 +22,11 @@ Base Comments Templates
1922
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
2023
:target: https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-base_comment_template
2124
:alt: Translate me on Weblate
22-
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
23-
:target: https://runbot.odoo-community.org/runbot/143/16.0
24-
:alt: Try me on Runbot
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&target_branch=16.0
27+
:alt: Try me on Runboat
2528

26-
|badge1| |badge2| |badge3| |badge4| |badge5|
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
2730

2831
Add a new mixin class to define templates of comments to print on documents.
2932
The comment templates can be defined like make templates, so you can use variables from linked models.
@@ -39,14 +42,14 @@ It has a priority field (smaller number = higher priority)
3942

4043
In existing reports, if you add this line will get the comment template if you created one like
4144

42-
* <span t-raw="o.get_comment_template('position',company_id=o.company_id, partner_id=o.parnter_id )"/> ( or without any parameter)
45+
* <span t-out="o.get_comment_template('position',company_id=o.company_id, partner_id=o.parnter_id )"/> ( or without any parameter)
4346

4447

4548
This module is the base module for following modules:
4649

4750
* sale_comment_template
4851
* purchase_comment_template
49-
* invoice_comment_template
52+
* account_comment_template
5053
* stock_picking_comment_template
5154

5255
**Table of contents**
@@ -88,13 +91,13 @@ The template is a html field which will be rendered just like a mail template, s
8891
Change the report related to the model from configuration and add a statement like:
8992

9093
<t t-foreach="o.comment_template_ids.filtered(lambda x: x.position == 'before_lines')" t-as="comment_template_top">
91-
<div t-raw="o.render_comment(comment_template_top)" />
94+
<div t-out="o.render_comment(comment_template_top)" />
9295

9396
</t>
9497

9598

9699
<t t-foreach="o.comment_template_ids.filtered(lambda x: x.position == 'after_lines')" t-as="comment_template_bottom">
97-
<div t-raw="o.render_comment(comment_template_bottom)" />
100+
<div t-out="o.render_comment(comment_template_bottom)" />
98101

99102
</t>
100103

@@ -110,7 +113,7 @@ mail.render.mixin with parameters:
110113
so you could use it :
111114

112115
<t t-foreach="o.comment_template_ids.filtered(lambda x: x.position == 'before_lines')" t-as="comment_template_top">
113-
<div t-raw="o.render_comment(comment_template_top, engine='qweb', add_context={my dict}, postprocess=True)" />
116+
<div t-out="o.render_comment(comment_template_top, engine='qweb', add_context={my dict}, postprocess=True)" />
114117

115118
</t>
116119

@@ -119,7 +122,7 @@ Bug Tracker
119122

120123
Bugs are tracked on `GitHub Issues <https://github.com/OCA/reporting-engine/issues>`_.
121124
In case of trouble, please check there if your issue has already been reported.
122-
If you spotted it first, help us smashing it by providing a detailed and welcomed
125+
If you spotted it first, help us to smash it by providing a detailed and welcomed
123126
`feedback <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**>`_.
124127

125128
Do not contact contributors directly about support or help with technical issues.

base_comment_template/readme/DESCRIPTION.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ It has a priority field (smaller number = higher priority)
1212

1313
In existing reports, if you add this line will get the comment template if you created one like
1414

15-
* <span t-raw="o.get_comment_template('position',company_id=o.company_id, partner_id=o.parnter_id )"/> ( or without any parameter)
15+
* <span t-out="o.get_comment_template('position',company_id=o.company_id, partner_id=o.parnter_id )"/> ( or without any parameter)
1616

1717

1818
This module is the base module for following modules:
1919

2020
* sale_comment_template
2121
* purchase_comment_template
22-
* invoice_comment_template
22+
* account_comment_template
2323
* stock_picking_comment_template

base_comment_template/readme/USAGE.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ The template is a html field which will be rendered just like a mail template, s
1717
Change the report related to the model from configuration and add a statement like:
1818

1919
<t t-foreach="o.comment_template_ids.filtered(lambda x: x.position == 'before_lines')" t-as="comment_template_top">
20-
<div t-raw="o.render_comment(comment_template_top)" />
20+
<div t-out="o.render_comment(comment_template_top)" />
2121

2222
</t>
2323

2424

2525
<t t-foreach="o.comment_template_ids.filtered(lambda x: x.position == 'after_lines')" t-as="comment_template_bottom">
26-
<div t-raw="o.render_comment(comment_template_bottom)" />
26+
<div t-out="o.render_comment(comment_template_bottom)" />
2727

2828
</t>
2929

@@ -39,6 +39,6 @@ mail.render.mixin with parameters:
3939
so you could use it :
4040

4141
<t t-foreach="o.comment_template_ids.filtered(lambda x: x.position == 'before_lines')" t-as="comment_template_top">
42-
<div t-raw="o.render_comment(comment_template_top, engine='qweb', add_context={my dict}, postprocess=True)" />
42+
<div t-out="o.render_comment(comment_template_top, engine='qweb', add_context={my dict}, postprocess=True)" />
4343

4444
</t>

base_comment_template/static/description/index.html

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
44
<head>
55
<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/" />
77
<title>Base Comments Templates</title>
88
<style type="text/css">
99

@@ -366,8 +366,10 @@ <h1 class="title">Base Comments Templates</h1>
366366
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
367367
!! This file is generated by oca-gen-addon-readme !!
368368
!! changes will be overwritten. !!
369+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370+
!! source digest: sha256:4966991ab1adb1982184b91796980b2c34d83e03680619bd013630fc774110eb
369371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
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&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
371373
<p>Add a new mixin class to define templates of comments to print on documents.
372374
The comment templates can be defined like make templates, so you can use variables from linked models.</p>
373375
<p>Two positions are available for the comments:</p>
@@ -380,13 +382,13 @@ <h1 class="title">Base Comments Templates</h1>
380382
It has a priority field (smaller number = higher priority)</p>
381383
<p>In existing reports, if you add this line will get the comment template if you created one like</p>
382384
<ul class="simple">
383-
<li>&lt;span t-raw=”o.get_comment_template(‘position’,company_id=o.company_id, partner_id=o.parnter_id )”/&gt; ( or without any parameter)</li>
385+
<li>&lt;span t-out=”o.get_comment_template(‘position’,company_id=o.company_id, partner_id=o.parnter_id )”/&gt; ( or without any parameter)</li>
384386
</ul>
385387
<p>This module is the base module for following modules:</p>
386388
<ul class="simple">
387389
<li>sale_comment_template</li>
388390
<li>purchase_comment_template</li>
389-
<li>invoice_comment_template</li>
391+
<li>account_comment_template</li>
390392
<li>stock_picking_comment_template</li>
391393
</ul>
392394
<p><strong>Table of contents</strong></p>
@@ -435,12 +437,12 @@ <h1><a class="toc-backref" href="#id2">Usage</a></h1>
435437
<p>Change the report related to the model from configuration and add a statement like:</p>
436438
<dl class="docutils">
437439
<dt>&lt;t t-foreach=”o.comment_template_ids.filtered(lambda x: x.position == ‘before_lines’)” t-as=”comment_template_top”&gt;</dt>
438-
<dd>&lt;div t-raw=”o.render_comment(comment_template_top)” /&gt;</dd>
440+
<dd>&lt;div t-out=”o.render_comment(comment_template_top)” /&gt;</dd>
439441
</dl>
440442
<p>&lt;/t&gt;</p>
441443
<dl class="docutils">
442444
<dt>&lt;t t-foreach=”o.comment_template_ids.filtered(lambda x: x.position == ‘after_lines’)” t-as=”comment_template_bottom”&gt;</dt>
443-
<dd>&lt;div t-raw=”o.render_comment(comment_template_bottom)” /&gt;</dd>
445+
<dd>&lt;div t-out=”o.render_comment(comment_template_bottom)” /&gt;</dd>
444446
</dl>
445447
<p>&lt;/t&gt;</p>
446448
<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>
454456
<p>so you could use it :</p>
455457
<dl class="docutils">
456458
<dt>&lt;t t-foreach=”o.comment_template_ids.filtered(lambda x: x.position == ‘before_lines’)” t-as=”comment_template_top”&gt;</dt>
457-
<dd>&lt;div t-raw=”o.render_comment(comment_template_top, engine=’qweb’, add_context={my dict}, postprocess=True)” /&gt;</dd>
459+
<dd>&lt;div t-out=”o.render_comment(comment_template_top, engine=’qweb’, add_context={my dict}, postprocess=True)” /&gt;</dd>
458460
</dl>
459461
<p>&lt;/t&gt;</p>
460462
</div>
461463
<div class="section" id="bug-tracker">
462464
<h1><a class="toc-backref" href="#id3">Bug Tracker</a></h1>
463465
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/reporting-engine/issues">GitHub Issues</a>.
464466
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
466468
<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>
467469
<p>Do not contact contributors directly about support or help with technical issues.</p>
468470
</div>

0 commit comments

Comments
 (0)