odoo-addon-purchase-order-general-discount 16.0.1.0.0.10__py3-none-any.whl → 18.0.1.0.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- odoo/addons/purchase_order_general_discount/README.rst +50 -44
- odoo/addons/purchase_order_general_discount/__manifest__.py +2 -2
- odoo/addons/purchase_order_general_discount/i18n/purchase_order_general_discount.pot +1 -4
- odoo/addons/purchase_order_general_discount/models/purchase_order.py +1 -1
- odoo/addons/purchase_order_general_discount/readme/CONFIGURE.md +22 -0
- odoo/addons/purchase_order_general_discount/readme/CONTRIBUTORS.md +16 -0
- odoo/addons/purchase_order_general_discount/readme/{DESCRIPTION.rst → DESCRIPTION.md} +4 -4
- odoo/addons/purchase_order_general_discount/readme/USAGE.md +11 -0
- odoo/addons/purchase_order_general_discount/static/description/index.html +45 -34
- odoo/addons/purchase_order_general_discount/tests/test_purchase_order_general_discount.py +2 -2
- odoo/addons/purchase_order_general_discount/views/purchase_order_view.xml +0 -2
- odoo/addons/purchase_order_general_discount/views/res_config_view.xml +1 -5
- odoo/addons/purchase_order_general_discount/views/res_partner_view.xml +7 -9
- {odoo_addon_purchase_order_general_discount-16.0.1.0.0.10.dist-info → odoo_addon_purchase_order_general_discount-18.0.1.0.0.2.dist-info}/METADATA +55 -50
- {odoo_addon_purchase_order_general_discount-16.0.1.0.0.10.dist-info → odoo_addon_purchase_order_general_discount-18.0.1.0.0.2.dist-info}/RECORD +17 -18
- {odoo_addon_purchase_order_general_discount-16.0.1.0.0.10.dist-info → odoo_addon_purchase_order_general_discount-18.0.1.0.0.2.dist-info}/WHEEL +1 -1
- odoo_addon_purchase_order_general_discount-18.0.1.0.0.2.dist-info/top_level.txt +1 -0
- odoo/addons/purchase_order_general_discount/i18n/fr.po +0 -113
- odoo/addons/purchase_order_general_discount/readme/CONFIGURE.rst +0 -21
- odoo/addons/purchase_order_general_discount/readme/CONTRIBUTORS.rst +0 -16
- odoo/addons/purchase_order_general_discount/readme/USAGE.rst +0 -10
- odoo_addon_purchase_order_general_discount-16.0.1.0.0.10.dist-info/top_level.txt +0 -1
|
@@ -1,3 +1,7 @@
|
|
|
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
|
+
|
|
1
5
|
===============================
|
|
2
6
|
Purchase Order General Discount
|
|
3
7
|
===============================
|
|
@@ -7,32 +11,32 @@ Purchase Order General Discount
|
|
|
7
11
|
!! This file is generated by oca-gen-addon-readme !!
|
|
8
12
|
!! changes will be overwritten. !!
|
|
9
13
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
10
|
-
!! source digest: sha256:
|
|
14
|
+
!! source digest: sha256:46d1525b685b4540f8339062122a76b6e068167500004980e603bf9e6874b1d1
|
|
11
15
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
12
16
|
|
|
13
17
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
14
18
|
:target: https://odoo-community.org/page/development-status
|
|
15
19
|
:alt: Beta
|
|
16
|
-
.. |badge2| image:: https://img.shields.io/badge/
|
|
20
|
+
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
|
|
17
21
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
|
18
22
|
:alt: License: AGPL-3
|
|
19
23
|
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpurchase--workflow-lightgray.png?logo=github
|
|
20
|
-
:target: https://github.com/OCA/purchase-workflow/tree/
|
|
24
|
+
:target: https://github.com/OCA/purchase-workflow/tree/18.0/purchase_order_general_discount
|
|
21
25
|
:alt: OCA/purchase-workflow
|
|
22
26
|
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
|
23
|
-
:target: https://translation.odoo-community.org/projects/purchase-workflow-
|
|
27
|
+
:target: https://translation.odoo-community.org/projects/purchase-workflow-18-0/purchase-workflow-18-0-purchase_order_general_discount
|
|
24
28
|
:alt: Translate me on Weblate
|
|
25
29
|
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
|
26
|
-
:target: https://runboat.odoo-community.org/builds?repo=OCA/purchase-workflow&target_branch=
|
|
30
|
+
:target: https://runboat.odoo-community.org/builds?repo=OCA/purchase-workflow&target_branch=18.0
|
|
27
31
|
:alt: Try me on Runboat
|
|
28
32
|
|
|
29
33
|
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|
30
34
|
|
|
31
|
-
This module allows to set a general discount in a purchase order. This
|
|
32
|
-
discount is applied to each line order.
|
|
35
|
+
This module allows to set a general discount in a purchase order. This
|
|
36
|
+
general discount is applied to each line order.
|
|
33
37
|
|
|
34
|
-
You can also set a default general discount on suppliers and configure
|
|
35
|
-
line field the discount will be applied.
|
|
38
|
+
You can also set a default general discount on suppliers and configure
|
|
39
|
+
to which line field the discount will be applied.
|
|
36
40
|
|
|
37
41
|
**Table of contents**
|
|
38
42
|
|
|
@@ -42,41 +46,43 @@ line field the discount will be applied.
|
|
|
42
46
|
Configuration
|
|
43
47
|
=============
|
|
44
48
|
|
|
45
|
-
You can set in settings another discount field to be applied.
|
|
46
|
-
|
|
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
|
|
47
51
|
discount in discount3 to be applied after all other discounts.
|
|
48
52
|
|
|
49
53
|
To do so:
|
|
50
54
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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.
|
|
54
59
|
|
|
55
|
-
There's a method at
|
|
56
|
-
can be used to extend more line discount fields. For example, if we
|
|
57
|
-
field
|
|
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:
|
|
58
63
|
|
|
59
|
-
.. code
|
|
64
|
+
.. code:: python
|
|
60
65
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
|
66
71
|
|
|
67
72
|
Usage
|
|
68
73
|
=====
|
|
69
74
|
|
|
70
75
|
To set a partner default general discount you need to:
|
|
71
76
|
|
|
72
|
-
|
|
77
|
+
1. Go to a partner and set the general discount in *Sales & Purchases*
|
|
78
|
+
tab.
|
|
73
79
|
|
|
74
80
|
To set a general discount in a purchase order you need to:
|
|
75
81
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
in the summary section of the order.
|
|
79
|
-
|
|
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.
|
|
80
86
|
|
|
81
87
|
Bug Tracker
|
|
82
88
|
===========
|
|
@@ -84,7 +90,7 @@ Bug Tracker
|
|
|
84
90
|
Bugs are tracked on `GitHub Issues <https://github.com/OCA/purchase-workflow/issues>`_.
|
|
85
91
|
In case of trouble, please check there if your issue has already been reported.
|
|
86
92
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
87
|
-
`feedback <https://github.com/OCA/purchase-workflow/issues/new?body=module:%20purchase_order_general_discount%0Aversion:%
|
|
93
|
+
`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**>`_.
|
|
88
94
|
|
|
89
95
|
Do not contact contributors directly about support or help with technical issues.
|
|
90
96
|
|
|
@@ -92,32 +98,32 @@ Credits
|
|
|
92
98
|
=======
|
|
93
99
|
|
|
94
100
|
Authors
|
|
95
|
-
|
|
101
|
+
-------
|
|
96
102
|
|
|
97
103
|
* Tecnativa
|
|
98
104
|
|
|
99
105
|
Contributors
|
|
100
|
-
|
|
106
|
+
------------
|
|
101
107
|
|
|
102
|
-
|
|
108
|
+
- `Tecnativa <https://www.tecnativa.com>`__:
|
|
103
109
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
110
|
+
- David Vidal
|
|
111
|
+
- Pedro M. Baeza
|
|
112
|
+
- Rafael Blasco
|
|
113
|
+
- Carlos Roca
|
|
114
|
+
- Pilar Vargas
|
|
109
115
|
|
|
110
|
-
|
|
116
|
+
- `Aures TIC <https://www.aurestic.es>`__:
|
|
111
117
|
|
|
112
|
-
|
|
113
|
-
|
|
118
|
+
- Jose Zambudio
|
|
119
|
+
- Anna Martinez
|
|
114
120
|
|
|
115
|
-
|
|
121
|
+
- `Komit <https://komit-consulting.com>`__:
|
|
116
122
|
|
|
117
|
-
|
|
123
|
+
- Cuong Nguyen Mtm <cuong.nmtm@komit-consulting.com>
|
|
118
124
|
|
|
119
125
|
Maintainers
|
|
120
|
-
|
|
126
|
+
-----------
|
|
121
127
|
|
|
122
128
|
This module is maintained by the OCA.
|
|
123
129
|
|
|
@@ -129,6 +135,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
|
129
135
|
mission is to support the collaborative development of Odoo features and
|
|
130
136
|
promote its widespread use.
|
|
131
137
|
|
|
132
|
-
This module is part of the `OCA/purchase-workflow <https://github.com/OCA/purchase-workflow/tree/
|
|
138
|
+
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.
|
|
133
139
|
|
|
134
140
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
{
|
|
4
4
|
"name": "Purchase Order General Discount",
|
|
5
5
|
"summary": "General discount per purchase order",
|
|
6
|
-
"version": "
|
|
6
|
+
"version": "18.0.1.0.0",
|
|
7
7
|
"category": "Purchases",
|
|
8
8
|
"website": "https://github.com/OCA/purchase-workflow",
|
|
9
9
|
"author": "Tecnativa, Odoo Community Association (OCA)",
|
|
10
10
|
"license": "AGPL-3",
|
|
11
11
|
"application": False,
|
|
12
12
|
"installable": True,
|
|
13
|
-
"depends": ["
|
|
13
|
+
"depends": ["purchase"],
|
|
14
14
|
"data": [
|
|
15
15
|
"views/purchase_order_view.xml",
|
|
16
16
|
"views/res_partner_view.xml",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
#
|
|
5
5
|
msgid ""
|
|
6
6
|
msgstr ""
|
|
7
|
-
"Project-Id-Version: Odoo Server
|
|
7
|
+
"Project-Id-Version: Odoo Server 18.0\n"
|
|
8
8
|
"Report-Msgid-Bugs-To: \n"
|
|
9
9
|
"Last-Translator: \n"
|
|
10
10
|
"Language-Team: \n"
|
|
@@ -33,21 +33,18 @@ msgstr ""
|
|
|
33
33
|
#. module: purchase_order_general_discount
|
|
34
34
|
#. odoo-python
|
|
35
35
|
#: code:addons/purchase_order_general_discount/models/res_company.py:0
|
|
36
|
-
#, python-format
|
|
37
36
|
msgid "Discount"
|
|
38
37
|
msgstr ""
|
|
39
38
|
|
|
40
39
|
#. module: purchase_order_general_discount
|
|
41
40
|
#. odoo-python
|
|
42
41
|
#: code:addons/purchase_order_general_discount/models/res_company.py:0
|
|
43
|
-
#, python-format
|
|
44
42
|
msgid "Discount 2"
|
|
45
43
|
msgstr ""
|
|
46
44
|
|
|
47
45
|
#. module: purchase_order_general_discount
|
|
48
46
|
#. odoo-python
|
|
49
47
|
#: code:addons/purchase_order_general_discount/models/res_company.py:0
|
|
50
|
-
#, python-format
|
|
51
48
|
msgid "Discount 3"
|
|
52
49
|
msgstr ""
|
|
53
50
|
|
|
@@ -61,7 +61,7 @@ class PurchaseOrder(models.Model):
|
|
|
61
61
|
order_line_field = order_line_fields[0]
|
|
62
62
|
context = order_line_field.attrib.get("context", "{}").replace(
|
|
63
63
|
"{",
|
|
64
|
-
"{{'default_{}': general_discount, "
|
|
64
|
+
f"{{'default_{discount_field}': general_discount, ",
|
|
65
65
|
1,
|
|
66
66
|
)
|
|
67
67
|
order_line_field.attrib["context"] = context
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
You can set in settings another discount field to be applied. For
|
|
2
|
+
example, if we had purchase_triple_discount, we could set the general
|
|
3
|
+
discount in discount3 to be applied after all other discounts.
|
|
4
|
+
|
|
5
|
+
To do so:
|
|
6
|
+
|
|
7
|
+
1. Go to *Purchases \> Configuration \> Settings* and *Purchase
|
|
8
|
+
Discount Field*
|
|
9
|
+
2. Select the discount you'd wish to use. purchase_triple_discount
|
|
10
|
+
fields will appear when the module is installed.
|
|
11
|
+
|
|
12
|
+
There's a method at res.company called \_get_purchase_discount_fields
|
|
13
|
+
that can be used to extend more line discount fields. For example, if we
|
|
14
|
+
had the field discount4, we could extend it like this:
|
|
15
|
+
|
|
16
|
+
``` python
|
|
17
|
+
@api.model
|
|
18
|
+
def _get_purchase_discount_fields(self):
|
|
19
|
+
discount_fields = super()._get_purchase_discount_fields()
|
|
20
|
+
discount_fields += [('discount4', _('Discount 4'))]
|
|
21
|
+
return discount_fields
|
|
22
|
+
```
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
- [Tecnativa](https://www.tecnativa.com):
|
|
2
|
+
|
|
3
|
+
> - David Vidal
|
|
4
|
+
> - Pedro M. Baeza
|
|
5
|
+
> - Rafael Blasco
|
|
6
|
+
> - Carlos Roca
|
|
7
|
+
> - Pilar Vargas
|
|
8
|
+
|
|
9
|
+
- [Aures TIC](https://www.aurestic.es):
|
|
10
|
+
|
|
11
|
+
> - Jose Zambudio
|
|
12
|
+
> - Anna Martinez
|
|
13
|
+
|
|
14
|
+
- [Komit](https://komit-consulting.com):
|
|
15
|
+
|
|
16
|
+
- Cuong Nguyen Mtm \<<cuong.nmtm@komit-consulting.com>\>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
This module allows to set a general discount in a purchase order. This
|
|
2
|
-
discount is applied to each line order.
|
|
1
|
+
This module allows to set a general discount in a purchase order. This
|
|
2
|
+
general discount is applied to each line order.
|
|
3
3
|
|
|
4
|
-
You can also set a default general discount on suppliers and configure
|
|
5
|
-
line field the discount will be applied.
|
|
4
|
+
You can also set a default general discount on suppliers and configure
|
|
5
|
+
to which line field the discount will be applied.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
To set a partner default general discount you need to:
|
|
2
|
+
|
|
3
|
+
1. Go to a partner and set the general discount in *Sales & Purchases*
|
|
4
|
+
tab.
|
|
5
|
+
|
|
6
|
+
To set a general discount in a purchase order you need to:
|
|
7
|
+
|
|
8
|
+
1. Create a purchase order.
|
|
9
|
+
2. Either select a partner with a purchase general discount defined or
|
|
10
|
+
set one in the summary section of the order.
|
|
11
|
+
3. This discount will be applied to every line.
|
|
@@ -3,15 +3,16 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
5
5
|
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
|
|
6
|
-
<title>
|
|
6
|
+
<title>README.rst</title>
|
|
7
7
|
<style type="text/css">
|
|
8
8
|
|
|
9
9
|
/*
|
|
10
10
|
:Author: David Goodger (goodger@python.org)
|
|
11
|
-
:Id: $Id: html4css1.css
|
|
11
|
+
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
|
|
12
12
|
:Copyright: This stylesheet has been placed in the public domain.
|
|
13
13
|
|
|
14
14
|
Default cascading style sheet for the HTML output of Docutils.
|
|
15
|
+
Despite the name, some widely supported CSS2 features are used.
|
|
15
16
|
|
|
16
17
|
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
|
17
18
|
customize this style sheet.
|
|
@@ -274,7 +275,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
|
|
274
275
|
margin-left: 2em ;
|
|
275
276
|
margin-right: 2em }
|
|
276
277
|
|
|
277
|
-
pre.code .ln { color:
|
|
278
|
+
pre.code .ln { color: gray; } /* line numbers */
|
|
278
279
|
pre.code, code { background-color: #eeeeee }
|
|
279
280
|
pre.code .comment, code .comment { color: #5C6576 }
|
|
280
281
|
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
|
@@ -300,7 +301,7 @@ span.option {
|
|
|
300
301
|
span.pre {
|
|
301
302
|
white-space: pre }
|
|
302
303
|
|
|
303
|
-
span.problematic {
|
|
304
|
+
span.problematic, pre.problematic {
|
|
304
305
|
color: red }
|
|
305
306
|
|
|
306
307
|
span.section-subtitle {
|
|
@@ -359,20 +360,25 @@ ul.auto-toc {
|
|
|
359
360
|
</style>
|
|
360
361
|
</head>
|
|
361
362
|
<body>
|
|
362
|
-
<div class="document"
|
|
363
|
-
<h1 class="title">Purchase Order General Discount</h1>
|
|
363
|
+
<div class="document">
|
|
364
364
|
|
|
365
|
+
|
|
366
|
+
<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
|
|
367
|
+
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
|
|
368
|
+
</a>
|
|
369
|
+
<div class="section" id="purchase-order-general-discount">
|
|
370
|
+
<h1>Purchase Order General Discount</h1>
|
|
365
371
|
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
366
372
|
!! This file is generated by oca-gen-addon-readme !!
|
|
367
373
|
!! changes will be overwritten. !!
|
|
368
374
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
369
|
-
!! source digest: sha256:
|
|
375
|
+
!! source digest: sha256:46d1525b685b4540f8339062122a76b6e068167500004980e603bf9e6874b1d1
|
|
370
376
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
|
371
|
-
<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/
|
|
372
|
-
<p>This module allows to set a general discount in a purchase order. This
|
|
373
|
-
discount is applied to each line order.</p>
|
|
374
|
-
<p>You can also set a default general discount on suppliers and configure
|
|
375
|
-
line field the discount will be applied.</p>
|
|
377
|
+
<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/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/purchase-workflow/tree/18.0/purchase_order_general_discount"><img alt="OCA/purchase-workflow" src="https://img.shields.io/badge/github-OCA%2Fpurchase--workflow-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/purchase-workflow-18-0/purchase-workflow-18-0-purchase_order_general_discount"><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/purchase-workflow&target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
|
378
|
+
<p>This module allows to set a general discount in a purchase order. This
|
|
379
|
+
general discount is applied to each line order.</p>
|
|
380
|
+
<p>You can also set a default general discount on suppliers and configure
|
|
381
|
+
to which line field the discount will be applied.</p>
|
|
376
382
|
<p><strong>Table of contents</strong></p>
|
|
377
383
|
<div class="contents local topic" id="contents">
|
|
378
384
|
<ul class="simple">
|
|
@@ -388,59 +394,61 @@ line field the discount will be applied.</p>
|
|
|
388
394
|
</ul>
|
|
389
395
|
</div>
|
|
390
396
|
<div class="section" id="configuration">
|
|
391
|
-
<
|
|
392
|
-
<p>You can set in settings another discount field to be applied.
|
|
393
|
-
|
|
397
|
+
<h2><a class="toc-backref" href="#toc-entry-1">Configuration</a></h2>
|
|
398
|
+
<p>You can set in settings another discount field to be applied. For
|
|
399
|
+
example, if we had purchase_triple_discount, we could set the general
|
|
394
400
|
discount in discount3 to be applied after all other discounts.</p>
|
|
395
401
|
<p>To do so:</p>
|
|
396
402
|
<ol class="arabic simple">
|
|
397
|
-
<li>Go to <em>Purchases > Configuration > Settings</em> and <em>Purchase Discount
|
|
398
|
-
|
|
399
|
-
|
|
403
|
+
<li>Go to <em>Purchases > Configuration > Settings</em> and <em>Purchase Discount
|
|
404
|
+
Field</em></li>
|
|
405
|
+
<li>Select the discount you’d wish to use. purchase_triple_discount
|
|
406
|
+
fields will appear when the module is installed.</li>
|
|
400
407
|
</ol>
|
|
401
|
-
<p>There’s a method at
|
|
402
|
-
can be used to extend more line discount fields. For example, if we
|
|
403
|
-
field
|
|
408
|
+
<p>There’s a method at res.company called _get_purchase_discount_fields
|
|
409
|
+
that can be used to extend more line discount fields. For example, if we
|
|
410
|
+
had the field discount4, we could extend it like this:</p>
|
|
404
411
|
<pre class="code python literal-block">
|
|
405
412
|
<span class="nd">@api</span><span class="o">.</span><span class="n">model</span><span class="w">
|
|
406
|
-
</span><span class="k">def</span>
|
|
413
|
+
</span><span class="k">def</span><span class="w"> </span><span class="nf">_get_purchase_discount_fields</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span><span class="w">
|
|
407
414
|
</span> <span class="n">discount_fields</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">_get_purchase_discount_fields</span><span class="p">()</span><span class="w">
|
|
408
415
|
</span> <span class="n">discount_fields</span> <span class="o">+=</span> <span class="p">[(</span><span class="s1">'discount4'</span><span class="p">,</span> <span class="n">_</span><span class="p">(</span><span class="s1">'Discount 4'</span><span class="p">))]</span><span class="w">
|
|
409
416
|
</span> <span class="k">return</span> <span class="n">discount_fields</span>
|
|
410
417
|
</pre>
|
|
411
418
|
</div>
|
|
412
419
|
<div class="section" id="usage">
|
|
413
|
-
<
|
|
420
|
+
<h2><a class="toc-backref" href="#toc-entry-2">Usage</a></h2>
|
|
414
421
|
<p>To set a partner default general discount you need to:</p>
|
|
415
422
|
<ol class="arabic simple">
|
|
416
|
-
<li>Go to a partner and set the general discount in <em>Sales & Purchases</em>
|
|
423
|
+
<li>Go to a partner and set the general discount in <em>Sales & Purchases</em>
|
|
424
|
+
tab.</li>
|
|
417
425
|
</ol>
|
|
418
426
|
<p>To set a general discount in a purchase order you need to:</p>
|
|
419
427
|
<ol class="arabic simple">
|
|
420
428
|
<li>Create a purchase order.</li>
|
|
421
|
-
<li>Either select a partner with a purchase general discount defined or
|
|
422
|
-
in the summary section of the order.</li>
|
|
429
|
+
<li>Either select a partner with a purchase general discount defined or
|
|
430
|
+
set one in the summary section of the order.</li>
|
|
423
431
|
<li>This discount will be applied to every line.</li>
|
|
424
432
|
</ol>
|
|
425
433
|
</div>
|
|
426
434
|
<div class="section" id="bug-tracker">
|
|
427
|
-
<
|
|
435
|
+
<h2><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h2>
|
|
428
436
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/purchase-workflow/issues">GitHub Issues</a>.
|
|
429
437
|
In case of trouble, please check there if your issue has already been reported.
|
|
430
438
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
431
|
-
<a class="reference external" href="https://github.com/OCA/purchase-workflow/issues/new?body=module:%20purchase_order_general_discount%0Aversion:%
|
|
439
|
+
<a class="reference external" href="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**">feedback</a>.</p>
|
|
432
440
|
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
|
433
441
|
</div>
|
|
434
442
|
<div class="section" id="credits">
|
|
435
|
-
<
|
|
443
|
+
<h2><a class="toc-backref" href="#toc-entry-4">Credits</a></h2>
|
|
436
444
|
<div class="section" id="authors">
|
|
437
|
-
<
|
|
445
|
+
<h3><a class="toc-backref" href="#toc-entry-5">Authors</a></h3>
|
|
438
446
|
<ul class="simple">
|
|
439
447
|
<li>Tecnativa</li>
|
|
440
448
|
</ul>
|
|
441
449
|
</div>
|
|
442
450
|
<div class="section" id="contributors">
|
|
443
|
-
<
|
|
451
|
+
<h3><a class="toc-backref" href="#toc-entry-6">Contributors</a></h3>
|
|
444
452
|
<ul>
|
|
445
453
|
<li><p class="first"><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:</p>
|
|
446
454
|
<blockquote>
|
|
@@ -469,16 +477,19 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
|
469
477
|
</ul>
|
|
470
478
|
</div>
|
|
471
479
|
<div class="section" id="maintainers">
|
|
472
|
-
<
|
|
480
|
+
<h3><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h3>
|
|
473
481
|
<p>This module is maintained by the OCA.</p>
|
|
474
|
-
<a class="reference external image-reference" href="https://odoo-community.org"
|
|
482
|
+
<a class="reference external image-reference" href="https://odoo-community.org">
|
|
483
|
+
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
|
|
484
|
+
</a>
|
|
475
485
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
476
486
|
mission is to support the collaborative development of Odoo features and
|
|
477
487
|
promote its widespread use.</p>
|
|
478
|
-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/purchase-workflow/tree/
|
|
488
|
+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/purchase-workflow/tree/18.0/purchase_order_general_discount">OCA/purchase-workflow</a> project on GitHub.</p>
|
|
479
489
|
<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>
|
|
480
490
|
</div>
|
|
481
491
|
</div>
|
|
482
492
|
</div>
|
|
493
|
+
</div>
|
|
483
494
|
</body>
|
|
484
495
|
</html>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# Copyright 2022 Tecnativa - Pilar Vargas
|
|
3
3
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
4
4
|
|
|
5
|
-
from odoo.tests import Form, TransactionCase
|
|
5
|
+
from odoo.tests import Form, TransactionCase
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class TestPurchaseOrderLineInput(TransactionCase):
|
|
@@ -15,7 +15,7 @@ class TestPurchaseOrderLineInput(TransactionCase):
|
|
|
15
15
|
cls.product = cls.env["product.product"].create(
|
|
16
16
|
{"name": "test_product", "type": "service"}
|
|
17
17
|
)
|
|
18
|
-
order_form =
|
|
18
|
+
order_form = Form(cls.env["purchase.order"])
|
|
19
19
|
order_form.partner_id = cls.partner
|
|
20
20
|
with order_form.order_line.new() as line_form:
|
|
21
21
|
line_form.product_id = cls.product
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
<!-- Copyright 2019 Tecnativa - David Vidal
|
|
3
3
|
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
|
4
4
|
<odoo>
|
|
5
|
-
|
|
6
5
|
<record id="purchase_order_form" model="ir.ui.view">
|
|
7
6
|
<field name="model">purchase.order</field>
|
|
8
7
|
<field name="inherit_id" ref="purchase.purchase_order_form" />
|
|
@@ -21,5 +20,4 @@
|
|
|
21
20
|
</xpath>
|
|
22
21
|
</field>
|
|
23
22
|
</record>
|
|
24
|
-
|
|
25
23
|
</odoo>
|
|
@@ -11,10 +11,7 @@
|
|
|
11
11
|
ref="purchase.res_config_settings_view_form_purchase"
|
|
12
12
|
/>
|
|
13
13
|
<field name="arch" type="xml">
|
|
14
|
-
<xpath
|
|
15
|
-
expr="//div[@data-key='purchase']/div[hasclass('o_settings_container')][1]"
|
|
16
|
-
position="inside"
|
|
17
|
-
>
|
|
14
|
+
<xpath expr="//app[@name='purchase']/block" position="inside">
|
|
18
15
|
<div class="col-xs-12 col-6 o_setting_box">
|
|
19
16
|
<div class="o_setting_right_pane">
|
|
20
17
|
<label for="purchase_general_discount_field" />
|
|
@@ -34,5 +31,4 @@
|
|
|
34
31
|
</xpath>
|
|
35
32
|
</field>
|
|
36
33
|
</record>
|
|
37
|
-
|
|
38
34
|
</odoo>
|
|
@@ -2,18 +2,16 @@
|
|
|
2
2
|
<!-- Copyright 2019 Tecnativa - David Vidal
|
|
3
3
|
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
|
4
4
|
<odoo>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
<field name="arch" type="xml">
|
|
5
|
+
<record id="res_partner_form_view" model="ir.ui.view">
|
|
6
|
+
<field name="model">res.partner</field>
|
|
7
|
+
<field name="inherit_id" ref="base.view_partner_form" />
|
|
8
|
+
<field name="arch" type="xml">
|
|
10
9
|
<xpath expr="//group[@name='purchase']" position="inside">
|
|
11
10
|
<field
|
|
11
|
+
invisible="is_company == False and parent_id != False"
|
|
12
12
|
name="purchase_general_discount"
|
|
13
|
-
attrs="{'invisible': [('is_company', '=', False), ('parent_id', '!=', False)]}"
|
|
14
13
|
/>
|
|
15
14
|
</xpath>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
</field>
|
|
16
|
+
</record>
|
|
19
17
|
</odoo>
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: odoo-addon-purchase_order_general_discount
|
|
3
|
-
Version:
|
|
3
|
+
Version: 18.0.1.0.0.2
|
|
4
|
+
Requires-Python: >=3.10
|
|
5
|
+
Requires-Dist: odoo==18.0.*
|
|
4
6
|
Summary: General discount per purchase order
|
|
5
7
|
Home-page: https://github.com/OCA/purchase-workflow
|
|
8
|
+
License: AGPL-3
|
|
6
9
|
Author: Tecnativa, Odoo Community Association (OCA)
|
|
7
10
|
Author-email: support@odoo-community.org
|
|
8
|
-
License: AGPL-3
|
|
9
11
|
Classifier: Programming Language :: Python
|
|
10
12
|
Classifier: Framework :: Odoo
|
|
11
|
-
Classifier: Framework :: Odoo ::
|
|
13
|
+
Classifier: Framework :: Odoo :: 18.0
|
|
12
14
|
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
|
|
16
|
+
.. image:: https://odoo-community.org/readme-banner-image
|
|
17
|
+
:target: https://odoo-community.org/get-involved?utm_source=readme
|
|
18
|
+
:alt: Odoo Community Association
|
|
16
19
|
|
|
17
20
|
===============================
|
|
18
21
|
Purchase Order General Discount
|
|
@@ -23,32 +26,32 @@ Purchase Order General Discount
|
|
|
23
26
|
!! This file is generated by oca-gen-addon-readme !!
|
|
24
27
|
!! changes will be overwritten. !!
|
|
25
28
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
26
|
-
!! source digest: sha256:
|
|
29
|
+
!! source digest: sha256:46d1525b685b4540f8339062122a76b6e068167500004980e603bf9e6874b1d1
|
|
27
30
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
28
31
|
|
|
29
32
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
30
33
|
:target: https://odoo-community.org/page/development-status
|
|
31
34
|
:alt: Beta
|
|
32
|
-
.. |badge2| image:: https://img.shields.io/badge/
|
|
35
|
+
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
|
|
33
36
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
|
34
37
|
:alt: License: AGPL-3
|
|
35
38
|
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpurchase--workflow-lightgray.png?logo=github
|
|
36
|
-
:target: https://github.com/OCA/purchase-workflow/tree/
|
|
39
|
+
:target: https://github.com/OCA/purchase-workflow/tree/18.0/purchase_order_general_discount
|
|
37
40
|
:alt: OCA/purchase-workflow
|
|
38
41
|
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
|
39
|
-
:target: https://translation.odoo-community.org/projects/purchase-workflow-
|
|
42
|
+
:target: https://translation.odoo-community.org/projects/purchase-workflow-18-0/purchase-workflow-18-0-purchase_order_general_discount
|
|
40
43
|
:alt: Translate me on Weblate
|
|
41
44
|
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
|
42
|
-
:target: https://runboat.odoo-community.org/builds?repo=OCA/purchase-workflow&target_branch=
|
|
45
|
+
:target: https://runboat.odoo-community.org/builds?repo=OCA/purchase-workflow&target_branch=18.0
|
|
43
46
|
:alt: Try me on Runboat
|
|
44
47
|
|
|
45
48
|
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|
46
49
|
|
|
47
|
-
This module allows to set a general discount in a purchase order. This
|
|
48
|
-
discount is applied to each line order.
|
|
50
|
+
This module allows to set a general discount in a purchase order. This
|
|
51
|
+
general discount is applied to each line order.
|
|
49
52
|
|
|
50
|
-
You can also set a default general discount on suppliers and configure
|
|
51
|
-
line field the discount will be applied.
|
|
53
|
+
You can also set a default general discount on suppliers and configure
|
|
54
|
+
to which line field the discount will be applied.
|
|
52
55
|
|
|
53
56
|
**Table of contents**
|
|
54
57
|
|
|
@@ -58,41 +61,43 @@ line field the discount will be applied.
|
|
|
58
61
|
Configuration
|
|
59
62
|
=============
|
|
60
63
|
|
|
61
|
-
You can set in settings another discount field to be applied.
|
|
62
|
-
|
|
64
|
+
You can set in settings another discount field to be applied. For
|
|
65
|
+
example, if we had purchase_triple_discount, we could set the general
|
|
63
66
|
discount in discount3 to be applied after all other discounts.
|
|
64
67
|
|
|
65
68
|
To do so:
|
|
66
69
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
1. Go to *Purchases > Configuration > Settings* and *Purchase Discount
|
|
71
|
+
Field*
|
|
72
|
+
2. Select the discount you'd wish to use. purchase_triple_discount
|
|
73
|
+
fields will appear when the module is installed.
|
|
70
74
|
|
|
71
|
-
There's a method at
|
|
72
|
-
can be used to extend more line discount fields. For example, if we
|
|
73
|
-
field
|
|
75
|
+
There's a method at res.company called \_get_purchase_discount_fields
|
|
76
|
+
that can be used to extend more line discount fields. For example, if we
|
|
77
|
+
had the field discount4, we could extend it like this:
|
|
74
78
|
|
|
75
|
-
.. code
|
|
79
|
+
.. code:: python
|
|
76
80
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
@api.model
|
|
82
|
+
def _get_purchase_discount_fields(self):
|
|
83
|
+
discount_fields = super()._get_purchase_discount_fields()
|
|
84
|
+
discount_fields += [('discount4', _('Discount 4'))]
|
|
85
|
+
return discount_fields
|
|
82
86
|
|
|
83
87
|
Usage
|
|
84
88
|
=====
|
|
85
89
|
|
|
86
90
|
To set a partner default general discount you need to:
|
|
87
91
|
|
|
88
|
-
|
|
92
|
+
1. Go to a partner and set the general discount in *Sales & Purchases*
|
|
93
|
+
tab.
|
|
89
94
|
|
|
90
95
|
To set a general discount in a purchase order you need to:
|
|
91
96
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
in the summary section of the order.
|
|
95
|
-
|
|
97
|
+
1. Create a purchase order.
|
|
98
|
+
2. Either select a partner with a purchase general discount defined or
|
|
99
|
+
set one in the summary section of the order.
|
|
100
|
+
3. This discount will be applied to every line.
|
|
96
101
|
|
|
97
102
|
Bug Tracker
|
|
98
103
|
===========
|
|
@@ -100,7 +105,7 @@ Bug Tracker
|
|
|
100
105
|
Bugs are tracked on `GitHub Issues <https://github.com/OCA/purchase-workflow/issues>`_.
|
|
101
106
|
In case of trouble, please check there if your issue has already been reported.
|
|
102
107
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
103
|
-
`feedback <https://github.com/OCA/purchase-workflow/issues/new?body=module:%20purchase_order_general_discount%0Aversion:%
|
|
108
|
+
`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**>`_.
|
|
104
109
|
|
|
105
110
|
Do not contact contributors directly about support or help with technical issues.
|
|
106
111
|
|
|
@@ -108,32 +113,32 @@ Credits
|
|
|
108
113
|
=======
|
|
109
114
|
|
|
110
115
|
Authors
|
|
111
|
-
|
|
116
|
+
-------
|
|
112
117
|
|
|
113
118
|
* Tecnativa
|
|
114
119
|
|
|
115
120
|
Contributors
|
|
116
|
-
|
|
121
|
+
------------
|
|
117
122
|
|
|
118
|
-
|
|
123
|
+
- `Tecnativa <https://www.tecnativa.com>`__:
|
|
119
124
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
+
- David Vidal
|
|
126
|
+
- Pedro M. Baeza
|
|
127
|
+
- Rafael Blasco
|
|
128
|
+
- Carlos Roca
|
|
129
|
+
- Pilar Vargas
|
|
125
130
|
|
|
126
|
-
|
|
131
|
+
- `Aures TIC <https://www.aurestic.es>`__:
|
|
127
132
|
|
|
128
|
-
|
|
129
|
-
|
|
133
|
+
- Jose Zambudio
|
|
134
|
+
- Anna Martinez
|
|
130
135
|
|
|
131
|
-
|
|
136
|
+
- `Komit <https://komit-consulting.com>`__:
|
|
132
137
|
|
|
133
|
-
|
|
138
|
+
- Cuong Nguyen Mtm <cuong.nmtm@komit-consulting.com>
|
|
134
139
|
|
|
135
140
|
Maintainers
|
|
136
|
-
|
|
141
|
+
-----------
|
|
137
142
|
|
|
138
143
|
This module is maintained by the OCA.
|
|
139
144
|
|
|
@@ -145,6 +150,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
|
145
150
|
mission is to support the collaborative development of Odoo features and
|
|
146
151
|
promote its widespread use.
|
|
147
152
|
|
|
148
|
-
This module is part of the `OCA/purchase-workflow <https://github.com/OCA/purchase-workflow/tree/
|
|
153
|
+
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.
|
|
149
154
|
|
|
150
155
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
|
@@ -1,28 +1,27 @@
|
|
|
1
|
-
odoo/addons/purchase_order_general_discount/README.rst,sha256=
|
|
1
|
+
odoo/addons/purchase_order_general_discount/README.rst,sha256=oPjEZY5bzV4d2pVkfBzNmASA4UyHhNpyrlLNdc7hVQ4,4891
|
|
2
2
|
odoo/addons/purchase_order_general_discount/__init__.py,sha256=X9EJGOE2GtZbS0G82PtSXmWSZ_R8jEM0rlJTDliQjp4,21
|
|
3
|
-
odoo/addons/purchase_order_general_discount/__manifest__.py,sha256=
|
|
3
|
+
odoo/addons/purchase_order_general_discount/__manifest__.py,sha256=qzD0luF7i1StCslMp4Omlm9hk2C3UnNBlMnnf-GdfSo,631
|
|
4
4
|
odoo/addons/purchase_order_general_discount/i18n/es.po,sha256=XXizosLFxY2Jo7uaQsF7sJfeqxwxTFZh6hUgSeGR8BE,4715
|
|
5
|
-
odoo/addons/purchase_order_general_discount/i18n/fr.po,sha256=c16G7-WGl9qZWWheKSU0hdd0JXH2BmRnk3ZU5I-0fx4,4439
|
|
6
5
|
odoo/addons/purchase_order_general_discount/i18n/it.po,sha256=NdTuxHFGnIvDG6ynC981komhSiik-kPy4MH2tcCXYls,4505
|
|
7
6
|
odoo/addons/purchase_order_general_discount/i18n/pt.po,sha256=KLerUWOf4AcT_SzMhwq83ob0fLlcB2cRMZ0LoqKAaF0,4471
|
|
8
|
-
odoo/addons/purchase_order_general_discount/i18n/purchase_order_general_discount.pot,sha256=
|
|
7
|
+
odoo/addons/purchase_order_general_discount/i18n/purchase_order_general_discount.pot,sha256=w20vvEQdOHFf9X6_ZiPwUpG-sz7kqImnRRyg4UG8Yj8,3663
|
|
9
8
|
odoo/addons/purchase_order_general_discount/models/__init__.py,sha256=xBkPBch_xaBbtUzhxeuXEvdP4Ia-BeffjlTDdjEzkGk,115
|
|
10
|
-
odoo/addons/purchase_order_general_discount/models/purchase_order.py,sha256=
|
|
9
|
+
odoo/addons/purchase_order_general_discount/models/purchase_order.py,sha256=Sg1nifypUBQU4QkshxRKrfPUA9PpX6ctwBMdslcODBc,2540
|
|
11
10
|
odoo/addons/purchase_order_general_discount/models/res_company.py,sha256=p8Kq59plZxYlsiCAY7GqJ2DqpvzR5DFbp76eaWhqs-o,1183
|
|
12
11
|
odoo/addons/purchase_order_general_discount/models/res_config_settings.py,sha256=qjzp9-bx8xIBBlrDDObjWqNjzScRVmCpXFTHjNfg5JI,374
|
|
13
12
|
odoo/addons/purchase_order_general_discount/models/res_partner.py,sha256=BqTVQat7Jbattn6z0CRXSZ-GPhUUF9TvPLBpIUshYec,362
|
|
14
|
-
odoo/addons/purchase_order_general_discount/readme/CONFIGURE.
|
|
15
|
-
odoo/addons/purchase_order_general_discount/readme/CONTRIBUTORS.
|
|
16
|
-
odoo/addons/purchase_order_general_discount/readme/DESCRIPTION.
|
|
17
|
-
odoo/addons/purchase_order_general_discount/readme/USAGE.
|
|
13
|
+
odoo/addons/purchase_order_general_discount/readme/CONFIGURE.md,sha256=MAJVB9GETfy6pl1MVhmOOiGB01c0YgvD7BSROiw8YXM,829
|
|
14
|
+
odoo/addons/purchase_order_general_discount/readme/CONTRIBUTORS.md,sha256=8RvAjfTv5Yv2dSpzKkDFhx2mDZmShuhYD9-Opk13Nic,323
|
|
15
|
+
odoo/addons/purchase_order_general_discount/readme/DESCRIPTION.md,sha256=e_hMiXZezZzLWNccp0tEW07dFz_D6Dka0b1sr3MzCuE,241
|
|
16
|
+
odoo/addons/purchase_order_general_discount/readme/USAGE.md,sha256=0ngIFgzNgj3VPBCz-sjJ1NyLC_OuyPNgiSAWfRrj-7s,397
|
|
18
17
|
odoo/addons/purchase_order_general_discount/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
|
|
19
|
-
odoo/addons/purchase_order_general_discount/static/description/index.html,sha256=
|
|
18
|
+
odoo/addons/purchase_order_general_discount/static/description/index.html,sha256=inCgD2tPfNS1p9Yp4jHGa9OkIUWaLGAk5QoXTwf65LU,15849
|
|
20
19
|
odoo/addons/purchase_order_general_discount/tests/__init__.py,sha256=Ls3swKxgHN-HFAuUp1ivQWMLH4FieBKwib5gQlh4RXA,51
|
|
21
|
-
odoo/addons/purchase_order_general_discount/tests/test_purchase_order_general_discount.py,sha256=
|
|
22
|
-
odoo/addons/purchase_order_general_discount/views/purchase_order_view.xml,sha256=
|
|
23
|
-
odoo/addons/purchase_order_general_discount/views/res_config_view.xml,sha256=
|
|
24
|
-
odoo/addons/purchase_order_general_discount/views/res_partner_view.xml,sha256=
|
|
25
|
-
odoo_addon_purchase_order_general_discount-
|
|
26
|
-
odoo_addon_purchase_order_general_discount-
|
|
27
|
-
odoo_addon_purchase_order_general_discount-
|
|
28
|
-
odoo_addon_purchase_order_general_discount-
|
|
20
|
+
odoo/addons/purchase_order_general_discount/tests/test_purchase_order_general_discount.py,sha256=w6YLsezWCArMrPaJRqlHc1wzKtz1vuFa-Z3kXpf9bP8,2032
|
|
21
|
+
odoo/addons/purchase_order_general_discount/views/purchase_order_view.xml,sha256=Z9cF1OfCmudh1q31QXkQ15sKSMyO4HrtklJAuGSZrXw,1030
|
|
22
|
+
odoo/addons/purchase_order_general_discount/views/res_config_view.xml,sha256=odLVZvZxkL2-IwyaBsIP446S1nPC4r0lRPnjGCaHY08,1556
|
|
23
|
+
odoo/addons/purchase_order_general_discount/views/res_partner_view.xml,sha256=X4ldz3axP3CiQqkyhYaFyN_R85hmldO4Dp66iRM6Unc,675
|
|
24
|
+
odoo_addon_purchase_order_general_discount-18.0.1.0.0.2.dist-info/METADATA,sha256=AQ9ZVzbuz-e8Y_tvyWMPeP-tmQ3cOd1WpHp28lm7Tjc,5430
|
|
25
|
+
odoo_addon_purchase_order_general_discount-18.0.1.0.0.2.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
|
|
26
|
+
odoo_addon_purchase_order_general_discount-18.0.1.0.0.2.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
|
|
27
|
+
odoo_addon_purchase_order_general_discount-18.0.1.0.0.2.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
odoo
|
|
@@ -1,113 +0,0 @@
|
|
|
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 16.0\n"
|
|
8
|
-
"Report-Msgid-Bugs-To: \n"
|
|
9
|
-
"PO-Revision-Date: 2025-05-19 16:25+0000\n"
|
|
10
|
-
"Last-Translator: Arnaud LAYEC <arnaudlayec@gmail.com>\n"
|
|
11
|
-
"Language-Team: none\n"
|
|
12
|
-
"Language: fr\n"
|
|
13
|
-
"MIME-Version: 1.0\n"
|
|
14
|
-
"Content-Type: text/plain; charset=UTF-8\n"
|
|
15
|
-
"Content-Transfer-Encoding: \n"
|
|
16
|
-
"Plural-Forms: nplurals=2; plural=n > 1;\n"
|
|
17
|
-
"X-Generator: Weblate 5.10.4\n"
|
|
18
|
-
|
|
19
|
-
#. module: purchase_order_general_discount
|
|
20
|
-
#: model_terms:ir.ui.view,arch_db:purchase_order_general_discount.res_config_settings_view_form_purchase
|
|
21
|
-
msgid ""
|
|
22
|
-
"<span class=\"fa fa-lg fa-building-o\" title=\"Values set here are company-"
|
|
23
|
-
"specific.\" groups=\"base.group_multi_company\"/>"
|
|
24
|
-
msgstr ""
|
|
25
|
-
"<span class=\"fa fa-lg fa-building-o\" title="
|
|
26
|
-
"\"Les valeurs définies ici sont associées à la société.\" groups="
|
|
27
|
-
"\"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 "Sociétés"
|
|
33
|
-
|
|
34
|
-
#. module: purchase_order_general_discount
|
|
35
|
-
#: model:ir.model,name:purchase_order_general_discount.model_res_partner
|
|
36
|
-
msgid "Contact"
|
|
37
|
-
msgstr "Contact"
|
|
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 "Remise"
|
|
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 "Remise 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 "Remise 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 "La remise doit être inférieure à 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 "Rem. Gén. (%)"
|
|
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 ""
|
|
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 "Champ de remise d'achat"
|
|
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 "Remise générale d'achat (%)"
|
|
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 "Commande fournisseur"
|
|
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
|
-
"Choisir le champ des lignes de commandes fournisseurs dans lequel la remise "
|
|
99
|
-
"générale sera rapporté."
|
|
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
|
-
"Définir le champ des lignes de commandes fournisseurs dans lequel les "
|
|
108
|
-
"remises seront appliquées."
|
|
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 "Mettre à jour la remise générale"
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
You can set in settings another discount field to be applied.
|
|
2
|
-
For example, if we had `purchase_triple_discount`, we could set the general
|
|
3
|
-
discount in discount3 to be applied after all other discounts.
|
|
4
|
-
|
|
5
|
-
To do so:
|
|
6
|
-
|
|
7
|
-
#. Go to *Purchases > Configuration > Settings* and *Purchase Discount Field*
|
|
8
|
-
#. Select the discount you'd wish to use. `purchase_triple_discount` fields
|
|
9
|
-
will appear when the module is installed.
|
|
10
|
-
|
|
11
|
-
There's a method at `res.company` called `_get_purchase_discount_fields` that
|
|
12
|
-
can be used to extend more line discount fields. For example, if we had the
|
|
13
|
-
field `discount4`, we could extend it like this:
|
|
14
|
-
|
|
15
|
-
.. code-block:: python
|
|
16
|
-
|
|
17
|
-
@api.model
|
|
18
|
-
def _get_purchase_discount_fields(self):
|
|
19
|
-
discount_fields = super()._get_purchase_discount_fields()
|
|
20
|
-
discount_fields += [('discount4', _('Discount 4'))]
|
|
21
|
-
return discount_fields
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
* `Tecnativa <https://www.tecnativa.com>`_:
|
|
2
|
-
|
|
3
|
-
* David Vidal
|
|
4
|
-
* Pedro M. Baeza
|
|
5
|
-
* Rafael Blasco
|
|
6
|
-
* Carlos Roca
|
|
7
|
-
* Pilar Vargas
|
|
8
|
-
|
|
9
|
-
* `Aures TIC <https://www.aurestic.es>`_:
|
|
10
|
-
|
|
11
|
-
* Jose Zambudio
|
|
12
|
-
* Anna Martinez
|
|
13
|
-
|
|
14
|
-
* `Komit <https://komit-consulting.com>`_:
|
|
15
|
-
|
|
16
|
-
* Cuong Nguyen Mtm <cuong.nmtm@komit-consulting.com>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
To set a partner default general discount you need to:
|
|
2
|
-
|
|
3
|
-
#. Go to a partner and set the general discount in *Sales & Purchases* tab.
|
|
4
|
-
|
|
5
|
-
To set a general discount in a purchase order you need to:
|
|
6
|
-
|
|
7
|
-
#. Create a purchase order.
|
|
8
|
-
#. Either select a partner with a purchase general discount defined or set one
|
|
9
|
-
in the summary section of the order.
|
|
10
|
-
#. This discount will be applied to every line.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
odoo
|