Initial commit: Odoo 18.0-20251222 extra-addons
This commit is contained in:
117
sale_discount_display_amount/README.rst
Executable file
117
sale_discount_display_amount/README.rst
Executable file
@@ -0,0 +1,117 @@
|
||||
============================
|
||||
Sale Discount Display Amount
|
||||
============================
|
||||
|
||||
..
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:f993ed9de016c93793d3a69362d0d8a364da80d2a5664e5da575616da5433ff7
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
.. |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-OCA%2Fsale--workflow-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/sale-workflow/tree/18.0/sale_discount_display_amount
|
||||
: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-18-0/sale-workflow-18-0-sale_discount_display_amount
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
||||
:target: https://runboat.odoo-community.org/builds?repo=OCA/sale-workflow&target_branch=18.0
|
||||
:alt: Try me on Runboat
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|
||||
In standard Odoo only display the rate of the discount applied, never
|
||||
the amount. It could be great to be able to tell the customer how much
|
||||
he spares. This is the goal of this addons, it will show on a sale order
|
||||
the total without the discount and the value of the discount. You can
|
||||
choose if you want the discount on the Total with or the Total without
|
||||
TAX.
|
||||
|
||||
**Table of contents**
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
To configure this module, you need to:
|
||||
|
||||
1. Go to Sales/Settings and check "Allow discounts on sales order lines"
|
||||
2. Go to Sales/Settings and check or uncheck "Show the Discount with
|
||||
TAX" depending on your needs
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
To use this module, you need to:
|
||||
|
||||
1. Go on a sale order
|
||||
2. Set a discount on a line
|
||||
3. The value of the discount is dislayed in the total section as well as
|
||||
the total without it.
|
||||
|
||||
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 to smash it by providing a detailed and welcomed
|
||||
`feedback <https://github.com/OCA/sale-workflow/issues/new?body=module:%20sale_discount_display_amount%0Aversion:%2018.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
|
||||
-------
|
||||
|
||||
* ACSONE SA/NV
|
||||
|
||||
Contributors
|
||||
------------
|
||||
|
||||
- Cédric Pigeon <cedric.pigeon@acsone.eu>
|
||||
- Abraham Anes <abrahamanes@gmail.com>
|
||||
- Chafique Delli <chafique.delli@akretion.com>
|
||||
- Ruchir Shukla <ruchir@bizzappdev.com>
|
||||
- Manuel Regidor <manuel.regidor@sygel.es>
|
||||
- `Pesol <https://www.pesol.es>`__:
|
||||
|
||||
- Jonathan Oscategui Taza <info@pesol.es>
|
||||
|
||||
- `Trobz <https://www.trobz.com>`__:
|
||||
|
||||
- Nhan Tran <nhant@trobz.com>
|
||||
|
||||
Other credits
|
||||
-------------
|
||||
|
||||
The migration of this module from 17.0 to 18.0 was financially supported
|
||||
by Camptocamp.
|
||||
|
||||
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/18.0/sale_discount_display_amount>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
3
sale_discount_display_amount/__init__.py
Executable file
3
sale_discount_display_amount/__init__.py
Executable file
@@ -0,0 +1,3 @@
|
||||
from . import models
|
||||
from .hooks import post_init_hook
|
||||
from .hooks import pre_init_hook
|
||||
21
sale_discount_display_amount/__manifest__.py
Executable file
21
sale_discount_display_amount/__manifest__.py
Executable file
@@ -0,0 +1,21 @@
|
||||
# Copyright 2018 ACSONE SA/NV
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
"name": "Sale Discount Display Amount",
|
||||
"summary": """
|
||||
This addon intends to display the amount of the discount computed on
|
||||
sale_order_line and sale_order level""",
|
||||
"version": "18.0.1.0.0",
|
||||
"license": "AGPL-3",
|
||||
"author": "ACSONE SA/NV, Odoo Community Association (OCA)",
|
||||
"website": "https://github.com/OCA/sale-workflow",
|
||||
"depends": ["sale_management"],
|
||||
"data": [
|
||||
"views/res_config_settings_views.xml",
|
||||
"views/sale_view.xml",
|
||||
"report/sale_report_template.xml",
|
||||
],
|
||||
"pre_init_hook": "pre_init_hook",
|
||||
"post_init_hook": "post_init_hook",
|
||||
}
|
||||
57
sale_discount_display_amount/hooks.py
Executable file
57
sale_discount_display_amount/hooks.py
Executable file
@@ -0,0 +1,57 @@
|
||||
# Copyright 2018 ACSONE SA/NV
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
import logging
|
||||
|
||||
from odoo.tools.sql import column_exists, create_column
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
COLUMNS = (
|
||||
("sale_order", "price_subtotal_no_discount"),
|
||||
("sale_order", "price_total_no_discount"),
|
||||
("sale_order", "discount_total"),
|
||||
("sale_order_line", "price_subtotal_no_discount"),
|
||||
("sale_order_line", "price_total_no_discount"),
|
||||
("sale_order_line", "discount_total"),
|
||||
("sale_order_line", "discount_subtotal"),
|
||||
)
|
||||
|
||||
|
||||
def pre_init_hook(env):
|
||||
cr = env.cr # Retrieve the database cursor
|
||||
for table, column in COLUMNS:
|
||||
if not column_exists(cr, table, column):
|
||||
_logger.info("Create discount column %s in database", column)
|
||||
create_column(cr, table, column, "numeric")
|
||||
|
||||
|
||||
def post_init_hook(env):
|
||||
cr = env.cr # Retrieve the database cursor
|
||||
_logger.info("Compute discount columns")
|
||||
|
||||
query = """
|
||||
update sale_order_line
|
||||
set
|
||||
price_subtotal_no_discount = price_subtotal,
|
||||
price_total_no_discount = price_total
|
||||
where discount = 0.0
|
||||
"""
|
||||
cr.execute(query)
|
||||
|
||||
query = """
|
||||
update sale_order
|
||||
set
|
||||
price_subtotal_no_discount = amount_untaxed,
|
||||
price_total_no_discount = amount_total
|
||||
"""
|
||||
cr.execute(query)
|
||||
|
||||
query = """
|
||||
select distinct order_id from sale_order_line where discount > 0.0;
|
||||
"""
|
||||
|
||||
cr.execute(query)
|
||||
order_ids = cr.fetchall()
|
||||
|
||||
orders = env["sale.order"].search([("id", "in", order_ids)])
|
||||
orders.mapped("order_line")._update_discount_display_fields()
|
||||
119
sale_discount_display_amount/i18n/ca.po
Executable file
119
sale_discount_display_amount/i18n/ca.po
Executable file
@@ -0,0 +1,119 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * sale_discount_display_amount
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 14.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2021-02-23 17:45+0000\n"
|
||||
"Last-Translator: Daniel Martinez Vila <daniel.martinez@qubiq.es>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: ca\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Weblate 4.3.2\n"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.sale_discount_display_amount_document
|
||||
msgid "<strong>Discount</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.sale_discount_display_amount_document
|
||||
msgid "<strong>Total Without Discount</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,help:sale_discount_display_amount.field_res_config_settings__display_discount_with_tax
|
||||
#: model:ir.model.fields,help:sale_discount_display_amount.field_sale_order__display_discount_with_tax
|
||||
msgid "Check this field to show the Discount with TAX"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_res_company
|
||||
msgid "Companies"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_res_config_settings
|
||||
msgid "Config Settings"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__discount_subtotal
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__discount_subtotal
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__discount_total
|
||||
msgid "Discount Subtotal"
|
||||
msgstr "Subtotal de descompte"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__discount_total
|
||||
msgid "Discount Total"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,help:sale_discount_display_amount.field_res_config_settings__report_total_without_discount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.res_config_settings_view_form_report_total_without_discount
|
||||
msgid "Display \"Total without discount\" in report"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.res_config_settings_view_form_display_discount_with_tax
|
||||
msgid ""
|
||||
"OFF = Shows the Discount without TAX<br/>ON = Shows the Discount with TAX"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__price_subtotal_no_discount
|
||||
msgid "Price Subtotal No Discount"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__price_total_no_discount
|
||||
msgid "Price Total No Discount"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_company__report_total_without_discount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_config_settings__report_total_without_discount
|
||||
msgid "Report Total Without Discount"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_sale_order
|
||||
msgid "Sales Order"
|
||||
msgstr "Comanda de venda"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_sale_order_line
|
||||
msgid "Sales Order Line"
|
||||
msgstr "Línia de comandes de vendes"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_company__display_discount_with_tax
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_config_settings__display_discount_with_tax
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__display_discount_with_tax
|
||||
msgid "Show the Discount with TAX"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__price_subtotal_no_discount
|
||||
msgid "Subtotal Without Discount"
|
||||
msgstr "Subtotal sense descompte"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__price_total_no_discount
|
||||
msgid "Total Without Discount"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Display Name"
|
||||
#~ msgstr "Nom Visible"
|
||||
|
||||
#~ msgid "ID"
|
||||
#~ msgstr "ID"
|
||||
|
||||
#~ msgid "Last Modified on"
|
||||
#~ msgstr "Darrera modificació el"
|
||||
114
sale_discount_display_amount/i18n/de.po
Executable file
114
sale_discount_display_amount/i18n/de.po
Executable file
@@ -0,0 +1,114 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * sale_discount_display_amount
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 17.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-02-22 09:19+0000\n"
|
||||
"PO-Revision-Date: 2024-02-22 09:19+0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"Language: de\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.sale_discount_display_amount_document
|
||||
msgid "<strong>Discount</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.sale_discount_display_amount_document
|
||||
msgid "<strong>Total Without Discount</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,help:sale_discount_display_amount.field_res_config_settings__display_discount_with_tax
|
||||
#: model:ir.model.fields,help:sale_discount_display_amount.field_sale_order__display_discount_with_tax
|
||||
msgid "Check this field to show the Discount with TAX"
|
||||
msgstr "Aktivieren Sie dieses Feld, um den Rabatt mit Steuern anzuzeigen."
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_res_company
|
||||
msgid "Companies"
|
||||
msgstr "Unternehmen"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_res_config_settings
|
||||
msgid "Config Settings"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__discount_subtotal
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__discount_subtotal
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__discount_total
|
||||
msgid "Discount Subtotal"
|
||||
msgstr "Rabatt-Nettobetrag"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__discount_total
|
||||
msgid "Discount Total"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,help:sale_discount_display_amount.field_res_config_settings__report_total_without_discount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.res_config_settings_view_form_report_total_without_discount
|
||||
msgid "Display \"Total without discount\" in report"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.res_config_settings_view_form_display_discount_with_tax
|
||||
msgid ""
|
||||
"OFF = Shows the Discount without TAX<br/>ON = Shows the Discount with TAX"
|
||||
msgstr ""
|
||||
"OFF = Zeigt den Rabatt ohne Steuer<br/>ON = Zeigt den Rabatt mit Steuer"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__price_subtotal_no_discount
|
||||
msgid "Price Subtotal No Discount"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__price_total_no_discount
|
||||
msgid "Price Total No Discount"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_company__report_total_without_discount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_config_settings__report_total_without_discount
|
||||
msgid "Report Total Without Discount"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_sale_order
|
||||
msgid "Sales Order"
|
||||
msgstr "Kundenauftrag"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_sale_order_line
|
||||
msgid "Sales Order Line"
|
||||
msgstr "Kundenauftragszeile"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_company__display_discount_with_tax
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_config_settings__display_discount_with_tax
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__display_discount_with_tax
|
||||
msgid "Show the Discount with TAX"
|
||||
msgstr "Den Rabatt mit Steuer anzeigen"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__price_subtotal_no_discount
|
||||
msgid "Subtotal Without Discount"
|
||||
msgstr "Nettobetrag ohne Rabatt"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__price_total_no_discount
|
||||
msgid "Total Without Discount"
|
||||
msgstr "Bruttobetrag ohne Rabatt"
|
||||
|
||||
#~ msgid "Discount total"
|
||||
#~ msgstr "Rabatt-Bruttobetrag"
|
||||
110
sale_discount_display_amount/i18n/es.po
Executable file
110
sale_discount_display_amount/i18n/es.po
Executable file
@@ -0,0 +1,110 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * sale_discount_display_amount
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2020-07-27 10:19+0000\n"
|
||||
"Last-Translator: Daniel Martinez Vila <daniel.martinez@qubiq.es>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: es\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Weblate 3.10\n"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.sale_discount_display_amount_document
|
||||
msgid "<strong>Discount</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.sale_discount_display_amount_document
|
||||
msgid "<strong>Total Without Discount</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,help:sale_discount_display_amount.field_res_config_settings__display_discount_with_tax
|
||||
#: model:ir.model.fields,help:sale_discount_display_amount.field_sale_order__display_discount_with_tax
|
||||
msgid "Check this field to show the Discount with TAX"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_res_company
|
||||
msgid "Companies"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_res_config_settings
|
||||
msgid "Config Settings"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__discount_subtotal
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__discount_subtotal
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__discount_total
|
||||
msgid "Discount Subtotal"
|
||||
msgstr "Descuento total"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__discount_total
|
||||
msgid "Discount Total"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,help:sale_discount_display_amount.field_res_config_settings__report_total_without_discount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.res_config_settings_view_form_report_total_without_discount
|
||||
msgid "Display \"Total without discount\" in report"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.res_config_settings_view_form_display_discount_with_tax
|
||||
msgid ""
|
||||
"OFF = Shows the Discount without TAX<br/>ON = Shows the Discount with TAX"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__price_subtotal_no_discount
|
||||
msgid "Price Subtotal No Discount"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__price_total_no_discount
|
||||
msgid "Price Total No Discount"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_company__report_total_without_discount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_config_settings__report_total_without_discount
|
||||
msgid "Report Total Without Discount"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_sale_order
|
||||
msgid "Sales Order"
|
||||
msgstr "Órdenes de venta"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_sale_order_line
|
||||
msgid "Sales Order Line"
|
||||
msgstr "Línea pedido de venta"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_company__display_discount_with_tax
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_config_settings__display_discount_with_tax
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__display_discount_with_tax
|
||||
msgid "Show the Discount with TAX"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__price_subtotal_no_discount
|
||||
msgid "Subtotal Without Discount"
|
||||
msgstr "Total Sin Descuento"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__price_total_no_discount
|
||||
msgid "Total Without Discount"
|
||||
msgstr ""
|
||||
108
sale_discount_display_amount/i18n/es_ES.po
Executable file
108
sale_discount_display_amount/i18n/es_ES.po
Executable file
@@ -0,0 +1,108 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * sale_discount_display_amount
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Last-Translator: Automatically generated\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: es_ES\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.sale_discount_display_amount_document
|
||||
msgid "<strong>Discount</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.sale_discount_display_amount_document
|
||||
msgid "<strong>Total Without Discount</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,help:sale_discount_display_amount.field_res_config_settings__display_discount_with_tax
|
||||
#: model:ir.model.fields,help:sale_discount_display_amount.field_sale_order__display_discount_with_tax
|
||||
msgid "Check this field to show the Discount with TAX"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_res_company
|
||||
msgid "Companies"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_res_config_settings
|
||||
msgid "Config Settings"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__discount_subtotal
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__discount_subtotal
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__discount_total
|
||||
msgid "Discount Subtotal"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__discount_total
|
||||
msgid "Discount Total"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,help:sale_discount_display_amount.field_res_config_settings__report_total_without_discount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.res_config_settings_view_form_report_total_without_discount
|
||||
msgid "Display \"Total without discount\" in report"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.res_config_settings_view_form_display_discount_with_tax
|
||||
msgid ""
|
||||
"OFF = Shows the Discount without TAX<br/>ON = Shows the Discount with TAX"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__price_subtotal_no_discount
|
||||
msgid "Price Subtotal No Discount"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__price_total_no_discount
|
||||
msgid "Price Total No Discount"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_company__report_total_without_discount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_config_settings__report_total_without_discount
|
||||
msgid "Report Total Without Discount"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_sale_order
|
||||
msgid "Sales Order"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_sale_order_line
|
||||
msgid "Sales Order Line"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_company__display_discount_with_tax
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_config_settings__display_discount_with_tax
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__display_discount_with_tax
|
||||
msgid "Show the Discount with TAX"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__price_subtotal_no_discount
|
||||
msgid "Subtotal Without Discount"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__price_total_no_discount
|
||||
msgid "Total Without Discount"
|
||||
msgstr ""
|
||||
113
sale_discount_display_amount/i18n/fr.po
Executable file
113
sale_discount_display_amount/i18n/fr.po
Executable file
@@ -0,0 +1,113 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * sale_discount_display_amount
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 17.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-02-22 09:19+0000\n"
|
||||
"PO-Revision-Date: 2024-02-22 09:19+0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"Language: fr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.sale_discount_display_amount_document
|
||||
msgid "<strong>Discount</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.sale_discount_display_amount_document
|
||||
msgid "<strong>Total Without Discount</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,help:sale_discount_display_amount.field_res_config_settings__display_discount_with_tax
|
||||
#: model:ir.model.fields,help:sale_discount_display_amount.field_sale_order__display_discount_with_tax
|
||||
msgid "Check this field to show the Discount with TAX"
|
||||
msgstr "Cochez ce champ pour afficher la remise avec TAXE"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_res_company
|
||||
msgid "Companies"
|
||||
msgstr "Entreprises"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_res_config_settings
|
||||
msgid "Config Settings"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__discount_subtotal
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__discount_subtotal
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__discount_total
|
||||
msgid "Discount Subtotal"
|
||||
msgstr "Sous-total des remises"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__discount_total
|
||||
msgid "Discount Total"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,help:sale_discount_display_amount.field_res_config_settings__report_total_without_discount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.res_config_settings_view_form_report_total_without_discount
|
||||
msgid "Display \"Total without discount\" in report"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.res_config_settings_view_form_display_discount_with_tax
|
||||
msgid ""
|
||||
"OFF = Shows the Discount without TAX<br/>ON = Shows the Discount with TAX"
|
||||
msgstr "OFF = Affiche la remise sans TAXE<br/>ON = Affiche la remise avec TAXE"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__price_subtotal_no_discount
|
||||
msgid "Price Subtotal No Discount"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__price_total_no_discount
|
||||
msgid "Price Total No Discount"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_company__report_total_without_discount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_config_settings__report_total_without_discount
|
||||
msgid "Report Total Without Discount"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_sale_order
|
||||
msgid "Sales Order"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_sale_order_line
|
||||
msgid "Sales Order Line"
|
||||
msgstr "Commande de vente"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_company__display_discount_with_tax
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_config_settings__display_discount_with_tax
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__display_discount_with_tax
|
||||
msgid "Show the Discount with TAX"
|
||||
msgstr "Afficher la remise avec la TAXE"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__price_subtotal_no_discount
|
||||
msgid "Subtotal Without Discount"
|
||||
msgstr "Sous-total sans remise"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__price_total_no_discount
|
||||
msgid "Total Without Discount"
|
||||
msgstr "Total sans remise"
|
||||
|
||||
#~ msgid "Discount total"
|
||||
#~ msgstr "Total des remises"
|
||||
122
sale_discount_display_amount/i18n/it.po
Executable file
122
sale_discount_display_amount/i18n/it.po
Executable file
@@ -0,0 +1,122 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * sale_discount_display_amount
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 14.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2024-10-23 09:06+0000\n"
|
||||
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: it\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Weblate 5.6.2\n"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.sale_discount_display_amount_document
|
||||
msgid "<strong>Discount</strong>"
|
||||
msgstr "<strong>Sconto</strong>"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.sale_discount_display_amount_document
|
||||
msgid "<strong>Total Without Discount</strong>"
|
||||
msgstr "<strong>Totale senza sconto</strong>"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,help:sale_discount_display_amount.field_res_config_settings__display_discount_with_tax
|
||||
#: model:ir.model.fields,help:sale_discount_display_amount.field_sale_order__display_discount_with_tax
|
||||
msgid "Check this field to show the Discount with TAX"
|
||||
msgstr "Selezionare questo campo per visualizzare lo sconto con l'imposta"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_res_company
|
||||
msgid "Companies"
|
||||
msgstr "Aziende"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_res_config_settings
|
||||
msgid "Config Settings"
|
||||
msgstr "Impostazioni configurazione"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__discount_subtotal
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__discount_subtotal
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__discount_total
|
||||
msgid "Discount Subtotal"
|
||||
msgstr "Subtotale sconto"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__discount_total
|
||||
msgid "Discount Total"
|
||||
msgstr "Totale sconto"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,help:sale_discount_display_amount.field_res_config_settings__report_total_without_discount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.res_config_settings_view_form_report_total_without_discount
|
||||
msgid "Display \"Total without discount\" in report"
|
||||
msgstr "Mostra \"Totale senza sconto\" nella stampa"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.res_config_settings_view_form_display_discount_with_tax
|
||||
msgid ""
|
||||
"OFF = Shows the Discount without TAX<br/>ON = Shows the Discount with TAX"
|
||||
msgstr "OFF = mostra sconto senza imposta<br/>ON = mostra sconto on imposta"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__price_subtotal_no_discount
|
||||
msgid "Price Subtotal No Discount"
|
||||
msgstr "Subtotale prezzo senza sconto"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__price_total_no_discount
|
||||
msgid "Price Total No Discount"
|
||||
msgstr "Totale prezzo senza sconto"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_company__report_total_without_discount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_config_settings__report_total_without_discount
|
||||
msgid "Report Total Without Discount"
|
||||
msgstr "Totale senza sconto in stampa"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_sale_order
|
||||
msgid "Sales Order"
|
||||
msgstr "Ordine di vendita"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_sale_order_line
|
||||
msgid "Sales Order Line"
|
||||
msgstr "Riga ordine di vendita"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_company__display_discount_with_tax
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_config_settings__display_discount_with_tax
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__display_discount_with_tax
|
||||
msgid "Show the Discount with TAX"
|
||||
msgstr "Visualizza lo sconto con imposta"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__price_subtotal_no_discount
|
||||
msgid "Subtotal Without Discount"
|
||||
msgstr "Subtotale senza sconto"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__price_total_no_discount
|
||||
msgid "Total Without Discount"
|
||||
msgstr "Totale senza sconto"
|
||||
|
||||
#~ msgid "Display Discount With Tax"
|
||||
#~ msgstr "Visualizza sconto con imposta"
|
||||
|
||||
#~ msgid "Display Name"
|
||||
#~ msgstr "Nome visualizzato"
|
||||
|
||||
#~ msgid "ID"
|
||||
#~ msgstr "ID"
|
||||
|
||||
#~ msgid "Last Modified on"
|
||||
#~ msgstr "Ultima modifica il"
|
||||
113
sale_discount_display_amount/i18n/nl.po
Executable file
113
sale_discount_display_amount/i18n/nl.po
Executable file
@@ -0,0 +1,113 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * sale_discount_display_amount
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 17.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-02-22 09:19+0000\n"
|
||||
"PO-Revision-Date: 2024-02-22 09:19+0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"Language: nl\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.sale_discount_display_amount_document
|
||||
msgid "<strong>Discount</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.sale_discount_display_amount_document
|
||||
msgid "<strong>Total Without Discount</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,help:sale_discount_display_amount.field_res_config_settings__display_discount_with_tax
|
||||
#: model:ir.model.fields,help:sale_discount_display_amount.field_sale_order__display_discount_with_tax
|
||||
msgid "Check this field to show the Discount with TAX"
|
||||
msgstr "Vink dit veld aan om de Korting met BTW weer te geven"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_res_company
|
||||
msgid "Companies"
|
||||
msgstr "Bedrijven"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_res_config_settings
|
||||
msgid "Config Settings"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__discount_subtotal
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__discount_subtotal
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__discount_total
|
||||
msgid "Discount Subtotal"
|
||||
msgstr "Subtotaal Korting"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__discount_total
|
||||
msgid "Discount Total"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,help:sale_discount_display_amount.field_res_config_settings__report_total_without_discount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.res_config_settings_view_form_report_total_without_discount
|
||||
msgid "Display \"Total without discount\" in report"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.res_config_settings_view_form_display_discount_with_tax
|
||||
msgid ""
|
||||
"OFF = Shows the Discount without TAX<br/>ON = Shows the Discount with TAX"
|
||||
msgstr "OFF = toont de korting zonder BTW<br/>ON = toont de korting met BTW"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__price_subtotal_no_discount
|
||||
msgid "Price Subtotal No Discount"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__price_total_no_discount
|
||||
msgid "Price Total No Discount"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_company__report_total_without_discount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_config_settings__report_total_without_discount
|
||||
msgid "Report Total Without Discount"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_sale_order
|
||||
msgid "Sales Order"
|
||||
msgstr "Verkooporder"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_sale_order_line
|
||||
msgid "Sales Order Line"
|
||||
msgstr "Verkooporderlijn"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_company__display_discount_with_tax
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_config_settings__display_discount_with_tax
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__display_discount_with_tax
|
||||
msgid "Show the Discount with TAX"
|
||||
msgstr "Toon de korting met BTW"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__price_subtotal_no_discount
|
||||
msgid "Subtotal Without Discount"
|
||||
msgstr "Subtotaal zonder korting"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__price_total_no_discount
|
||||
msgid "Total Without Discount"
|
||||
msgstr "Totaal zonder korting"
|
||||
|
||||
#~ msgid "Discount total"
|
||||
#~ msgstr "Totaal Korting"
|
||||
107
sale_discount_display_amount/i18n/sale_discount_display_amount.pot
Executable file
107
sale_discount_display_amount/i18n/sale_discount_display_amount.pot
Executable file
@@ -0,0 +1,107 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * sale_discount_display_amount
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 18.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.sale_discount_display_amount_document
|
||||
msgid "<strong>Discount</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.sale_discount_display_amount_document
|
||||
msgid "<strong>Total Without Discount</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,help:sale_discount_display_amount.field_res_config_settings__display_discount_with_tax
|
||||
#: model:ir.model.fields,help:sale_discount_display_amount.field_sale_order__display_discount_with_tax
|
||||
msgid "Check this field to show the Discount with TAX"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_res_company
|
||||
msgid "Companies"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_res_config_settings
|
||||
msgid "Config Settings"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__discount_subtotal
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__discount_subtotal
|
||||
msgid "Discount Subtotal"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__discount_total
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__discount_total
|
||||
msgid "Discount Total"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,help:sale_discount_display_amount.field_res_config_settings__report_total_without_discount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.res_config_settings_view_form_report_total_without_discount
|
||||
msgid "Display \"Total without discount\" in report"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.res_config_settings_view_form_display_discount_with_tax
|
||||
msgid ""
|
||||
"OFF = Shows the Discount without TAX<br/>ON = Shows the Discount with TAX"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__price_subtotal_no_discount
|
||||
msgid "Price Subtotal No Discount"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__price_total_no_discount
|
||||
msgid "Price Total No Discount"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_company__report_total_without_discount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_config_settings__report_total_without_discount
|
||||
msgid "Report Total Without Discount"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_sale_order
|
||||
msgid "Sales Order"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_sale_order_line
|
||||
msgid "Sales Order Line"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_company__display_discount_with_tax
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_config_settings__display_discount_with_tax
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__display_discount_with_tax
|
||||
msgid "Show the Discount with TAX"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__price_subtotal_no_discount
|
||||
msgid "Subtotal Without Discount"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__price_total_no_discount
|
||||
msgid "Total Without Discount"
|
||||
msgstr ""
|
||||
111
sale_discount_display_amount/i18n/zh_CN.po
Executable file
111
sale_discount_display_amount/i18n/zh_CN.po
Executable file
@@ -0,0 +1,111 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * sale_discount_display_amount
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 12.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2019-09-01 09:03+0000\n"
|
||||
"Last-Translator: 黎伟杰 <674416404@qq.com>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: zh_CN\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: Weblate 3.8\n"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.sale_discount_display_amount_document
|
||||
msgid "<strong>Discount</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.sale_discount_display_amount_document
|
||||
msgid "<strong>Total Without Discount</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,help:sale_discount_display_amount.field_res_config_settings__display_discount_with_tax
|
||||
#: model:ir.model.fields,help:sale_discount_display_amount.field_sale_order__display_discount_with_tax
|
||||
msgid "Check this field to show the Discount with TAX"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_res_company
|
||||
msgid "Companies"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_res_config_settings
|
||||
msgid "Config Settings"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__discount_subtotal
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__discount_subtotal
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__discount_total
|
||||
msgid "Discount Subtotal"
|
||||
msgstr "折扣小计"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__discount_total
|
||||
msgid "Discount Total"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,help:sale_discount_display_amount.field_res_config_settings__report_total_without_discount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.res_config_settings_view_form_report_total_without_discount
|
||||
msgid "Display \"Total without discount\" in report"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model_terms:ir.ui.view,arch_db:sale_discount_display_amount.res_config_settings_view_form_display_discount_with_tax
|
||||
msgid ""
|
||||
"OFF = Shows the Discount without TAX<br/>ON = Shows the Discount with TAX"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__price_subtotal_no_discount
|
||||
msgid "Price Subtotal No Discount"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__price_total_no_discount
|
||||
msgid "Price Total No Discount"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_company__report_total_without_discount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_config_settings__report_total_without_discount
|
||||
msgid "Report Total Without Discount"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_sale_order
|
||||
#, fuzzy
|
||||
msgid "Sales Order"
|
||||
msgstr "销售订单"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model,name:sale_discount_display_amount.model_sale_order_line
|
||||
msgid "Sales Order Line"
|
||||
msgstr "销售订单行"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_company__display_discount_with_tax
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_res_config_settings__display_discount_with_tax
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order__display_discount_with_tax
|
||||
msgid "Show the Discount with TAX"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__price_subtotal_no_discount
|
||||
msgid "Subtotal Without Discount"
|
||||
msgstr "没有折扣的小计"
|
||||
|
||||
#. module: sale_discount_display_amount
|
||||
#: model:ir.model.fields,field_description:sale_discount_display_amount.field_sale_order_line__price_total_no_discount
|
||||
msgid "Total Without Discount"
|
||||
msgstr ""
|
||||
4
sale_discount_display_amount/models/__init__.py
Executable file
4
sale_discount_display_amount/models/__init__.py
Executable file
@@ -0,0 +1,4 @@
|
||||
from . import res_company
|
||||
from . import res_config_settings
|
||||
from . import sale_order
|
||||
from . import sale_order_line
|
||||
8
sale_discount_display_amount/models/res_company.py
Executable file
8
sale_discount_display_amount/models/res_company.py
Executable file
@@ -0,0 +1,8 @@
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class ResCompany(models.Model):
|
||||
_inherit = "res.company"
|
||||
|
||||
display_discount_with_tax = fields.Boolean(string="Show the Discount with TAX")
|
||||
report_total_without_discount = fields.Boolean()
|
||||
18
sale_discount_display_amount/models/res_config_settings.py
Executable file
18
sale_discount_display_amount/models/res_config_settings.py
Executable file
@@ -0,0 +1,18 @@
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class ResConfigSettings(models.TransientModel):
|
||||
_inherit = "res.config.settings"
|
||||
|
||||
display_discount_with_tax = fields.Boolean(
|
||||
string="Show the Discount with TAX",
|
||||
help="Check this field to show the Discount with TAX",
|
||||
related="company_id.display_discount_with_tax",
|
||||
readonly=False,
|
||||
)
|
||||
report_total_without_discount = fields.Boolean(
|
||||
string="Report Total Without Discount",
|
||||
help='Display "Total without discount" in report',
|
||||
related="company_id.report_total_without_discount",
|
||||
readonly=False,
|
||||
)
|
||||
67
sale_discount_display_amount/models/sale_order.py
Executable file
67
sale_discount_display_amount/models/sale_order.py
Executable file
@@ -0,0 +1,67 @@
|
||||
# Copyright 2018 ACSONE SA/NV
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class SaleOrder(models.Model):
|
||||
_inherit = "sale.order"
|
||||
|
||||
display_discount_with_tax = fields.Boolean(
|
||||
name="Show the Discount with TAX",
|
||||
help="Check this field to show the Discount with TAX",
|
||||
related="company_id.display_discount_with_tax",
|
||||
)
|
||||
discount_total = fields.Monetary(
|
||||
compute="_compute_discount_total",
|
||||
name="Discount total",
|
||||
currency_field="currency_id",
|
||||
store=True,
|
||||
)
|
||||
discount_subtotal = fields.Monetary(
|
||||
compute="_compute_discount_total",
|
||||
name="Discount Subtotal",
|
||||
currency_field="currency_id",
|
||||
store=True,
|
||||
)
|
||||
price_subtotal_no_discount = fields.Monetary(
|
||||
compute="_compute_discount_total",
|
||||
name="Subtotal Without Discount",
|
||||
currency_field="currency_id",
|
||||
store=True,
|
||||
)
|
||||
price_total_no_discount = fields.Monetary(
|
||||
compute="_compute_discount_total",
|
||||
name="Total Without Discount",
|
||||
currency_field="currency_id",
|
||||
store=True,
|
||||
)
|
||||
|
||||
@api.model
|
||||
def _get_compute_discount_total_depends(self):
|
||||
return [
|
||||
"order_line.discount_total",
|
||||
"order_line.discount_subtotal",
|
||||
"order_line.price_subtotal_no_discount",
|
||||
"order_line.price_total_no_discount",
|
||||
]
|
||||
|
||||
@api.depends(lambda self: self._get_compute_discount_total_depends())
|
||||
def _compute_discount_total(self):
|
||||
for order in self:
|
||||
discount_total = sum(order.order_line.mapped("discount_total"))
|
||||
discount_subtotal = sum(order.order_line.mapped("discount_subtotal"))
|
||||
price_subtotal_no_discount = sum(
|
||||
order.order_line.mapped("price_subtotal_no_discount")
|
||||
)
|
||||
price_total_no_discount = sum(
|
||||
order.order_line.mapped("price_total_no_discount")
|
||||
)
|
||||
order.update(
|
||||
{
|
||||
"discount_total": discount_total,
|
||||
"discount_subtotal": discount_subtotal,
|
||||
"price_subtotal_no_discount": price_subtotal_no_discount,
|
||||
"price_total_no_discount": price_total_no_discount,
|
||||
}
|
||||
)
|
||||
73
sale_discount_display_amount/models/sale_order_line.py
Executable file
73
sale_discount_display_amount/models/sale_order_line.py
Executable file
@@ -0,0 +1,73 @@
|
||||
# Copyright 2018 ACSONE SA/NV
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class SaleOrderLine(models.Model):
|
||||
_inherit = "sale.order.line"
|
||||
|
||||
discount_total = fields.Monetary(
|
||||
compute="_compute_amount",
|
||||
store=True,
|
||||
precompute=True,
|
||||
)
|
||||
discount_subtotal = fields.Monetary(
|
||||
compute="_compute_amount",
|
||||
store=True,
|
||||
precompute=True,
|
||||
)
|
||||
price_subtotal_no_discount = fields.Monetary(
|
||||
compute="_compute_amount",
|
||||
string="Subtotal Without Discount",
|
||||
store=True,
|
||||
precompute=True,
|
||||
)
|
||||
price_total_no_discount = fields.Monetary(
|
||||
compute="_compute_amount",
|
||||
string="Total Without Discount",
|
||||
store=True,
|
||||
precompute=True,
|
||||
)
|
||||
|
||||
def _update_discount_display_fields(self):
|
||||
for line in self:
|
||||
line.price_subtotal_no_discount = 0
|
||||
line.price_total_no_discount = 0
|
||||
line.discount_total = 0
|
||||
if not line.discount:
|
||||
line.price_subtotal_no_discount = line.price_subtotal
|
||||
line.price_total_no_discount = line.price_total
|
||||
continue
|
||||
price = line.price_unit
|
||||
taxes = line.tax_id.compute_all(
|
||||
price,
|
||||
line.order_id.currency_id,
|
||||
line.product_uom_qty,
|
||||
product=line.product_id,
|
||||
partner=line.order_id.partner_shipping_id,
|
||||
)
|
||||
|
||||
price_subtotal_no_discount = taxes["total_excluded"]
|
||||
price_total_no_discount = taxes["total_included"]
|
||||
discount_total = price_total_no_discount - line.price_total
|
||||
discount_subtotal = price_subtotal_no_discount - line.price_subtotal
|
||||
|
||||
line.update(
|
||||
{
|
||||
"discount_total": discount_total,
|
||||
"discount_subtotal": discount_subtotal,
|
||||
"price_subtotal_no_discount": price_subtotal_no_discount,
|
||||
"price_total_no_discount": price_total_no_discount,
|
||||
}
|
||||
)
|
||||
|
||||
@api.model
|
||||
def _get_compute_amount_depends(self):
|
||||
return ["product_uom_qty", "discount", "price_unit", "tax_id"]
|
||||
|
||||
@api.depends(lambda self: self._get_compute_amount_depends())
|
||||
def _compute_amount(self):
|
||||
res = super()._compute_amount()
|
||||
self._update_discount_display_fields()
|
||||
return res
|
||||
3
sale_discount_display_amount/pyproject.toml
Executable file
3
sale_discount_display_amount/pyproject.toml
Executable file
@@ -0,0 +1,3 @@
|
||||
[build-system]
|
||||
requires = ["whool"]
|
||||
build-backend = "whool.buildapi"
|
||||
6
sale_discount_display_amount/readme/CONFIGURE.md
Executable file
6
sale_discount_display_amount/readme/CONFIGURE.md
Executable file
@@ -0,0 +1,6 @@
|
||||
To configure this module, you need to:
|
||||
|
||||
1. Go to Sales/Settings and check "Allow discounts on sales order
|
||||
lines"
|
||||
2. Go to Sales/Settings and check or uncheck "Show the Discount with
|
||||
TAX" depending on your needs
|
||||
9
sale_discount_display_amount/readme/CONTRIBUTORS.md
Executable file
9
sale_discount_display_amount/readme/CONTRIBUTORS.md
Executable file
@@ -0,0 +1,9 @@
|
||||
- Cédric Pigeon \<<cedric.pigeon@acsone.eu>\>
|
||||
- Abraham Anes \<<abrahamanes@gmail.com>\>
|
||||
- Chafique Delli \<<chafique.delli@akretion.com>\>
|
||||
- Ruchir Shukla \<<ruchir@bizzappdev.com>\>
|
||||
- Manuel Regidor \<<manuel.regidor@sygel.es>\>
|
||||
- [Pesol](https://www.pesol.es):
|
||||
- Jonathan Oscategui Taza \<<info@pesol.es>\>
|
||||
- [Trobz](https://www.trobz.com):
|
||||
- Nhan Tran \<<nhant@trobz.com>\>
|
||||
2
sale_discount_display_amount/readme/CREDITS.md
Executable file
2
sale_discount_display_amount/readme/CREDITS.md
Executable file
@@ -0,0 +1,2 @@
|
||||
The migration of this module from 17.0 to 18.0 was financially supported
|
||||
by Camptocamp.
|
||||
6
sale_discount_display_amount/readme/DESCRIPTION.md
Executable file
6
sale_discount_display_amount/readme/DESCRIPTION.md
Executable file
@@ -0,0 +1,6 @@
|
||||
In standard Odoo only display the rate of the discount applied, never
|
||||
the amount. It could be great to be able to tell the customer how much
|
||||
he spares. This is the goal of this addons, it will show on a sale order
|
||||
the total without the discount and the value of the discount. You can
|
||||
choose if you want the discount on the Total with or the Total without
|
||||
TAX.
|
||||
6
sale_discount_display_amount/readme/USAGE.md
Executable file
6
sale_discount_display_amount/readme/USAGE.md
Executable file
@@ -0,0 +1,6 @@
|
||||
To use this module, you need to:
|
||||
|
||||
1. Go on a sale order
|
||||
2. Set a discount on a line
|
||||
3. The value of the discount is dislayed in the total section as well
|
||||
as the total without it.
|
||||
33
sale_discount_display_amount/report/sale_report_template.xml
Executable file
33
sale_discount_display_amount/report/sale_report_template.xml
Executable file
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<template
|
||||
id="sale_discount_display_amount_document"
|
||||
inherit_id="sale.report_saleorder_document"
|
||||
>
|
||||
<xpath expr="//div[@id='total']//table" position="inside">
|
||||
<t groups="sale.group_discount_per_so_line" t-if="doc.discount_total">
|
||||
<t
|
||||
t-set="is_discount"
|
||||
t-value="doc.company_id.report_total_without_discount and doc.price_total_no_discount != doc.amount_total"
|
||||
/>
|
||||
<tr class="border-black" t-if="is_discount">
|
||||
<td name="td_total_without_discount_label">
|
||||
<strong>Total Without Discount</strong>
|
||||
</td>
|
||||
<td name="td_total_without_discount" class="text-end">
|
||||
<span t-field="doc.price_total_no_discount" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr t-attf-class="{{ 'border-black' if not is_discount else '' }}">
|
||||
<td name="td_discount_total_label">
|
||||
<strong>Discount</strong>
|
||||
</td>
|
||||
<td name="td_discount_total" class="text-end">
|
||||
<span t-field="doc.discount_total" />
|
||||
</td>
|
||||
</tr>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
BIN
sale_discount_display_amount/static/description/icon.png
Executable file
BIN
sale_discount_display_amount/static/description/icon.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
467
sale_discount_display_amount/static/description/index.html
Executable file
467
sale_discount_display_amount/static/description/index.html
Executable file
@@ -0,0 +1,467 @@
|
||||
<!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: https://docutils.sourceforge.io/" />
|
||||
<title>Sale Discount Display Amount</title>
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger (goodger@python.org)
|
||||
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
Despite the name, some widely supported CSS2 features are used.
|
||||
|
||||
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* used to remove borders from tables and images */
|
||||
.borderless, table.borderless td, table.borderless th {
|
||||
border: 0 }
|
||||
|
||||
table.borderless td, table.borderless th {
|
||||
/* Override padding for "table.docutils td" with "! important".
|
||||
The right padding separates the table cells. */
|
||||
padding: 0 0.5em 0 0 ! important }
|
||||
|
||||
.first {
|
||||
/* Override more specific margin styles with "! important". */
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
.subscript {
|
||||
vertical-align: sub;
|
||||
font-size: smaller }
|
||||
|
||||
.superscript {
|
||||
vertical-align: super;
|
||||
font-size: smaller }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title, .code .error {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin: 0 0 0.5em 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left, .figure.align-left, object.align-left, table.align-left {
|
||||
clear: left ;
|
||||
float: left ;
|
||||
margin-right: 1em }
|
||||
|
||||
img.align-right, .figure.align-right, object.align-right, table.align-right {
|
||||
clear: right ;
|
||||
float: right ;
|
||||
margin-left: 1em }
|
||||
|
||||
img.align-center, .figure.align-center, object.align-center {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table.align-center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.align-left {
|
||||
text-align: left }
|
||||
|
||||
.align-center {
|
||||
clear: both ;
|
||||
text-align: center }
|
||||
|
||||
.align-right {
|
||||
text-align: right }
|
||||
|
||||
/* reset inner alignment in figures */
|
||||
div.align-right {
|
||||
text-align: inherit }
|
||||
|
||||
/* div.align-center * { */
|
||||
/* text-align: left } */
|
||||
|
||||
.align-top {
|
||||
vertical-align: top }
|
||||
|
||||
.align-middle {
|
||||
vertical-align: middle }
|
||||
|
||||
.align-bottom {
|
||||
vertical-align: bottom }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font: inherit }
|
||||
|
||||
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
pre.code .ln { color: gray; } /* line numbers */
|
||||
pre.code, code { background-color: #eeeeee }
|
||||
pre.code .comment, code .comment { color: #5C6576 }
|
||||
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
||||
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
||||
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
||||
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
||||
pre.code .inserted, code .inserted { background-color: #A3D289}
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic, pre.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid 1px gray;
|
||||
margin-left: 1px }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid 1px black;
|
||||
margin-left: 1px }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
/* "booktabs" style (no vertical lines) */
|
||||
table.docutils.booktabs {
|
||||
border: 0px;
|
||||
border-top: 2px solid;
|
||||
border-bottom: 2px solid;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
table.docutils.booktabs * {
|
||||
border: 0px;
|
||||
}
|
||||
table.docutils.booktabs th {
|
||||
border-bottom: thin solid;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="sale-discount-display-amount">
|
||||
<h1 class="title">Sale Discount Display Amount</h1>
|
||||
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:f993ed9de016c93793d3a69362d0d8a364da80d2a5664e5da575616da5433ff7
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<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/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 image-reference" href="https://github.com/OCA/sale-workflow/tree/18.0/sale_discount_display_amount"><img alt="OCA/sale-workflow" src="https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/sale-workflow-18-0/sale-workflow-18-0-sale_discount_display_amount"><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/sale-workflow&target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p>In standard Odoo only display the rate of the discount applied, never
|
||||
the amount. It could be great to be able to tell the customer how much
|
||||
he spares. This is the goal of this addons, it will show on a sale order
|
||||
the total without the discount and the value of the discount. You can
|
||||
choose if you want the discount on the Total with or the Total without
|
||||
TAX.</p>
|
||||
<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="toc-entry-1">Configuration</a></li>
|
||||
<li><a class="reference internal" href="#usage" id="toc-entry-2">Usage</a></li>
|
||||
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-3">Bug Tracker</a></li>
|
||||
<li><a class="reference internal" href="#credits" id="toc-entry-4">Credits</a><ul>
|
||||
<li><a class="reference internal" href="#authors" id="toc-entry-5">Authors</a></li>
|
||||
<li><a class="reference internal" href="#contributors" id="toc-entry-6">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#other-credits" id="toc-entry-7">Other credits</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="toc-entry-8">Maintainers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="configuration">
|
||||
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
|
||||
<p>To configure this module, you need to:</p>
|
||||
<ol class="arabic simple">
|
||||
<li>Go to Sales/Settings and check “Allow discounts on sales order lines”</li>
|
||||
<li>Go to Sales/Settings and check or uncheck “Show the Discount with
|
||||
TAX” depending on your needs</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="section" id="usage">
|
||||
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
|
||||
<p>To use this module, you need to:</p>
|
||||
<ol class="arabic simple">
|
||||
<li>Go on a sale order</li>
|
||||
<li>Set a discount on a line</li>
|
||||
<li>The value of the discount is dislayed in the total section as well as
|
||||
the total without it.</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="section" id="bug-tracker">
|
||||
<h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/sale-workflow/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 to smash it by providing a detailed and welcomed
|
||||
<a class="reference external" href="https://github.com/OCA/sale-workflow/issues/new?body=module:%20sale_discount_display_amount%0Aversion:%2018.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">
|
||||
<h1><a class="toc-backref" href="#toc-entry-4">Credits</a></h1>
|
||||
<div class="section" id="authors">
|
||||
<h2><a class="toc-backref" href="#toc-entry-5">Authors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>ACSONE SA/NV</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="contributors">
|
||||
<h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Cédric Pigeon <<a class="reference external" href="mailto:cedric.pigeon@acsone.eu">cedric.pigeon@acsone.eu</a>></li>
|
||||
<li>Abraham Anes <<a class="reference external" href="mailto:abrahamanes@gmail.com">abrahamanes@gmail.com</a>></li>
|
||||
<li>Chafique Delli <<a class="reference external" href="mailto:chafique.delli@akretion.com">chafique.delli@akretion.com</a>></li>
|
||||
<li>Ruchir Shukla <<a class="reference external" href="mailto:ruchir@bizzappdev.com">ruchir@bizzappdev.com</a>></li>
|
||||
<li>Manuel Regidor <<a class="reference external" href="mailto:manuel.regidor@sygel.es">manuel.regidor@sygel.es</a>></li>
|
||||
<li><a class="reference external" href="https://www.pesol.es">Pesol</a>:<ul>
|
||||
<li>Jonathan Oscategui Taza <<a class="reference external" href="mailto:info@pesol.es">info@pesol.es</a>></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference external" href="https://www.trobz.com">Trobz</a>:<ul>
|
||||
<li>Nhan Tran <<a class="reference external" href="mailto:nhant@trobz.com">nhant@trobz.com</a>></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="other-credits">
|
||||
<h2><a class="toc-backref" href="#toc-entry-7">Other credits</a></h2>
|
||||
<p>The migration of this module from 17.0 to 18.0 was financially supported
|
||||
by Camptocamp.</p>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
<h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
|
||||
<p>This module is maintained by the OCA.</p>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org">
|
||||
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
|
||||
</a>
|
||||
<p>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.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/sale-workflow/tree/18.0/sale_discount_display_amount">OCA/sale-workflow</a> project on GitHub.</p>
|
||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
1
sale_discount_display_amount/tests/__init__.py
Executable file
1
sale_discount_display_amount/tests/__init__.py
Executable file
@@ -0,0 +1 @@
|
||||
from . import test_discount_display_amount
|
||||
42
sale_discount_display_amount/tests/test_discount_display_amount.py
Executable file
42
sale_discount_display_amount/tests/test_discount_display_amount.py
Executable file
@@ -0,0 +1,42 @@
|
||||
# Copyright 2018 ACSONE SA/NV
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo.tests.common import TransactionCase
|
||||
|
||||
|
||||
class TestDiscountDisplay(TransactionCase):
|
||||
def test_sale_discount_value(self):
|
||||
product1 = self.env["product.product"].create(
|
||||
{"name": "Product TEST", "type": "consu"}
|
||||
)
|
||||
customer = self.env["res.partner"].create(
|
||||
{"name": "Customer TEST", "is_company": False, "email": "test@tes.ttest"}
|
||||
)
|
||||
so = self.env["sale.order"].create({"partner_id": customer.id})
|
||||
self.env["sale.order.line"].create(
|
||||
{"order_id": so.id, "product_id": product1.id, "price_unit": 30.75}
|
||||
)
|
||||
|
||||
first_line = so.order_line[0]
|
||||
first_line.discount = 10
|
||||
self.assertAlmostEqual(first_line.price_subtotal_no_discount, 30.75)
|
||||
self.assertAlmostEqual(first_line.price_total_no_discount, 35.36)
|
||||
self.assertAlmostEqual(first_line.discount_total, 3.53)
|
||||
self.assertAlmostEqual(so.price_subtotal_no_discount, 30.75)
|
||||
self.assertAlmostEqual(so.price_total_no_discount, 35.36)
|
||||
self.assertAlmostEqual(so.discount_total, 3.53)
|
||||
self.assertAlmostEqual(so.discount_subtotal, 3.07)
|
||||
|
||||
def test_sale_without_discount_value(self):
|
||||
product2 = self.env["product.product"].create(
|
||||
{"name": "Product TEST", "type": "consu"}
|
||||
)
|
||||
customer2 = self.env["res.partner"].create(
|
||||
{"name": "Customer TEST", "is_company": False, "email": "test@tes.ttest"}
|
||||
)
|
||||
so2 = self.env["sale.order"].create({"partner_id": customer2.id})
|
||||
self.env["sale.order.line"].create(
|
||||
{"order_id": so2.id, "product_id": product2.id, "price_unit": 30.75}
|
||||
)
|
||||
first_line = so2.order_line[0]
|
||||
self.assertEqual(first_line.price_total_no_discount, first_line.price_total)
|
||||
53
sale_discount_display_amount/views/res_config_settings_views.xml
Executable file
53
sale_discount_display_amount/views/res_config_settings_views.xml
Executable file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record
|
||||
id="res_config_settings_view_form_display_discount_with_tax"
|
||||
model="ir.ui.view"
|
||||
>
|
||||
<field name="name">res.config.settings.view.form.display.discount</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="priority" eval="99" />
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<block name="catalog_setting_container" position="inside">
|
||||
<div
|
||||
class="col-xs-12 col-md-6 o_setting_box"
|
||||
id="discount_display_amount"
|
||||
>
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="display_discount_with_tax" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="display_discount_with_tax" />
|
||||
<div class="text-muted">
|
||||
OFF = Shows the Discount without TAX<br
|
||||
/>ON = Shows the Discount with TAX
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</block>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record
|
||||
id="res_config_settings_view_form_report_total_without_discount"
|
||||
model="ir.ui.view"
|
||||
>
|
||||
<field
|
||||
name="name"
|
||||
>res.config.settings.view.form.report.total.without.discount</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="priority" eval="10" />
|
||||
<field name="inherit_id" ref="sale.res_config_settings_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<setting id="proforma_configuration" position="after">
|
||||
<setting
|
||||
id="report_total_without_discount"
|
||||
help='Display "Total without discount" in report'
|
||||
>
|
||||
<field name="report_total_without_discount" />
|
||||
</setting>
|
||||
</setting>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
49
sale_discount_display_amount/views/sale_view.xml
Executable file
49
sale_discount_display_amount/views/sale_view.xml
Executable file
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" ?>
|
||||
<odoo>
|
||||
<record id="view_order_form" model="ir.ui.view">
|
||||
<field name="inherit_id" ref="sale.view_order_form" />
|
||||
<field name="model">sale.order</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath
|
||||
expr="//field[@name='order_line']//list//field[@name='discount']"
|
||||
position="after"
|
||||
>
|
||||
<field name="price_subtotal_no_discount" optional="hide" />
|
||||
<field name="price_total_no_discount" optional="hide" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="sale_order_view_form_display_discount" model="ir.ui.view">
|
||||
<field name="inherit_id" ref="sale.view_order_form" />
|
||||
<field name="model">sale.order</field>
|
||||
<field name="priority">99</field>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<xpath expr="//group[@name='sale_total']" position="after">
|
||||
<group
|
||||
class="oe_subtotal_footer d-flex order-0 order-lg-1 flex-column gap-0 gap-sm-3"
|
||||
colspan="2"
|
||||
name="sale_discount_total"
|
||||
>
|
||||
<div class="d-flex" invisible="display_discount_with_tax">
|
||||
<label for="price_subtotal_no_discount" />
|
||||
<field name="price_subtotal_no_discount" nolabel="1" />
|
||||
</div>
|
||||
<div class="d-flex" invisible="display_discount_with_tax">
|
||||
<label for="discount_subtotal" />
|
||||
<field name="discount_subtotal" nolabel="1" />
|
||||
</div>
|
||||
<div class="d-flex" invisible="not display_discount_with_tax">
|
||||
<label for="price_total_no_discount" />
|
||||
<field name="price_total_no_discount" nolabel="1" />
|
||||
</div>
|
||||
<div class="d-flex" invisible="not display_discount_with_tax">
|
||||
<label for="discount_total" />
|
||||
<field name="discount_total" nolabel="1" />
|
||||
</div>
|
||||
</group>
|
||||
</xpath>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user