Skip to content

Commit

Permalink
[ADD] sale_order_report_without_price: Add module
Browse files Browse the repository at this point in the history
  • Loading branch information
paradoxxxzero committed Oct 4, 2021
1 parent 2ae3d05 commit 0be4c66
Show file tree
Hide file tree
Showing 11 changed files with 590 additions and 0 deletions.
81 changes: 81 additions & 0 deletions sale_order_report_without_price/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
===============================
Sale Order Report Without Price
===============================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! 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-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github
:target: https://github.com/OCA/sale-workflow/tree/14.0/sale_order_report_without_price
:alt: OCA/sale-workflow
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_order_report_without_price
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/167/14.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

This module adds a new print option to print quotations and orders without prices.

**Table of contents**

.. contents::
:local:

Usage
=====

Activation is automatic.
In quotations/orders click on the print icon and select the option without prices.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/sale-workflow/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/OCA/sale-workflow/issues/new?body=module:%20sale_order_report_without_price%0Aversion:%2014.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
~~~~~~~

* Akretion

Contributors
~~~~~~~~~~~~

* `Akretion <https://www.akretion.com>`_:

* Florian Mounier

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

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/sale-workflow <https://github.com/OCA/sale-workflow/tree/14.0/sale_order_report_without_price>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Empty file.
15 changes: 15 additions & 0 deletions sale_order_report_without_price/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2021 Akretion - Florian Mounier
{
"name": "Sale Order Report Without Price",
"summary": "Allow you to generate quotation and order reports without price.",
"version": "14.0.1.0.0",
"author": "Akretion, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/sale-workflow",
"category": "Sales",
"depends": ["sale"],
"data": [
"report/sale_report.xml",
"report/sale_report_templates.xml",
],
"license": "LGPL-3",
}
3 changes: 3 additions & 0 deletions sale_order_report_without_price/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* `Akretion <https://www.akretion.com>`_:

* Florian Mounier
1 change: 1 addition & 0 deletions sale_order_report_without_price/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module adds a new print option to print quotations and orders without prices.
2 changes: 2 additions & 0 deletions sale_order_report_without_price/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Activation is automatic.
In quotations/orders click on the print icon and select the option without prices.
21 changes: 21 additions & 0 deletions sale_order_report_without_price/report/sale_report.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<data>
<record id="action_report_saleorder_without_price" model="ir.actions.report">
<field name="name">Quotation / Order Without Price</field>
<field name="model">sale.order</field>
<field name="report_type">qweb-pdf</field>
<field
name="report_name"
>sale_order_report_without_price.report_saleorder_without_price</field>
<field
name="report_file"
>sale_order_report_without_price.report_saleorder_without_price</field>
<field
name="print_report_name"
>(object.state in ('draft', 'sent') and 'Quotation - %s without price' % (object.name)) or 'Order - %s without price' % (object.name)</field>
<field name="binding_model_id" ref="sale.model_sale_order" />
<field name="binding_type">report</field>
</record>
</data>
</odoo>
32 changes: 32 additions & 0 deletions sale_order_report_without_price/report/sale_report_templates.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template
id="report_saleorder_document_without_price"
inherit_id="sale.report_saleorder_document"
primary="True"
>
<xpath expr="//th[@name='th_priceunit']" position="replace" />
<xpath expr="//th[@name='th_discount']" position="replace" />
<xpath expr="//th[@name='th_taxes']" position="replace" />
<xpath expr="//th[@name='th_subtotal']" position="replace" />

<xpath expr="//td[@name='td_priceunit']" position="replace" />
<xpath expr="//td[count(@name) = 0]" position="replace" />
<xpath expr="//td[@name='td_taxes']" position="replace" />
<xpath expr="//td[@name='td_subtotal']" position="replace" />

<xpath expr="//tr[hasclass('is-subtotal')]" position="replace" />
<xpath expr="//div[@id='total']" position="replace" />
</template>

<template id="report_saleorder_without_price">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="doc">
<t
t-call="sale_order_report_without_price.report_saleorder_document_without_price"
t-lang="doc.partner_id.lang"
/>
</t>
</t>
</template>
</odoo>
Loading

0 comments on commit 0be4c66

Please sign in to comment.