Metadata-Version: 2.1
Name: odoo-addon-purchase_order_general_discount
Version: 19.0.1.0.0.7
Requires-Dist: odoo==19.0.*
Summary: General discount per purchase order
Home-page: https://github.com/OCA/purchase-workflow
License: AGPL-3
Author: Tecnativa, Odoo Community Association (OCA)
Author-email: support@odoo-community.org
Classifier: Programming Language :: Python
Classifier: Framework :: Odoo
Classifier: Framework :: Odoo :: 19.0
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Description-Content-Type: text/x-rst

.. image:: https://odoo-community.org/readme-banner-image
   :target: https://odoo-community.org/get-involved?utm_source=readme
   :alt: Odoo Community Association

===============================
Purchase Order General Discount
===============================

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

.. |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/19.0/purchase_order_general_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-19-0/purchase-workflow-19-0-purchase_order_general_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=19.0
    :alt: Try me on Runboat

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

This module allows to set a general discount in a purchase order. This
general discount is applied to each line order.

You can also set a default general discount on suppliers and configure
to which line field the discount will be applied.

**Table of contents**

.. contents::
   :local:

Configuration
=============

You can set in settings another discount field to be applied. For
example, if we had purchase_triple_discount, we could set the general
discount in discount3 to be applied after all other discounts.

To do so:

1. Go to *Purchases > Configuration > Settings* and *Purchase Discount
   Field*
2. Select the discount you'd wish to use. purchase_triple_discount
   fields will appear when the module is installed.

There's a method at res.company called \_get_purchase_discount_fields
that can be used to extend more line discount fields. For example, if we
had the field discount4, we could extend it like this:

.. code:: python

   @api.model
   def _get_purchase_discount_fields(self):
       discount_fields = super()._get_purchase_discount_fields()
       discount_fields += [('discount4', _('Discount 4'))]
       return discount_fields

Usage
=====

To set a partner default general discount you need to:

1. Go to a partner and set the general discount in *Sales & Purchases*
   tab.

To set a general discount in a purchase order you need to:

1. Create a purchase order.
2. Either select a partner with a purchase general discount defined or
   set one in the summary section of the order.
3. This discount will be applied to every line.

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_order_general_discount%0Aversion:%2019.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
-------

* Tecnativa

Contributors
------------

- `Tecnativa <https://www.tecnativa.com>`__:

     - David Vidal
     - Pedro M. Baeza
     - Rafael Blasco
     - Carlos Roca
     - Pilar Vargas

- `Aures TIC <https://www.aurestic.es>`__:

     - Jose Zambudio
     - Anna Martinez

- `Komit <https://komit-consulting.com>`__:

  - Cuong Nguyen Mtm <cuong.nmtm@komit-consulting.com>

- `APSL-Nagarro <https://apsl.tech>`__

  - Antoni Marroig <antoni.marroig@nagarro.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/19.0/purchase_order_general_discount>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
