odoo-addon-sale-commission-product-criteria 16.0.1.0.0.4__py3-none-any.whl → 16.0.1.0.1.1__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/sale_commission_product_criteria/README.rst +1 -1
- odoo/addons/sale_commission_product_criteria/__manifest__.py +1 -1
- odoo/addons/sale_commission_product_criteria/i18n/it.po +9 -9
- odoo/addons/sale_commission_product_criteria/models/commission.py +2 -0
- odoo/addons/sale_commission_product_criteria/static/description/index.html +8 -5
- odoo/addons/sale_commission_product_criteria/tests/test_sale_commission_product_criteria.py +51 -35
- {odoo_addon_sale_commission_product_criteria-16.0.1.0.0.4.dist-info → odoo_addon_sale_commission_product_criteria-16.0.1.0.1.1.dist-info}/METADATA +5 -8
- {odoo_addon_sale_commission_product_criteria-16.0.1.0.0.4.dist-info → odoo_addon_sale_commission_product_criteria-16.0.1.0.1.1.dist-info}/RECORD +10 -10
- {odoo_addon_sale_commission_product_criteria-16.0.1.0.0.4.dist-info → odoo_addon_sale_commission_product_criteria-16.0.1.0.1.1.dist-info}/WHEEL +1 -1
- {odoo_addon_sale_commission_product_criteria-16.0.1.0.0.4.dist-info → odoo_addon_sale_commission_product_criteria-16.0.1.0.1.1.dist-info}/top_level.txt +0 -0
@@ -7,7 +7,7 @@ Sale Commission Product Criteria
|
|
7
7
|
!! This file is generated by oca-gen-addon-readme !!
|
8
8
|
!! changes will be overwritten. !!
|
9
9
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
10
|
-
!! source digest: sha256:
|
10
|
+
!! source digest: sha256:42e4737070e1268a622af8ffacf3e25bacd99ec5696dbfd5c10f92ea0ab09a4d
|
11
11
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
12
12
|
|
13
13
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
@@ -4,7 +4,7 @@
|
|
4
4
|
{
|
5
5
|
"name": "Sale Commission Product Criteria",
|
6
6
|
"summary": "Advanced commissions rules",
|
7
|
-
"version": "16.0.1.0.
|
7
|
+
"version": "16.0.1.0.1",
|
8
8
|
"author": "Ilyas, Ooops404, Odoo Community Association (OCA)",
|
9
9
|
"maintainers": ["ilyasProgrammer"],
|
10
10
|
"website": "https://github.com/OCA/commission",
|
@@ -6,15 +6,15 @@ msgid ""
|
|
6
6
|
msgstr ""
|
7
7
|
"Project-Id-Version: Odoo Server 14.0\n"
|
8
8
|
"Report-Msgid-Bugs-To: \n"
|
9
|
-
"PO-Revision-Date:
|
10
|
-
"Last-Translator:
|
9
|
+
"PO-Revision-Date: 2025-03-05 12:06+0000\n"
|
10
|
+
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
|
11
11
|
"Language-Team: none\n"
|
12
12
|
"Language: it\n"
|
13
13
|
"MIME-Version: 1.0\n"
|
14
14
|
"Content-Type: text/plain; charset=UTF-8\n"
|
15
15
|
"Content-Transfer-Encoding: \n"
|
16
16
|
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
17
|
-
"X-Generator: Weblate
|
17
|
+
"X-Generator: Weblate 5.10.2\n"
|
18
18
|
|
19
19
|
#. module: sale_commission_product_criteria
|
20
20
|
#: model:ir.model.fields,field_description:sale_commission_product_criteria.field_commission_item__active
|
@@ -362,9 +362,9 @@ msgid ""
|
|
362
362
|
"Specify a product category if this rule only applies to products belonging "
|
363
363
|
"to this category or its children categories. Keep empty otherwise."
|
364
364
|
msgstr ""
|
365
|
-
"
|
365
|
+
"Specificare una categoria prodotto se questa regola si applica solo ai "
|
366
366
|
"prodotti appartenenti a questa categoria o alle sue categorie figlie, "
|
367
|
-
"altrimenti
|
367
|
+
"altrimenti lasciare vuoto."
|
368
368
|
|
369
369
|
#. module: sale_commission_product_criteria
|
370
370
|
#: model:ir.model.fields,help:sale_commission_product_criteria.field_commission_item__product_id
|
@@ -372,8 +372,8 @@ msgid ""
|
|
372
372
|
"Specify a product if this rule only applies to one product. Keep empty "
|
373
373
|
"otherwise."
|
374
374
|
msgstr ""
|
375
|
-
"
|
376
|
-
"altrimenti
|
375
|
+
"Specificare un prodotto se questa regola si applica solo ad un prodotto, "
|
376
|
+
"altrimenti lasciare vuoto."
|
377
377
|
|
378
378
|
#. module: sale_commission_product_criteria
|
379
379
|
#: model:ir.model.fields,help:sale_commission_product_criteria.field_commission_item__product_tmpl_id
|
@@ -381,8 +381,8 @@ msgid ""
|
|
381
381
|
"Specify a template if this rule only applies to one product template. Keep "
|
382
382
|
"empty otherwise."
|
383
383
|
msgstr ""
|
384
|
-
"
|
385
|
-
"prodotto, altrimenti
|
384
|
+
"Specificare un modello prodotto se questa regola si applica solo ad un "
|
385
|
+
"modello prodotto, altrimenti lasciare vuoto."
|
386
386
|
|
387
387
|
#. module: sale_commission_product_criteria
|
388
388
|
#: code:addons/sale_commission_product_criteria/models/commission.py:0
|
@@ -8,10 +8,11 @@
|
|
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 {
|
@@ -366,7 +367,7 @@ ul.auto-toc {
|
|
366
367
|
!! This file is generated by oca-gen-addon-readme !!
|
367
368
|
!! changes will be overwritten. !!
|
368
369
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
369
|
-
!! source digest: sha256:
|
370
|
+
!! source digest: sha256:42e4737070e1268a622af8ffacf3e25bacd99ec5696dbfd5c10f92ea0ab09a4d
|
370
371
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
371
372
|
<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/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/commission/tree/16.0/sale_commission_product_criteria"><img alt="OCA/commission" src="https://img.shields.io/badge/github-OCA%2Fcommission-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/commission-16-0/commission-16-0-sale_commission_product_criteria"><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/commission&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
372
373
|
<p>This module allows to set in the same Commission Type different commission rates according to the product on SO/invoice line.</p>
|
@@ -436,7 +437,9 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
436
437
|
<div class="section" id="maintainers">
|
437
438
|
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
|
438
439
|
<p>This module is maintained by the OCA.</p>
|
439
|
-
<a class="reference external image-reference" href="https://odoo-community.org"
|
440
|
+
<a class="reference external image-reference" href="https://odoo-community.org">
|
441
|
+
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
|
442
|
+
</a>
|
440
443
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
441
444
|
mission is to support the collaborative development of Odoo features and
|
442
445
|
promote its widespread use.</p>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
|
6
6
|
from odoo.exceptions import ValidationError
|
7
|
-
from odoo.tests.common import TransactionCase
|
7
|
+
from odoo.tests.common import Form, TransactionCase
|
8
8
|
|
9
9
|
|
10
10
|
class TestSaleCommission(TransactionCase):
|
@@ -52,6 +52,43 @@ class TestSaleCommission(TransactionCase):
|
|
52
52
|
"sale_commission_product_criteria.demo_commission_rules_item_4"
|
53
53
|
)
|
54
54
|
|
55
|
+
def _create_sale_order(self, product, partner):
|
56
|
+
return self.sale_order_model.create(
|
57
|
+
{
|
58
|
+
"partner_id": partner.id,
|
59
|
+
"order_line": [
|
60
|
+
(
|
61
|
+
0,
|
62
|
+
0,
|
63
|
+
{
|
64
|
+
"name": product.name,
|
65
|
+
"product_id": product.id,
|
66
|
+
"product_uom_qty": 1.0,
|
67
|
+
"product_uom": product.uom_id.id,
|
68
|
+
"price_unit": 1000,
|
69
|
+
},
|
70
|
+
)
|
71
|
+
],
|
72
|
+
}
|
73
|
+
)
|
74
|
+
|
75
|
+
def _invoice_sale_order(self, sale_order, date=None):
|
76
|
+
old_invoices = sale_order.invoice_ids
|
77
|
+
wizard = self.advance_inv_model.with_context(
|
78
|
+
**{
|
79
|
+
"active_model": "sale.order",
|
80
|
+
"active_ids": [sale_order.id],
|
81
|
+
"active_id": sale_order.id,
|
82
|
+
}
|
83
|
+
).create(
|
84
|
+
{
|
85
|
+
"advance_payment_method": "delivered",
|
86
|
+
}
|
87
|
+
)
|
88
|
+
wizard.create_invoices()
|
89
|
+
invoice = sale_order.invoice_ids - old_invoices
|
90
|
+
return invoice
|
91
|
+
|
55
92
|
def test_sale_commission_product_criteria_items(self):
|
56
93
|
# items names
|
57
94
|
self.com_item_1._compute_commission_item_name_value()
|
@@ -166,39 +203,18 @@ class TestSaleCommission(TransactionCase):
|
|
166
203
|
with self.assertRaises(ValidationError):
|
167
204
|
self.com_item_4._onchange_product_tmpl_id()
|
168
205
|
|
169
|
-
def
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
"order_line": [
|
174
|
-
(
|
175
|
-
0,
|
176
|
-
0,
|
177
|
-
{
|
178
|
-
"name": product.name,
|
179
|
-
"product_id": product.id,
|
180
|
-
"product_uom_qty": 1.0,
|
181
|
-
"product_uom": product.uom_id.id,
|
182
|
-
"price_unit": 1000,
|
183
|
-
},
|
184
|
-
)
|
185
|
-
],
|
186
|
-
}
|
187
|
-
)
|
206
|
+
def test_on_create_check(self):
|
207
|
+
f = Form(self.commission_model)
|
208
|
+
f.name = "New commission type"
|
209
|
+
f.save()
|
188
210
|
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
**{
|
193
|
-
"active_model": "sale.order",
|
194
|
-
"active_ids": [sale_order.id],
|
195
|
-
"active_id": sale_order.id,
|
196
|
-
}
|
197
|
-
).create(
|
198
|
-
{
|
199
|
-
"advance_payment_method": "delivered",
|
200
|
-
}
|
211
|
+
so = self._create_sale_order(self.product_4, self.partner)
|
212
|
+
self.assertEqual(
|
213
|
+
so.order_line.agent_ids.commission_id, self.rules_commission_id
|
201
214
|
)
|
202
|
-
|
203
|
-
|
204
|
-
|
215
|
+
self.assertEqual(self.rules_commission_id.commission_type, "product")
|
216
|
+
|
217
|
+
so.action_confirm()
|
218
|
+
with self.assertRaises(ValidationError):
|
219
|
+
self.rules_commission_id.commission_type = "fixed"
|
220
|
+
self.rules_commission_id.onchange_commission_type()
|
@@ -1,19 +1,18 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
|
-
Name: odoo-addon-
|
3
|
-
Version: 16.0.1.0.
|
2
|
+
Name: odoo-addon-sale_commission_product_criteria
|
3
|
+
Version: 16.0.1.0.1.1
|
4
4
|
Summary: Advanced commissions rules
|
5
5
|
Home-page: https://github.com/OCA/commission
|
6
6
|
Author: Ilyas, Ooops404, Odoo Community Association (OCA)
|
7
7
|
Author-email: support@odoo-community.org
|
8
8
|
License: AGPL-3
|
9
|
-
Platform: UNKNOWN
|
10
9
|
Classifier: Programming Language :: Python
|
11
10
|
Classifier: Framework :: Odoo
|
12
11
|
Classifier: Framework :: Odoo :: 16.0
|
13
12
|
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
|
14
13
|
Requires-Python: >=3.10
|
15
|
-
Requires-Dist: odoo-addon-sale-commission
|
16
|
-
Requires-Dist: odoo
|
14
|
+
Requires-Dist: odoo-addon-sale-commission<16.1dev,>=16.0dev
|
15
|
+
Requires-Dist: odoo<16.1dev,>=16.0a
|
17
16
|
|
18
17
|
================================
|
19
18
|
Sale Commission Product Criteria
|
@@ -24,7 +23,7 @@ Sale Commission Product Criteria
|
|
24
23
|
!! This file is generated by oca-gen-addon-readme !!
|
25
24
|
!! changes will be overwritten. !!
|
26
25
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
27
|
-
!! source digest: sha256:
|
26
|
+
!! source digest: sha256:42e4737070e1268a622af8ffacf3e25bacd99ec5696dbfd5c10f92ea0ab09a4d
|
28
27
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
29
28
|
|
30
29
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
@@ -131,5 +130,3 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|
|
131
130
|
This module is part of the `OCA/commission <https://github.com/OCA/commission/tree/16.0/sale_commission_product_criteria>`_ project on GitHub.
|
132
131
|
|
133
132
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
134
|
-
|
135
|
-
|
@@ -1,13 +1,13 @@
|
|
1
|
-
odoo/addons/sale_commission_product_criteria/README.rst,sha256=
|
1
|
+
odoo/addons/sale_commission_product_criteria/README.rst,sha256=rwYdzODj-F2BWZ4dx0wLzRmomD8J7AuWftQ06hlzrPw,4673
|
2
2
|
odoo/addons/sale_commission_product_criteria/__init__.py,sha256=X9EJGOE2GtZbS0G82PtSXmWSZ_R8jEM0rlJTDliQjp4,21
|
3
|
-
odoo/addons/sale_commission_product_criteria/__manifest__.py,sha256=
|
3
|
+
odoo/addons/sale_commission_product_criteria/__manifest__.py,sha256=Wez7mCTV4_dwgBeGFAjtYcGaAAb0HoWEEtZFIk3PL_8,718
|
4
4
|
odoo/addons/sale_commission_product_criteria/demo/sale_agent_demo.xml,sha256=8Mij5a1TTFyyIZK0LEoenWh-W4ucTNtwqDAF87EbT34,2665
|
5
5
|
odoo/addons/sale_commission_product_criteria/i18n/es.po,sha256=T_MurzPti038XcMfv8rpLdaAL5Xpl7Nh1i-l-GjP0Q0,18388
|
6
|
-
odoo/addons/sale_commission_product_criteria/i18n/it.po,sha256=
|
6
|
+
odoo/addons/sale_commission_product_criteria/i18n/it.po,sha256=I50Swt_ubusszXWs1wZNjQL5stC2kXT5q0OcnJ8h-88,19641
|
7
7
|
odoo/addons/sale_commission_product_criteria/i18n/sale_commission_product_criteria.pot,sha256=G2IoUjZvuMhQsc_UGFK2gXMnUueGhvekJpz_e-W9r8A,15871
|
8
8
|
odoo/addons/sale_commission_product_criteria/models/__init__.py,sha256=lkOi79dgLqCz-aoOq2zO8Ivf3vThIh453bGJBkUre-E,137
|
9
9
|
odoo/addons/sale_commission_product_criteria/models/account_move.py,sha256=Q1cYIDJCmro0SrVUjP2JeQeeTxkOmN6U_99t6D3B-a4,1027
|
10
|
-
odoo/addons/sale_commission_product_criteria/models/commission.py,sha256=
|
10
|
+
odoo/addons/sale_commission_product_criteria/models/commission.py,sha256=PmKeTU_Hh7XPZ5XNyhYTpm-sLaV0sMIMHtyWqkFUDyc,9771
|
11
11
|
odoo/addons/sale_commission_product_criteria/models/sale.py,sha256=cMxxuZWVmldPoUqKDgU-_BFMC8X292x9l1b6badrhEA,1991
|
12
12
|
odoo/addons/sale_commission_product_criteria/models/sale_commission_line_mixin.py,sha256=pbGdRGuKk9l4JE8isznZSkhDtHoGzNyp6C_NTX7dQwM,3065
|
13
13
|
odoo/addons/sale_commission_product_criteria/models/settlement.py,sha256=c9rhprm8Vz4HHYJ2-5tgs2Gi1UzNmjtAlmEWVw7BuN8,191
|
@@ -16,11 +16,11 @@ odoo/addons/sale_commission_product_criteria/readme/DESCRIPTION.rst,sha256=7ZEUY
|
|
16
16
|
odoo/addons/sale_commission_product_criteria/readme/USAGE.rst,sha256=opr0MY68l3yNs3rj31HxdAVcFT2wAUpDIntiu5mXuMo,366
|
17
17
|
odoo/addons/sale_commission_product_criteria/security/ir.model.access.csv,sha256=l4p29Bw20_pdCUkFc0ApE6mAEohTQOPo5VwmuyYMnZY,324
|
18
18
|
odoo/addons/sale_commission_product_criteria/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
|
19
|
-
odoo/addons/sale_commission_product_criteria/static/description/index.html,sha256=
|
19
|
+
odoo/addons/sale_commission_product_criteria/static/description/index.html,sha256=jmsX3jB5sCTSKrWrcgn1IbDTAtP41-LqaLvsRZlMnCM,14503
|
20
20
|
odoo/addons/sale_commission_product_criteria/tests/__init__.py,sha256=gR27hVtH8fvlbCsPJq4JRfSYMXQlBQkjhULr_rcLki0,52
|
21
|
-
odoo/addons/sale_commission_product_criteria/tests/test_sale_commission_product_criteria.py,sha256=
|
21
|
+
odoo/addons/sale_commission_product_criteria/tests/test_sale_commission_product_criteria.py,sha256=6SP_rJ7LN486WO_gtRTxdLJotCiFko29J9IKd5gqTCg,8979
|
22
22
|
odoo/addons/sale_commission_product_criteria/views/views.xml,sha256=Q2wwfQxtZ3cUMXkAoyrBGpmGDqSFi295pWnSoYBL0bs,10449
|
23
|
-
odoo_addon_sale_commission_product_criteria-16.0.1.0.
|
24
|
-
odoo_addon_sale_commission_product_criteria-16.0.1.0.
|
25
|
-
odoo_addon_sale_commission_product_criteria-16.0.1.0.
|
26
|
-
odoo_addon_sale_commission_product_criteria-16.0.1.0.
|
23
|
+
odoo_addon_sale_commission_product_criteria-16.0.1.0.1.1.dist-info/METADATA,sha256=eQjkYYpfmCv0dPLSWNX5XlSDqRqhuunmhHmjf2q5Gpc,5271
|
24
|
+
odoo_addon_sale_commission_product_criteria-16.0.1.0.1.1.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
25
|
+
odoo_addon_sale_commission_product_criteria-16.0.1.0.1.1.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
|
26
|
+
odoo_addon_sale_commission_product_criteria-16.0.1.0.1.1.dist-info/RECORD,,
|