[UPD] README.rst

This commit is contained in:
OCA-git-bot
2023-09-03 16:00:44 +00:00
parent f597cfe5a9
commit 5019f30b0f
40 changed files with 652 additions and 552 deletions

View File

@@ -2,10 +2,13 @@
Report Qweb Decimal Place
=========================
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:9eb9842a63d5d4d8e1e57806d1cb69cc868f05a50a7f173bd25f2cb549c0a93e
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
@@ -19,11 +22,11 @@ Report Qweb Decimal Place
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-report_qweb_decimal_place
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/143/16.0
:alt: Try me on Runbot
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&target_branch=16.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
|badge1| |badge2| |badge3| |badge4| |badge5|
This module intends to provide the base function for currencies to adjust the number of decimal places
for the unit price in QWeb reports.
@@ -80,7 +83,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/reporting-engine/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_qweb_decimal_place%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.

View File

@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>Report Qweb Decimal Place</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
@@ -366,28 +366,30 @@ ul.auto-toc {
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:9eb9842a63d5d4d8e1e57806d1cb69cc868f05a50a7f173bd25f2cb549c0a93e
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/16.0/report_qweb_decimal_place"><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-report_qweb_decimal_place"><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>
<p><a class="reference external image-reference" 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 image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/reporting-engine/tree/16.0/report_qweb_decimal_place"><img alt="OCA/reporting-engine" src="https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-report_qweb_decimal_place"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" 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>
<p>This module intends to provide the base function for currencies to adjust the number of decimal places
for the unit price in QWeb reports.
Installing this module alone does not affect the presentation of existing QWeb reports.
Individual adjustments need to be done in separate modules in a manner similar to the following:</p>
<pre class="code xml literal-block">
<span class="nt">&lt;template</span>
<span class="na">id=</span><span class="s">&quot;report_saleorder_document_inherit&quot;</span>
<span class="na">inherit_id=</span><span class="s">&quot;sale.report_saleorder_document&quot;</span>
<span class="nt">&gt;</span>
<span class="nt">&lt;xpath</span> <span class="na">expr=</span><span class="s">&quot;//span[&#64;t-field='line.price_unit']&quot;</span> <span class="na">position=</span><span class="s">&quot;attributes&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;attribute</span>
<span class="na">name=</span><span class="s">&quot;t-att-style&quot;</span>
<span class="nt">&gt;</span>'display: none' if doc.currency_id.apply_price_decimal_place else ''<span class="nt">&lt;/attribute&gt;</span>
<span class="nt">&lt;/xpath&gt;</span>
<span class="nt">&lt;xpath</span> <span class="na">expr=</span><span class="s">&quot;//span[&#64;t-field='line.price_unit']&quot;</span> <span class="na">position=</span><span class="s">&quot;after&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;t</span> <span class="na">t-set=</span><span class="s">&quot;currency&quot;</span> <span class="na">t-value=</span><span class="s">&quot;doc.currency_id&quot;</span> <span class="nt">/&gt;</span>
<span class="nt">&lt;t</span> <span class="na">t-set=</span><span class="s">&quot;price_unit&quot;</span> <span class="na">t-value=</span><span class="s">&quot;line.price_unit&quot;</span> <span class="nt">/&gt;</span>
<span class="nt">&lt;t</span> <span class="na">t-call=</span><span class="s">&quot;report_qweb_decimal_place.price_unit_value_format&quot;</span> <span class="nt">/&gt;</span>
<span class="nt">&lt;/xpath&gt;</span>
<span class="nt">&lt;/template&gt;</span>
<span class="nt">&lt;template</span><span class="w">
</span><span class="na">id=</span><span class="s">&quot;report_saleorder_document_inherit&quot;</span><span class="w">
</span><span class="na">inherit_id=</span><span class="s">&quot;sale.report_saleorder_document&quot;</span><span class="w">
</span><span class="nt">&gt;</span><span class="w">
</span><span class="nt">&lt;xpath</span><span class="w"> </span><span class="na">expr=</span><span class="s">&quot;//span[&#64;t-field='line.price_unit']&quot;</span><span class="w"> </span><span class="na">position=</span><span class="s">&quot;attributes&quot;</span><span class="nt">&gt;</span><span class="w">
</span><span class="nt">&lt;attribute</span><span class="w">
</span><span class="na">name=</span><span class="s">&quot;t-att-style&quot;</span><span class="w">
</span><span class="nt">&gt;</span>'display:<span class="w"> </span>none'<span class="w"> </span>if<span class="w"> </span>doc.currency_id.apply_price_decimal_place<span class="w"> </span>else<span class="w"> </span>''<span class="nt">&lt;/attribute&gt;</span><span class="w">
</span><span class="nt">&lt;/xpath&gt;</span><span class="w">
</span><span class="nt">&lt;xpath</span><span class="w"> </span><span class="na">expr=</span><span class="s">&quot;//span[&#64;t-field='line.price_unit']&quot;</span><span class="w"> </span><span class="na">position=</span><span class="s">&quot;after&quot;</span><span class="nt">&gt;</span><span class="w">
</span><span class="nt">&lt;t</span><span class="w"> </span><span class="na">t-set=</span><span class="s">&quot;currency&quot;</span><span class="w"> </span><span class="na">t-value=</span><span class="s">&quot;doc.currency_id&quot;</span><span class="w"> </span><span class="nt">/&gt;</span><span class="w">
</span><span class="nt">&lt;t</span><span class="w"> </span><span class="na">t-set=</span><span class="s">&quot;price_unit&quot;</span><span class="w"> </span><span class="na">t-value=</span><span class="s">&quot;line.price_unit&quot;</span><span class="w"> </span><span class="nt">/&gt;</span><span class="w">
</span><span class="nt">&lt;t</span><span class="w"> </span><span class="na">t-call=</span><span class="s">&quot;report_qweb_decimal_place.price_unit_value_format&quot;</span><span class="w"> </span><span class="nt">/&gt;</span><span class="w">
</span><span class="nt">&lt;/xpath&gt;</span><span class="w">
</span><span class="nt">&lt;/template&gt;</span>
</pre>
<div class="section" id="background">
<h1>Background:</h1>
@@ -400,13 +402,13 @@ presentation on PDF reports for JPY transactions may appear a bit unconventiona
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#configuration" id="id1">Configuration</a></li>
<li><a class="reference internal" href="#bug-tracker" id="id2">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id3">Credits</a></li>
<li><a class="reference internal" href="#configuration" id="toc-entry-1">Configuration</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-2">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-3">Credits</a></li>
</ul>
</div>
<div class="section" id="configuration">
<h2><a class="toc-backref" href="#id1">Configuration</a></h2>
<h2><a class="toc-backref" href="#toc-entry-1">Configuration</a></h2>
<p>To apply price unit format:</p>
<ol class="arabic simple">
<li>Go to Invoicing &gt; Configuration &gt; Currencies</li>
@@ -416,15 +418,15 @@ presentation on PDF reports for JPY transactions may appear a bit unconventiona
<p>Inherit this module in your xxx_report_qweb_decimal_place module and format the price unit in reports.</p>
</div>
<div class="section" id="bug-tracker">
<h2><a class="toc-backref" href="#id2">Bug Tracker</a></h2>
<h2><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h2>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/reporting-engine/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_qweb_decimal_place%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h2><a class="toc-backref" href="#id3">Credits</a></h2>
<h2><a class="toc-backref" href="#toc-entry-3">Credits</a></h2>
</div>
</div>
<div class="section" id="authors">