Skip to content

Commit f60138b

Browse files
committed
Merge PR OCA#2938 into 19.0
Signed-off-by HviorForgeFlow
2 parents 723cc71 + 4033c27 commit f60138b

25 files changed

Lines changed: 1527 additions & 0 deletions
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
.. image:: https://odoo-community.org/readme-banner-image
2+
:target: https://odoo-community.org/get-involved?utm_source=readme
3+
:alt: Odoo Community Association
4+
5+
===============================
6+
Purchase Order General Discount
7+
===============================
8+
9+
..
10+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11+
!! This file is generated by oca-gen-addon-readme !!
12+
!! changes will be overwritten. !!
13+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14+
!! source digest: sha256:46d1525b685b4540f8339062122a76b6e068167500004980e603bf9e6874b1d1
15+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16+
17+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
18+
:target: https://odoo-community.org/page/development-status
19+
:alt: Beta
20+
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
21+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
22+
:alt: License: AGPL-3
23+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpurchase--workflow-lightgray.png?logo=github
24+
:target: https://github.com/OCA/purchase-workflow/tree/19.0/purchase_order_general_discount
25+
:alt: OCA/purchase-workflow
26+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27+
:target: https://translation.odoo-community.org/projects/purchase-workflow-19-0/purchase-workflow-19-0-purchase_order_general_discount
28+
:alt: Translate me on Weblate
29+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
30+
:target: https://runboat.odoo-community.org/builds?repo=OCA/purchase-workflow&target_branch=19.0
31+
:alt: Try me on Runboat
32+
33+
|badge1| |badge2| |badge3| |badge4| |badge5|
34+
35+
This module allows to set a general discount in a purchase order. This
36+
general discount is applied to each line order.
37+
38+
You can also set a default general discount on suppliers and configure
39+
to which line field the discount will be applied.
40+
41+
**Table of contents**
42+
43+
.. contents::
44+
:local:
45+
46+
Configuration
47+
=============
48+
49+
You can set in settings another discount field to be applied. For
50+
example, if we had purchase_triple_discount, we could set the general
51+
discount in discount3 to be applied after all other discounts.
52+
53+
To do so:
54+
55+
1. Go to *Purchases > Configuration > Settings* and *Purchase Discount
56+
Field*
57+
2. Select the discount you'd wish to use. purchase_triple_discount
58+
fields will appear when the module is installed.
59+
60+
There's a method at res.company called \_get_purchase_discount_fields
61+
that can be used to extend more line discount fields. For example, if we
62+
had the field discount4, we could extend it like this:
63+
64+
.. code:: python
65+
66+
@api.model
67+
def _get_purchase_discount_fields(self):
68+
discount_fields = super()._get_purchase_discount_fields()
69+
discount_fields += [('discount4', _('Discount 4'))]
70+
return discount_fields
71+
72+
Usage
73+
=====
74+
75+
To set a partner default general discount you need to:
76+
77+
1. Go to a partner and set the general discount in *Sales & Purchases*
78+
tab.
79+
80+
To set a general discount in a purchase order you need to:
81+
82+
1. Create a purchase order.
83+
2. Either select a partner with a purchase general discount defined or
84+
set one in the summary section of the order.
85+
3. This discount will be applied to every line.
86+
87+
Bug Tracker
88+
===========
89+
90+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/purchase-workflow/issues>`_.
91+
In case of trouble, please check there if your issue has already been reported.
92+
If you spotted it first, help us to smash it by providing a detailed and welcomed
93+
`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**>`_.
94+
95+
Do not contact contributors directly about support or help with technical issues.
96+
97+
Credits
98+
=======
99+
100+
Authors
101+
-------
102+
103+
* Tecnativa
104+
105+
Contributors
106+
------------
107+
108+
- `Tecnativa <https://www.tecnativa.com>`__:
109+
110+
- David Vidal
111+
- Pedro M. Baeza
112+
- Rafael Blasco
113+
- Carlos Roca
114+
- Pilar Vargas
115+
116+
- `Aures TIC <https://www.aurestic.es>`__:
117+
118+
- Jose Zambudio
119+
- Anna Martinez
120+
121+
- `Komit <https://komit-consulting.com>`__:
122+
123+
- Cuong Nguyen Mtm <cuong.nmtm@komit-consulting.com>
124+
125+
- `APSL-Nagarro <https://apsl.tech>`__
126+
127+
- Antoni Marroig <antoni.marroig@nagarro.com>
128+
129+
Maintainers
130+
-----------
131+
132+
This module is maintained by the OCA.
133+
134+
.. image:: https://odoo-community.org/logo.png
135+
:alt: Odoo Community Association
136+
:target: https://odoo-community.org
137+
138+
OCA, or the Odoo Community Association, is a nonprofit organization whose
139+
mission is to support the collaborative development of Odoo features and
140+
promote its widespread use.
141+
142+
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.
143+
144+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2019 Tecnativa - David Vidal
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
{
4+
"name": "Purchase Order General Discount",
5+
"summary": "General discount per purchase order",
6+
"version": "19.0.1.0.0",
7+
"category": "Purchases",
8+
"website": "https://github.com/OCA/purchase-workflow",
9+
"author": "Tecnativa, Odoo Community Association (OCA)",
10+
"license": "AGPL-3",
11+
"application": False,
12+
"installable": True,
13+
"depends": ["purchase"],
14+
"data": [
15+
"views/purchase_order_view.xml",
16+
"views/res_partner_view.xml",
17+
"views/res_config_view.xml",
18+
],
19+
}
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * purchase_order_general_discount
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 11.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"POT-Creation-Date: 2019-08-28 12:50+0000\n"
10+
"PO-Revision-Date: 2023-12-29 10:35+0000\n"
11+
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
12+
"Language-Team: \n"
13+
"Language: es\n"
14+
"MIME-Version: 1.0\n"
15+
"Content-Type: text/plain; charset=UTF-8\n"
16+
"Content-Transfer-Encoding: \n"
17+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
18+
"X-Generator: Weblate 4.17\n"
19+
20+
#. module: purchase_order_general_discount
21+
#: model_terms:ir.ui.view,arch_db:purchase_order_general_discount.res_config_settings_view_form_purchase
22+
msgid ""
23+
"<span class=\"fa fa-lg fa-building-o\" title=\"Values set here are company-"
24+
"specific.\" groups=\"base.group_multi_company\"/>"
25+
msgstr ""
26+
"<span class=\"fa fa-lg fa-building-o\" title=\"Los valores establecidos aquí "
27+
"son específicos para cada compañía.\" groups=\"base.group_multi_company\"/>"
28+
29+
#. module: purchase_order_general_discount
30+
#: model:ir.model,name:purchase_order_general_discount.model_res_company
31+
msgid "Companies"
32+
msgstr "Compañías"
33+
34+
#. module: purchase_order_general_discount
35+
#: model:ir.model,name:purchase_order_general_discount.model_res_partner
36+
msgid "Contact"
37+
msgstr "Contacto"
38+
39+
#. module: purchase_order_general_discount
40+
#. odoo-python
41+
#: code:addons/purchase_order_general_discount/models/res_company.py:0
42+
#, python-format
43+
msgid "Discount"
44+
msgstr "Descuento"
45+
46+
#. module: purchase_order_general_discount
47+
#. odoo-python
48+
#: code:addons/purchase_order_general_discount/models/res_company.py:0
49+
#, python-format
50+
msgid "Discount 2"
51+
msgstr "Descuento 2"
52+
53+
#. module: purchase_order_general_discount
54+
#. odoo-python
55+
#: code:addons/purchase_order_general_discount/models/res_company.py:0
56+
#, python-format
57+
msgid "Discount 3"
58+
msgstr "Descuento 3"
59+
60+
#. module: purchase_order_general_discount
61+
#: model:ir.model.constraint,message:purchase_order_general_discount.constraint_purchase_order_general_discount_limit
62+
msgid "Discount must be lower than 100%."
63+
msgstr "El descuento debe ser menor del 100%."
64+
65+
#. module: purchase_order_general_discount
66+
#: model:ir.model.fields,field_description:purchase_order_general_discount.field_purchase_order__general_discount
67+
msgid "Gen. Disc. (%)"
68+
msgstr "Desc. Gen. (%)"
69+
70+
#. module: purchase_order_general_discount
71+
#: model:ir.model,name:purchase_order_general_discount.model_res_config_settings
72+
msgid "Procurement purchase grouping settings"
73+
msgstr "Configuración de la agrupación de adquisición de compras"
74+
75+
#. module: purchase_order_general_discount
76+
#: model:ir.model.fields,field_description:purchase_order_general_discount.field_res_company__purchase_general_discount_field
77+
#: model:ir.model.fields,field_description:purchase_order_general_discount.field_res_config_settings__purchase_general_discount_field
78+
msgid "Purchase Discount Field"
79+
msgstr "Campo para Descuento General de compra"
80+
81+
#. module: purchase_order_general_discount
82+
#: model:ir.model.fields,field_description:purchase_order_general_discount.field_res_partner__purchase_general_discount
83+
#: model:ir.model.fields,field_description:purchase_order_general_discount.field_res_users__purchase_general_discount
84+
msgid "Purchase General Discount (%)"
85+
msgstr "Descuento General de Compra (%)"
86+
87+
#. module: purchase_order_general_discount
88+
#: model:ir.model,name:purchase_order_general_discount.model_purchase_order
89+
msgid "Purchase Order"
90+
msgstr "Pedido de compra"
91+
92+
#. module: purchase_order_general_discount
93+
#: model_terms:ir.ui.view,arch_db:purchase_order_general_discount.res_config_settings_view_form_purchase
94+
msgid ""
95+
"Select to which purchase line field will the purchase general discount be "
96+
"propagated."
97+
msgstr ""
98+
"Escoja a qué campo del descuento de la línea de pedido se propagará el "
99+
"descuento general."
100+
101+
#. module: purchase_order_general_discount
102+
#: model:ir.model.fields,help:purchase_order_general_discount.field_res_company__purchase_general_discount_field
103+
#: model:ir.model.fields,help:purchase_order_general_discount.field_res_config_settings__purchase_general_discount_field
104+
msgid ""
105+
"Set the purchase line discount field in which the discounts will be applied."
106+
msgstr ""
107+
"Establecer el campo de descuento de la línea de pedido en el que se aplicará "
108+
"el descuento."
109+
110+
#. module: purchase_order_general_discount
111+
#: model_terms:ir.ui.view,arch_db:purchase_order_general_discount.purchase_order_form
112+
msgid "Update general discounts"
113+
msgstr "Actualizar descuento general"
114+
115+
#~ msgid "Field"
116+
#~ msgstr "Campo"
117+
118+
#~ msgid "res.config.settings"
119+
#~ msgstr "res.config.settings"
120+
121+
#~ msgid "Purchase Order Line"
122+
#~ msgstr "Línea de pedido de compra"

0 commit comments

Comments
 (0)