odoo-addon-sale-commission-product-criteria 16.0.1.0.0.4__py3-none-any.whl → 16.0.1.0.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.
@@ -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:679118d6039b7893a5538b753c6809a13130884e390fb913b1a83cb29c0a0dd4
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.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",
@@ -46,6 +46,8 @@ class SaleCommission(models.Model):
46
46
  )
47
47
 
48
48
  def check_type_change_allowed_moves(self):
49
+ if not self._origin:
50
+ return
49
51
  aila_ids = self.env["account.invoice.line.agent"].search(
50
52
  [("commission_id", "=", self._origin.id)]
51
53
  )
@@ -8,10 +8,11 @@
8
8
 
9
9
  /*
10
10
  :Author: David Goodger (goodger@python.org)
11
- :Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
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: grey; } /* line numbers */
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:679118d6039b7893a5538b753c6809a13130884e390fb913b1a83cb29c0a0dd4
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&amp;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"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
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 _create_sale_order(self, product, partner):
170
- return self.sale_order_model.create(
171
- {
172
- "partner_id": partner.id,
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
- def _invoice_sale_order(self, sale_order, date=None):
190
- old_invoices = sale_order.invoice_ids
191
- wizard = self.advance_inv_model.with_context(
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
- wizard.create_invoices()
203
- invoice = sale_order.invoice_ids - old_invoices
204
- return invoice
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-sale-commission-product-criteria
3
- Version: 16.0.1.0.0.4
2
+ Name: odoo-addon-sale_commission_product_criteria
3
+ Version: 16.0.1.0.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.1dev,>=16.0dev
16
- Requires-Dist: odoo <16.1dev,>=16.0a
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:679118d6039b7893a5538b753c6809a13130884e390fb913b1a83cb29c0a0dd4
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=GZcbaiiegez3acF7tgnoaycuLPCkx7WrUpknlyUvjoY,4673
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=NH8q7txMpXTAWfSe0X59g-jxhv8aq6EWT_ahB-VJVm8,718
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
6
  odoo/addons/sale_commission_product_criteria/i18n/it.po,sha256=e5Md5uoZoIR_GhY5RkNxTtsIkhylxYM7vcZmOZRBUps,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=RDVhOtaEdrXelaI5tcFKczgNXmPor90wBKG2cur3H6U,9723
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=WqpO6eeA7VOnpRaKR4IQrcYVLBzTlz3AaRbcTXceNgU,14420
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=R7S0lOOiLPlpFrBQJWPjhBgSG5h46Z5tz4Cw7kfKvU8,8377
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.0.4.dist-info/METADATA,sha256=TWDyiNLjlvGIObYiImpdzHzsumVOav4sIMbvYO5AYeM,5293
24
- odoo_addon_sale_commission_product_criteria-16.0.1.0.0.4.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
25
- odoo_addon_sale_commission_product_criteria-16.0.1.0.0.4.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
26
- odoo_addon_sale_commission_product_criteria-16.0.1.0.0.4.dist-info/RECORD,,
23
+ odoo_addon_sale_commission_product_criteria-16.0.1.0.1.dist-info/METADATA,sha256=uDTTPZnCiWaJv2oTUA0g8gH5FhtEQLeHwGIO9AZ2V7w,5269
24
+ odoo_addon_sale_commission_product_criteria-16.0.1.0.1.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
25
+ odoo_addon_sale_commission_product_criteria-16.0.1.0.1.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
26
+ odoo_addon_sale_commission_product_criteria-16.0.1.0.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: bdist_wheel (0.44.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5