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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
141 changes: 141 additions & 0 deletions purchase_discount/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

===================================
Purchase order lines with discounts
===================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:c81456deae3988fb4a367ed008e8bf96d21bbbb562fc9c7bb226fa016426b2b9
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/license-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%2Fpurchase--workflow-lightgray.png?logo=github
:target: https://github.com/OCA/purchase-workflow/tree/16.0/purchase_discount
:alt: OCA/purchase-workflow
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_discount
: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/purchase-workflow&target_branch=16.0
:alt: Try me on Runboat

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

This module allows to define a discount per line in the purchase orders. This
discount can be also negative, interpreting it as an increment.

It also modifies the purchase order report to include the discount field in it.

This module allows to input a discount in the supplier info form, and propagate
it to purchase order lines:

* The discount appears explicitly in purchase orders instead of being directly
discounted in price.
* You can set prices and discounts on the same screen.

.. image:: https://raw.githubusercontent.com/OCA/purchase-workflow/16.0/purchase_discount/static/description/product_supplierinfo_form.png


* A new field default_supplierinfo_discount is added on res.partner model.
This value will be used as the default one, on each supplierinfo of that
supplier.

.. image:: https://raw.githubusercontent.com/OCA/purchase-workflow/16.0/purchase_discount/static/description/res_partner_company_form.png


Note: this setting is a new 'company' setting, unavailable for related
partners, as accounting-related Settings.

.. image:: https://raw.githubusercontent.com/OCA/purchase-workflow/16.0/purchase_discount/static/description/res_partner_individual_form.png

**Table of contents**

.. contents::
:local:

Usage
=====

Go to **Purchase > Products**, open one product, and edit or add a record on
the **Vendors** section of the **Purchase** tab. You will see in the prices
section in the down part a new column called **Discount (%)**. You can enter
here the desired discount for that quantity.

When you make a purchase order for that supplier and that product, discount
will be put automatically.

Known issues / Roadmap
======================

With this module, the *price_unit* field of purchase order line stores the gross price instead of the net price, which is a change in the meaning of
this field. So this module breaks all the other modules that use the *price_unit* field with it's native meaning.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/purchase-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/purchase-workflow/issues/new?body=module:%20purchase_discount%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Tiny
* Acysos S.L.
* Tecnativa
* ACSONE SA/NV
* GRAP

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

* OpenERP S.A.
* Ignacio Ibeas <ignacio@acysos.com>
* Pedro M. Baeza <pedro.baeza@tecnativa.com>
* Jonathan Nemry <jonathan.nemry@acsone.eu>
* Sylvain LE GAL (https://twitter.com/legalsylvain)
* Stefan Rijnhart <stefan@opener.amsterdam>
* `Tecnativa <https://www.tecnativa.com>`_:

* Pedro M. Baeza
* Vicent Cubells <vicent.cubells@tecnativa.com>

* Sudhir Arya <sudhir@erpharbor.com>
* Lorenzo Battistini <https://github.com/eLBati>
* Luisa Miguéns <luisa.miguens@solvos.es>
* Vishnu Vanneri <vanneri.odoodev@gmail.com>
* Moaad Bourhim <moaad.bourhim@gmail.com>

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/purchase-workflow <https://github.com/OCA/purchase-workflow/tree/16.0/purchase_discount>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions purchase_discount/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import report
26 changes: 26 additions & 0 deletions purchase_discount/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# © 2004-2009 Tiny SPRL (<http://tiny.be>).
# © 2014-2017 Tecnativa - Pedro M. Baeza
# © 2016 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
"name": "Purchase order lines with discounts",
"author": "Tiny, "
"Acysos S.L., "
"Tecnativa, "
"ACSONE SA/NV,"
"GRAP,"
"Odoo Community Association (OCA)",
"version": "18.0.1.0.0",
"category": "Purchase Management",
"website": "https://github.com/OCA/purchase-workflow",
"depends": ["purchase_stock"],
"data": [
"views/purchase_discount_view.xml",
"views/report_purchaseorder.xml",
"views/product_supplierinfo_view.xml",
"views/res_partner_view.xml",
],
"license": "AGPL-3",
"installable": True,
"images": ["images/purchase_discount.png"],
}
103 changes: 103 additions & 0 deletions purchase_discount/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * purchase_discount
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-23 17:50+0000\n"
"PO-Revision-Date: 2020-07-22 12:19+0000\n"
"Last-Translator: c2cdidier <didier.donze@camptocamp.com>\n"
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
"Language: de\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: purchase_discount
#: model_terms:ir.ui.view,arch_db:purchase_discount.report_purchaseorder_document
msgid "<strong>Disc. (%)</strong>"
msgstr "<strong>Rabatt (%)</strong>"

#. module: purchase_discount
#: model:ir.model,name:purchase_discount.model_res_partner
msgid "Contact"
msgstr "Kontakt"

#. module: purchase_discount
#: model:ir.model.fields,field_description:purchase_discount.field_res_partner__default_supplierinfo_discount
#: model:ir.model.fields,field_description:purchase_discount.field_res_users__default_supplierinfo_discount
msgid "Default Supplier Discount (%)"
msgstr "Standardlieferantenrabatt (%)"

#. module: purchase_discount
#: model:ir.model.fields,field_description:purchase_discount.field_product_supplierinfo__discount
#: model:ir.model.fields,field_description:purchase_discount.field_purchase_order_line__discount
msgid "Discount (%)"
msgstr "Rabatt (%)"

#. module: purchase_discount
#: model:ir.model.constraint,message:purchase_discount.constraint_purchase_order_line_discount_limit
msgid "Discount must be lower than 100%."
msgstr "Der Rabatt muss kleiner als 100% sein."

#. module: purchase_discount
#: model_terms:ir.ui.view,arch_db:purchase_discount.res_partner_form_view
msgid "Discount-related settings are managed on"
msgstr "Rabatt-bezogene Einstellungen werden verwaltet auf"

#. module: purchase_discount
#: model:ir.model,name:purchase_discount.model_purchase_order
msgid "Purchase Order"
msgstr "Bestellung"

#. module: purchase_discount
#: model:ir.model,name:purchase_discount.model_purchase_order_line
msgid "Purchase Order Line"
msgstr "Bestellposition"

#. module: purchase_discount
#: model:ir.model,name:purchase_discount.model_purchase_report
msgid "Purchase Report"
msgstr "Einkaufsbericht"

#. module: purchase_discount
#: model:ir.model,name:purchase_discount.model_product_supplierinfo
msgid "Supplier Pricelist"
msgstr "Lieferanten Preisliste"

#. module: purchase_discount
#: model:ir.model.constraint,message:purchase_discount.constraint_product_supplierinfo_discount_limit
msgid "Supplier discount must be lower than 100%."
msgstr ""

#. module: purchase_discount
#: model:ir.model.fields,help:purchase_discount.field_res_partner__default_supplierinfo_discount
#: model:ir.model.fields,help:purchase_discount.field_res_users__default_supplierinfo_discount
msgid ""
"This value will be used as the default one, for each new supplierinfo line "
"depending on that supplier."
msgstr ""
"Dieser Wert wird als Standardwert für jede neue Lieferanten-Info-Zeile in "
"Zusammenhang mit diesem Lieferanten verwendet."

#. module: purchase_discount
#: model:ir.model.fields,field_description:purchase_discount.field_purchase_report__discount
msgid "Total discount"
msgstr ""

#. module: purchase_discount
#: model_terms:ir.ui.view,arch_db:purchase_discount.res_partner_form_view
msgid "the parent company"
msgstr "Die Muttergesellschaft"

#~ msgid "Stock Move"
#~ msgstr "Lagerbewegung"

#~ msgid "Stock Rule"
#~ msgstr "Lagerregel"
95 changes: 95 additions & 0 deletions purchase_discount/i18n/el_GR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * purchase_discount
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-23 17:50+0000\n"
"PO-Revision-Date: 2018-02-23 17:50+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2018\n"
"Language-Team: Greek (Greece) (https://www.transifex.com/oca/teams/23907/"
"el_GR/)\n"
"Language: el_GR\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: purchase_discount
#: model_terms:ir.ui.view,arch_db:purchase_discount.report_purchaseorder_document
msgid "<strong>Disc. (%)</strong>"
msgstr ""

#. module: purchase_discount
#: model:ir.model,name:purchase_discount.model_res_partner
msgid "Contact"
msgstr ""

#. module: purchase_discount
#: model:ir.model.fields,field_description:purchase_discount.field_res_partner__default_supplierinfo_discount
#: model:ir.model.fields,field_description:purchase_discount.field_res_users__default_supplierinfo_discount
msgid "Default Supplier Discount (%)"
msgstr ""

#. module: purchase_discount
#: model:ir.model.fields,field_description:purchase_discount.field_product_supplierinfo__discount
#: model:ir.model.fields,field_description:purchase_discount.field_purchase_order_line__discount
msgid "Discount (%)"
msgstr "Έκπτωση (%)"

#. module: purchase_discount
#: model:ir.model.constraint,message:purchase_discount.constraint_purchase_order_line_discount_limit
msgid "Discount must be lower than 100%."
msgstr ""

#. module: purchase_discount
#: model_terms:ir.ui.view,arch_db:purchase_discount.res_partner_form_view
msgid "Discount-related settings are managed on"
msgstr ""

#. module: purchase_discount
#: model:ir.model,name:purchase_discount.model_purchase_order
msgid "Purchase Order"
msgstr ""

#. module: purchase_discount
#: model:ir.model,name:purchase_discount.model_purchase_order_line
msgid "Purchase Order Line"
msgstr ""

#. module: purchase_discount
#: model:ir.model,name:purchase_discount.model_purchase_report
msgid "Purchase Report"
msgstr ""

#. module: purchase_discount
#: model:ir.model,name:purchase_discount.model_product_supplierinfo
msgid "Supplier Pricelist"
msgstr ""

#. module: purchase_discount
#: model:ir.model.constraint,message:purchase_discount.constraint_product_supplierinfo_discount_limit
msgid "Supplier discount must be lower than 100%."
msgstr ""

#. module: purchase_discount
#: model:ir.model.fields,help:purchase_discount.field_res_partner__default_supplierinfo_discount
#: model:ir.model.fields,help:purchase_discount.field_res_users__default_supplierinfo_discount
msgid ""
"This value will be used as the default one, for each new supplierinfo line "
"depending on that supplier."
msgstr ""

#. module: purchase_discount
#: model:ir.model.fields,field_description:purchase_discount.field_purchase_report__discount
msgid "Total discount"
msgstr ""

#. module: purchase_discount
#: model_terms:ir.ui.view,arch_db:purchase_discount.res_partner_form_view
msgid "the parent company"
msgstr ""
Loading
Loading