mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[IMP] base_comment_template: Improved sentences on fields
This commit is contained in:
@@ -13,7 +13,7 @@ Base Comments Templates
|
||||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
|
||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Freporting-engine-lightgray.png?logo=github
|
||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/reporting-engine/tree/13.0/base_comment_template
|
||||
:alt: OCA/reporting-engine
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
@@ -23,7 +23,31 @@ Base Comments Templates
|
||||
:target: https://runbot.odoo-community.org/runbot/143/13.0
|
||||
:alt: Try me on Runbot
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|
||||
Add a new mixin class to define templates of comments to print on documents.
|
||||
The comment templates can be defined like make templates, so you can use variables from linked models.
|
||||
|
||||
Two positions are available for the comments:
|
||||
|
||||
* above document lines (before_lines)
|
||||
* below document lines (after_lines)
|
||||
|
||||
The template are general, and can be attached to any Model and based on some domain defined in the template.
|
||||
You can define one default template per Model and domain, which can be overwritten for any company and partners.
|
||||
It has a priority field (smaller number = higher priority)
|
||||
|
||||
In existing reports, if you add this line will get the comment template if you created one like
|
||||
|
||||
* <span t-raw="o.get_comment_template('position',company_id=o.company_id, partner_id=o.parnter_id )"/> ( or without any parameter)
|
||||
|
||||
|
||||
This module is the base module for following modules:
|
||||
|
||||
* sale_comment_template
|
||||
* purchase_comment_template
|
||||
* invoice_comment_template
|
||||
* stock_picking_comment_template
|
||||
|
||||
**Table of contents**
|
||||
|
||||
@@ -35,9 +59,6 @@ Configuration
|
||||
|
||||
Go to *Settings > Technical > Reporting > Comment Templates* and start designing you comment templates.
|
||||
|
||||
The template are general, and can be attached to any Model and based on some domain defined in the template.
|
||||
You can define one default template per Model and domain, which can be overwritten for any partner.
|
||||
|
||||
This module is the base module for following modules:
|
||||
|
||||
* sale_comment_template
|
||||
@@ -48,6 +69,7 @@ This module is the base module for following modules:
|
||||
Usage
|
||||
=====
|
||||
|
||||
#. Go to *Settings* and activate the developer mode.
|
||||
#. Go to *Settings > Technical > Reporting > Comment Templates*.
|
||||
#. Create a new record.
|
||||
#. Define the Company the template is linked or leave default for all companies.
|
||||
@@ -61,7 +83,7 @@ Usage
|
||||
You should have at least one template with Default field set, if you choose a Partner the template is deselected as a Default one.
|
||||
If you create a new template with the same configuration (Model, Domain, Position) and set it as Default, the previous one will be deselected as a default one.
|
||||
|
||||
The template is a html field which will be rendered just a mail template, so you can use variables like ${object}, ${user}, ${ctx} to add dynamic content.
|
||||
The template is a html field which will be rendered just like a mail template, so you can use variables like ${object}, ${user}, ${ctx} to add dynamic content.
|
||||
|
||||
Change the report related to the model from configuration and add a statement like:
|
||||
|
||||
@@ -79,7 +101,6 @@ Change the report related to the model from configuration and add a statement li
|
||||
|
||||
You should always use t-if since the method returns False if no template is found.
|
||||
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
@@ -106,7 +127,6 @@ Contributors
|
||||
* Yannick Vaucher <yannick.vaucher@camptocamp.com>
|
||||
* Guewen Baconnier <guewen.baconnier@camptocamp.com>
|
||||
* Simone Rubino <simone.rubino@agilebg.com>
|
||||
* Simone Rubino <simone.rubino@agilebg.com>
|
||||
* `DynApps <https://www.dynapps.be>`_:
|
||||
|
||||
* Raf Ven <raf.ven@dynapps.be>
|
||||
@@ -119,6 +139,9 @@ Contributors
|
||||
|
||||
* Fekete Mihai <feketemihai@nexterp.ro>
|
||||
|
||||
* `Tecnativa <https://www.tecnativa.com>`_:
|
||||
|
||||
* Carlos Roca
|
||||
|
||||
Maintainers
|
||||
~~~~~~~~~~~
|
||||
|
||||
Reference in New Issue
Block a user