Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions sale_report_qweb_decimal_place/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
==============================
Sale Report Qweb Decimal Place
==============================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |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-qrtl%2Ffal--custom-lightgray.png?logo=github
:target: https://github.com/qrtl/fal-custom/tree/16.0/sale_report_qweb_decimal_place
:alt: qrtl/fal-custom

|badge1| |badge2| |badge3|

This module provides the option to adjust the price unit format (number of decimal places to apply)
of sale reports according to the configuration of price_decimal_places in currency.

This module depends on report_qweb_decimal_place module in OCA/reporting-engine.

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/qrtl/fal-custom/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
`feedback <https://github.com/qrtl/fal-custom/issues/new?body=module:%20sale_report_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.

Credits
=======

Authors
~~~~~~~

* Quartile Limited

Maintainers
~~~~~~~~~~~

This module is part of the `qrtl/fal-custom <https://github.com/qrtl/fal-custom/tree/16.0/sale_report_qweb_decimal_place>`_ project on GitHub.

You are welcome to contribute.
15 changes: 15 additions & 0 deletions sale_report_qweb_decimal_place/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2023 Quartile Limited
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Sale Report Qweb Decimal Place",
"category": "Reporting",
"version": "16.0.1.0.0",
"author": "Quartile Limited",
"website": "https://www.quartile.co",
"license": "AGPL-3",
"depends": ["sale", "report_qweb_decimal_place"],
"data": [
"reports/sale_report.xml",
],
"installable": True,
}
4 changes: 4 additions & 0 deletions sale_report_qweb_decimal_place/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This module provides the option to adjust the price unit format (number of decimal places to apply)
of sale reports according to the configuration of price_decimal_places in currency.

This module depends on report_qweb_decimal_place module in OCA/reporting-engine.
18 changes: 18 additions & 0 deletions sale_report_qweb_decimal_place/reports/sale_report.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template
id="report_saleorder_document_inherit"
inherit_id="sale.report_saleorder_document"
>
<xpath expr="//span[@t-field='line.price_unit']" position="attributes">
<attribute
name="t-att-style"
>'display: none' if doc.currency_id.apply_price_decimal_place else ''</attribute>
</xpath>
<xpath expr="//span[@t-field='line.price_unit']" position="after">
<t t-set="currency" t-value="doc.currency_id" />
<t t-set="price_unit" t-value="line.price_unit" />
<t t-call="report_qweb_decimal_place.price_unit_value_format" />
</xpath>
</template>
</odoo>
Loading