Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG] purchase_order_general_discount: Migration to 18.0 #2462

Open
wants to merge 34 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
922d172
[ADD][11.0] purchase_order_general_discount: New Module
chienandalu Aug 27, 2019
225efcf
[FIX] purchase_order_general_discount: ui fixes
chienandalu Sep 4, 2019
02dc6f8
[FIX] purchase_order_general_discount: reset to default
chienandalu Dec 2, 2019
7fbcaee
[MIG] purchase_order_general_discount: migration to v12
CarlosRoca13 Sep 30, 2020
b7528ea
[UPD] Update purchase_order_general_discount.pot
oca-travis Oct 1, 2020
2ed0e9e
[UPD] README.rst
OCA-git-bot Oct 1, 2020
e56df76
Update translation files
oca-transbot Oct 7, 2020
03f3d66
Added translation using Weblate (Portuguese)
pedrocs-exo Mar 3, 2021
5386eb2
Translated using Weblate (Portuguese)
pedrocs-exo Mar 3, 2021
ebfdd4b
[IMP] purchase_order_general_discount: black, isort, prettier
CarlosRoca13 Feb 8, 2022
1b854d4
[MIG] purchase_order_general_discount: Migration to v13.0
CarlosRoca13 Feb 8, 2022
4ca32d1
[UPD] Update purchase_order_general_discount.pot
oca-travis Feb 9, 2022
0cca008
[UPD] README.rst
OCA-git-bot Feb 9, 2022
1a3c8d1
[IMP] purchase_order_general_discount: black, isort, prettier
zamberjo Oct 25, 2022
c374f99
[MIG] purchase_order_general_discount: Migration to 14.0
zamberjo Oct 25, 2022
445ea95
[UPD] Update purchase_order_general_discount.pot
Oct 27, 2022
092543e
[UPD] README.rst
OCA-git-bot Oct 27, 2022
e23c8c2
[MIG] purchase_order_general_discount: Migration to version 15.0
pilarvargas-tecnativa Dec 22, 2022
b1d36e7
[UPD] Update purchase_order_general_discount.pot
Dec 30, 2022
85607c9
[UPD] README.rst
OCA-git-bot Dec 30, 2022
50d608c
Update translation files
weblate Dec 30, 2022
e71351f
[IMP] purchase_order_general_discount: Make the tests compatible with…
Jan 16, 2023
a9ff638
purchase_order_general_discount 15.0.1.0.1
OCA-git-bot Jan 21, 2023
a22a4ba
[MIG] purchase_order_general_discount: Migration to 16.0
cuongnmtm Jun 5, 2023
38bb55f
[UPD] Update purchase_order_general_discount.pot
Dec 27, 2023
87e59a9
[BOT] post-merge updates
OCA-git-bot Dec 27, 2023
e96ca2d
Added translation using Weblate (Italian)
mymage Dec 28, 2023
65dc8fd
Translated using Weblate (Italian)
mymage Dec 28, 2023
d9c0fb8
Translated using Weblate (Spanish)
Ivorra78 Dec 29, 2023
34dad6d
[UPD] Update purchase_order_general_discount.pot
Mar 5, 2024
bbd70d3
Update translation files
weblate Mar 5, 2024
75b7a2c
Translated using Weblate (Italian)
mymage Mar 5, 2024
7542624
[IMP] purchase_order_general_discount: pre-commit auto fixes
achulii Nov 22, 2024
2862d29
[MIG] purchase_order_general_discount: Migration to 18.0
achulii Nov 22, 2024
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
136 changes: 136 additions & 0 deletions purchase_order_general_discount/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
===============================
Purchase Order General Discount
===============================

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

.. |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%2Fpurchase--workflow-lightgray.png?logo=github
:target: https://github.com/OCA/purchase-workflow/tree/18.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-18-0/purchase-workflow-18-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=18.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:%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
-------

* 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 <[email protected]>

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/18.0/purchase_order_general_discount>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions purchase_order_general_discount/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
19 changes: 19 additions & 0 deletions purchase_order_general_discount/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2019 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Purchase Order General Discount",
"summary": "General discount per purchase order",
"version": "18.0.1.0.0",
"category": "Purchases",
"website": "https://github.com/OCA/purchase-workflow",
"author": "Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": ["purchase"],
"data": [
"views/purchase_order_view.xml",
"views/res_partner_view.xml",
"views/res_config_view.xml",
],
}
122 changes: 122 additions & 0 deletions purchase_order_general_discount/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * purchase_order_general_discount
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-28 12:50+0000\n"
"PO-Revision-Date: 2023-12-29 10:35+0000\n"
"Last-Translator: Ivorra78 <[email protected]>\n"
"Language-Team: \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 4.17\n"

#. module: purchase_order_general_discount
#: model_terms:ir.ui.view,arch_db:purchase_order_general_discount.res_config_settings_view_form_purchase
msgid ""
"<span class=\"fa fa-lg fa-building-o\" title=\"Values set here are company-"
"specific.\" groups=\"base.group_multi_company\"/>"
msgstr ""
"<span class=\"fa fa-lg fa-building-o\" title=\"Los valores establecidos aquí "
"son específicos para cada compañía.\" groups=\"base.group_multi_company\"/>"

#. module: purchase_order_general_discount
#: model:ir.model,name:purchase_order_general_discount.model_res_company
msgid "Companies"
msgstr "Compañías"

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

#. module: purchase_order_general_discount
#. odoo-python
#: code:addons/purchase_order_general_discount/models/res_company.py:0
#, python-format
msgid "Discount"
msgstr "Descuento"

#. module: purchase_order_general_discount
#. odoo-python
#: code:addons/purchase_order_general_discount/models/res_company.py:0
#, python-format
msgid "Discount 2"
msgstr "Descuento 2"

#. module: purchase_order_general_discount
#. odoo-python
#: code:addons/purchase_order_general_discount/models/res_company.py:0
#, python-format
msgid "Discount 3"
msgstr "Descuento 3"

#. module: purchase_order_general_discount
#: model:ir.model.constraint,message:purchase_order_general_discount.constraint_purchase_order_general_discount_limit
msgid "Discount must be lower than 100%."
msgstr "El descuento debe ser menor del 100%."

#. module: purchase_order_general_discount
#: model:ir.model.fields,field_description:purchase_order_general_discount.field_purchase_order__general_discount
msgid "Gen. Disc. (%)"
msgstr "Desc. Gen. (%)"

#. module: purchase_order_general_discount
#: model:ir.model,name:purchase_order_general_discount.model_res_config_settings
msgid "Procurement purchase grouping settings"
msgstr "Configuración de la agrupación de adquisición de compras"

#. module: purchase_order_general_discount
#: model:ir.model.fields,field_description:purchase_order_general_discount.field_res_company__purchase_general_discount_field
#: model:ir.model.fields,field_description:purchase_order_general_discount.field_res_config_settings__purchase_general_discount_field
msgid "Purchase Discount Field"
msgstr "Campo para Descuento General de compra"

#. module: purchase_order_general_discount
#: model:ir.model.fields,field_description:purchase_order_general_discount.field_res_partner__purchase_general_discount
#: model:ir.model.fields,field_description:purchase_order_general_discount.field_res_users__purchase_general_discount
msgid "Purchase General Discount (%)"
msgstr "Descuento General de Compra (%)"

#. module: purchase_order_general_discount
#: model:ir.model,name:purchase_order_general_discount.model_purchase_order
msgid "Purchase Order"
msgstr "Pedido de compra"

#. module: purchase_order_general_discount
#: model_terms:ir.ui.view,arch_db:purchase_order_general_discount.res_config_settings_view_form_purchase
msgid ""
"Select to which purchase line field will the purchase general discount be "
"propagated."
msgstr ""
"Escoja a qué campo del descuento de la línea de pedido se propagará el "
"descuento general."

#. module: purchase_order_general_discount
#: model:ir.model.fields,help:purchase_order_general_discount.field_res_company__purchase_general_discount_field
#: model:ir.model.fields,help:purchase_order_general_discount.field_res_config_settings__purchase_general_discount_field
msgid ""
"Set the purchase line discount field in which the discounts will be applied."
msgstr ""
"Establecer el campo de descuento de la línea de pedido en el que se aplicará "
"el descuento."

#. module: purchase_order_general_discount
#: model_terms:ir.ui.view,arch_db:purchase_order_general_discount.purchase_order_form
msgid "Update general discounts"
msgstr "Actualizar descuento general"

#~ msgid "Field"
#~ msgstr "Campo"

#~ msgid "res.config.settings"
#~ msgstr "res.config.settings"

#~ msgid "Purchase Order Line"
#~ msgstr "Línea de pedido de compra"
115 changes: 115 additions & 0 deletions purchase_order_general_discount/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * purchase_order_general_discount
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-03-05 14:35+0000\n"
"Last-Translator: mymage <[email protected]>\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 4.17\n"

#. module: purchase_order_general_discount
#: model_terms:ir.ui.view,arch_db:purchase_order_general_discount.res_config_settings_view_form_purchase
msgid ""
"<span class=\"fa fa-lg fa-building-o\" title=\"Values set here are company-"
"specific.\" groups=\"base.group_multi_company\"/>"
msgstr ""
"<span class=\"fa fa-lg fa-building-o\" title=\"I valori impostati qui sono "
"specifici per azienda.\" groups=\"base.group_multi_company\"/>"

#. module: purchase_order_general_discount
#: model:ir.model,name:purchase_order_general_discount.model_res_company
msgid "Companies"
msgstr "Aziende"

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

#. module: purchase_order_general_discount
#. odoo-python
#: code:addons/purchase_order_general_discount/models/res_company.py:0
#, python-format
msgid "Discount"
msgstr "Sconto"

#. module: purchase_order_general_discount
#. odoo-python
#: code:addons/purchase_order_general_discount/models/res_company.py:0
#, python-format
msgid "Discount 2"
msgstr "Sconto 2"

#. module: purchase_order_general_discount
#. odoo-python
#: code:addons/purchase_order_general_discount/models/res_company.py:0
#, python-format
msgid "Discount 3"
msgstr "Sconto 3"

#. module: purchase_order_general_discount
#: model:ir.model.constraint,message:purchase_order_general_discount.constraint_purchase_order_general_discount_limit
msgid "Discount must be lower than 100%."
msgstr "Lo sconto deve essere minore del 100%."

#. module: purchase_order_general_discount
#: model:ir.model.fields,field_description:purchase_order_general_discount.field_purchase_order__general_discount
msgid "Gen. Disc. (%)"
msgstr "Sc. gen. (%)"

#. module: purchase_order_general_discount
#: model:ir.model,name:purchase_order_general_discount.model_res_config_settings
msgid "Procurement purchase grouping settings"
msgstr "Impostazioni raggruppamento approvvigionamento acquisti"

#. module: purchase_order_general_discount
#: model:ir.model.fields,field_description:purchase_order_general_discount.field_res_company__purchase_general_discount_field
#: model:ir.model.fields,field_description:purchase_order_general_discount.field_res_config_settings__purchase_general_discount_field
msgid "Purchase Discount Field"
msgstr "Campo sconto acquisti"

#. module: purchase_order_general_discount
#: model:ir.model.fields,field_description:purchase_order_general_discount.field_res_partner__purchase_general_discount
#: model:ir.model.fields,field_description:purchase_order_general_discount.field_res_users__purchase_general_discount
msgid "Purchase General Discount (%)"
msgstr "Sconto generale acquisti (%)"

#. module: purchase_order_general_discount
#: model:ir.model,name:purchase_order_general_discount.model_purchase_order
msgid "Purchase Order"
msgstr "Ordine di acquisto"

#. module: purchase_order_general_discount
#: model_terms:ir.ui.view,arch_db:purchase_order_general_discount.res_config_settings_view_form_purchase
msgid ""
"Select to which purchase line field will the purchase general discount be "
"propagated."
msgstr ""
"Selezionare in quale campo nella riga ordine di acquisto verrà propagato lo "
"sconto generale."

#. module: purchase_order_general_discount
#: model:ir.model.fields,help:purchase_order_general_discount.field_res_company__purchase_general_discount_field
#: model:ir.model.fields,help:purchase_order_general_discount.field_res_config_settings__purchase_general_discount_field
msgid ""
"Set the purchase line discount field in which the discounts will be applied."
msgstr ""
"Imposta il campo sconto sulla riga ordine d'acquisto dove lo sconto verrà "
"applicato."

#. module: purchase_order_general_discount
#: model_terms:ir.ui.view,arch_db:purchase_order_general_discount.purchase_order_form
msgid "Update general discounts"
msgstr "Aggiorna sconti generali"

#~ msgid "Config Settings"
#~ msgstr "Impostazioni configurazione"
Loading
Loading