odoo-addon-account-commission 15.0.3.2.3__py3-none-any.whl → 15.0.3.3.0__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 @@ Account commissions
7
7
  !! This file is generated by oca-gen-addon-readme !!
8
8
  !! changes will be overwritten. !!
9
9
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10
- !! source digest: sha256:e2609e9bf7ee5e4db5257c5f0363d83bc8d15e74a7944d92ebdae64cfabdc3f8
10
+ !! source digest: sha256:a54acf8b8311d933604140598d1a26f163fdfe5fdd0545e4456aeb1501d352a9
11
11
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12
12
 
13
13
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -128,6 +128,7 @@ Contributors
128
128
 
129
129
  * Pedro M. Baeza
130
130
  * Manuel Calero
131
+ * Sergio Teruel
131
132
 
132
133
  * `Quartile <https://www.quartile.co>`__:
133
134
 
@@ -3,7 +3,7 @@
3
3
  # Copyright 2014-2022 Tecnativa - Pedro M. Baeza
4
4
  {
5
5
  "name": "Account commissions",
6
- "version": "15.0.3.2.3",
6
+ "version": "15.0.3.3.0",
7
7
  "author": "Tecnativa, Odoo Community Association (OCA)",
8
8
  "category": "Sales Management",
9
9
  "license": "AGPL-3",
@@ -13,6 +13,7 @@
13
13
 
14
14
  * Pedro M. Baeza
15
15
  * Manuel Calero
16
+ * Sergio Teruel
16
17
 
17
18
  * `Quartile <https://www.quartile.co>`__:
18
19
 
@@ -366,7 +366,7 @@ ul.auto-toc {
366
366
  !! This file is generated by oca-gen-addon-readme !!
367
367
  !! changes will be overwritten. !!
368
368
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
369
- !! source digest: sha256:e2609e9bf7ee5e4db5257c5f0363d83bc8d15e74a7944d92ebdae64cfabdc3f8
369
+ !! source digest: sha256:a54acf8b8311d933604140598d1a26f163fdfe5fdd0545e4456aeb1501d352a9
370
370
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
371
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/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/commission/tree/15.0/account_commission"><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-15-0/commission-15-0-account_commission"><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=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372
372
  <p>This module adds the function to calculate commissions in invoices (account moves).</p>
@@ -473,6 +473,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
473
473
  <li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
474
474
  <li>Pedro M. Baeza</li>
475
475
  <li>Manuel Calero</li>
476
+ <li>Sergio Teruel</li>
476
477
  </ul>
477
478
  </li>
478
479
  <li><a class="reference external" href="https://www.quartile.co">Quartile</a>:<ul>
@@ -624,3 +624,38 @@ class TestAccountCommission(TestCommissionBase):
624
624
  )
625
625
  self.assertEqual(3, len(settlements.line_ids))
626
626
  self.assertAlmostEqual(0.6, sum(settlements.mapped("total")), 2)
627
+
628
+ def _register_payment(self, invoice):
629
+ payment_journal = self.env["account.journal"].search(
630
+ [("type", "=", "cash"), ("company_id", "=", self.env.company.id)],
631
+ limit=1,
632
+ )
633
+ register_payments = (
634
+ self.env["account.payment.register"]
635
+ .with_context(active_ids=invoice.id, active_model="account.move")
636
+ .create({"journal_id": payment_journal.id})
637
+ )
638
+ register_payments.action_create_payments()
639
+
640
+ def test_invoice_pending_settlement(self):
641
+ """Make in one settlement all pending invoices to wizard date"""
642
+ fields.Date.today()
643
+ self.commission_net_paid.invoice_state = "paid"
644
+ invoice1 = self._create_invoice(
645
+ self.agent_pending, self.commission_net_paid, "2024-02-15", currency=None
646
+ )
647
+ # Register payment for the new invoice
648
+ invoice2 = self._create_invoice(
649
+ self.agent_pending, self.commission_net_paid, "2024-03-15", currency=None
650
+ )
651
+ invoice3 = self._create_invoice(
652
+ self.agent_pending, self.commission_net_paid, "2024-04-15", currency=None
653
+ )
654
+ # invoice1.invoice_line_ids.agent_ids._compute_amount()
655
+ (invoice1 + invoice2 + invoice3).action_post()
656
+ self._register_payment(invoice1)
657
+ self._register_payment(invoice2)
658
+ self._register_payment(invoice3)
659
+ self._settle_agent_invoice(self.agent_pending, 1)
660
+ settlements = self.settle_model.search([("state", "=", "settled")])
661
+ self.assertEqual(len(settlements.line_ids), 3)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-account-commission
3
- Version: 15.0.3.2.3
3
+ Version: 15.0.3.3.0
4
4
  Summary: Account commissions
5
5
  Home-page: https://github.com/OCA/commission
6
6
  Author: Tecnativa, Odoo Community Association (OCA)
@@ -24,7 +24,7 @@ Account commissions
24
24
  !! This file is generated by oca-gen-addon-readme !!
25
25
  !! changes will be overwritten. !!
26
26
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
27
- !! source digest: sha256:e2609e9bf7ee5e4db5257c5f0363d83bc8d15e74a7944d92ebdae64cfabdc3f8
27
+ !! source digest: sha256:a54acf8b8311d933604140598d1a26f163fdfe5fdd0545e4456aeb1501d352a9
28
28
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
29
29
 
30
30
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -145,6 +145,7 @@ Contributors
145
145
 
146
146
  * Pedro M. Baeza
147
147
  * Manuel Calero
148
+ * Sergio Teruel
148
149
 
149
150
  * `Quartile <https://www.quartile.co>`__:
150
151
 
@@ -1,6 +1,6 @@
1
- odoo/addons/account_commission/README.rst,sha256=Oudq4ijD0ZTa_0lmFHFjJQi90dhyzeT6U9E2TLrnzEI,6081
1
+ odoo/addons/account_commission/README.rst,sha256=UeUEgEYjb0aVrZWKSxprggiJw1vzg7tQ9GKYi8BgUeU,6099
2
2
  odoo/addons/account_commission/__init__.py,sha256=8JG3SPnwMlgXTppOwkp3YTgDDQGo7U7veMEMpG1bL_c,64
3
- odoo/addons/account_commission/__manifest__.py,sha256=YxrcBsgnD3760ddLpLEaeQ_6WIT8a_o0BCZEdcHP070,893
3
+ odoo/addons/account_commission/__manifest__.py,sha256=FBvr3CiTqFPXbv1u9RnfqSsVTXbblTSfZdphSLAPJTM,893
4
4
  odoo/addons/account_commission/data/menuitem_data.xml,sha256=OX8KpilSn3zWf9cMNiJLDO7aV_vtaH6GTIyMZWDxYqM,361
5
5
  odoo/addons/account_commission/i18n/account_commission.pot,sha256=xIGxWuQUMHF44VsPgaMyCpwxI3b4t97uK5bcPkoMITs,21893
6
6
  odoo/addons/account_commission/i18n/es.po,sha256=Ax2Uo2zrYXsaS1YkMySHDGmBfYyQGqMyIjXr3GuJ_P0,24736
@@ -10,7 +10,7 @@ odoo/addons/account_commission/models/account_move.py,sha256=wPUjxq86pW93ILQdf5U
10
10
  odoo/addons/account_commission/models/commission.py,sha256=OHzmB5iH-h4oQf5JQGV4EFpNOkAHxC1_0-j0g-8nDXE,576
11
11
  odoo/addons/account_commission/models/commission_settlement.py,sha256=tQJvLUhuBuKf3mf5yZ0GL4O9ORRiwomIJwYN47WS1mY,7022
12
12
  odoo/addons/account_commission/readme/CONFIGURE.rst,sha256=vUEhtDTSXiZc88gXBuQZIcSkM3CbkmzQQwdVgJfnbSA,466
13
- odoo/addons/account_commission/readme/CONTRIBUTORS.rst,sha256=edkIHruglREEhXtRp3s9Y5RRMcv-MvgbB99y1M7TXck,605
13
+ odoo/addons/account_commission/readme/CONTRIBUTORS.rst,sha256=_wYefgTaoNrP104vwfzX0MZATjzRUWNOif-8zfqV8iw,623
14
14
  odoo/addons/account_commission/readme/DESCRIPTION.rst,sha256=dLMZSNYGysvHiOC7Untw2leoCloADPLcrkIoE8FDEVI,208
15
15
  odoo/addons/account_commission/readme/USAGE.rst,sha256=kyhxu0d4eBImmEfJ4f-blVNPNByzArlsT9SIvLpQFqI,1798
16
16
  odoo/addons/account_commission/report/__init__.py,sha256=w7t-EO6EMoLF3jDCOZz5mMxeLWYADB6TeEI2GWbzy5M,34
@@ -20,9 +20,9 @@ odoo/addons/account_commission/security/account_commission_security.xml,sha256=p
20
20
  odoo/addons/account_commission/security/ir.model.access.csv,sha256=c0k8cFhVg1A4XCaUQ-mzJdLIotKKt1ltIYznK8ELhYE,883
21
21
  odoo/addons/account_commission/static/description/icon.png,sha256=ydxSIUuHSeE4CfMVsEzLjKKVdX4RicuPj8VGM2rBpBg,8219
22
22
  odoo/addons/account_commission/static/description/icon.svg,sha256=96b_cQ-F1XuDU6S5mDi9ioe0d22Vwn30uBDQ_3ZSi5w,17220
23
- odoo/addons/account_commission/static/description/index.html,sha256=NLBUM0d5tKn4DduiyLCEmoPXPjkKDrVmnYRDKvF2mLU,16949
23
+ odoo/addons/account_commission/static/description/index.html,sha256=mB6vSwbZuXdko4shgC3qwcLiXcnWs8codRksLwpVIkY,16972
24
24
  odoo/addons/account_commission/tests/__init__.py,sha256=bxd564RH-TWEpEJWbbc558dPFEJZCsH9JM8JF3-PMUM,38
25
- odoo/addons/account_commission/tests/test_account_commission.py,sha256=v5OL_5N1MFDO_aZaiP5dAnosV42O2FBCOpg06g1QOQw,26264
25
+ odoo/addons/account_commission/tests/test_account_commission.py,sha256=sMIZ5VMJ459LiemxK_aPZDS2dwz_xuPvbQHk_b7BMIA,27847
26
26
  odoo/addons/account_commission/views/account_move_views.xml,sha256=4oYr0ErkcbGrYtGLDj0ip3ozC9NCjp4jBJLB9YxC9Sc,6634
27
27
  odoo/addons/account_commission/views/commission_settlement_views.xml,sha256=jLyChFXOLPE5wqtbRuq6Nh7CxFh5MoTOFDWklE1ZRjc,3523
28
28
  odoo/addons/account_commission/views/commission_views.xml,sha256=oY2-WJ-lEn3gCoFMqStKObGT3LRkBxMmANm2MRhYuRE,614
@@ -31,7 +31,7 @@ odoo/addons/account_commission/wizards/__init__.py,sha256=ddwjnl0fpZTw56iNQmRcDJ
31
31
  odoo/addons/account_commission/wizards/commission_make_settle.py,sha256=Me1_y1AtiUU4KnxAHFsyBmZW_5XqCc6cH6Xr08lx8ik,1543
32
32
  odoo/addons/account_commission/wizards/wizard_invoice.py,sha256=Aga0kHWTtd5F7GehmRrqfwDaFkMlPXVIzEA0jlWTDiE,3259
33
33
  odoo/addons/account_commission/wizards/wizard_invoice.xml,sha256=QDGpFCICqhAu6uO7ksQihj0UPGxuQL7MeE3mNx4Xy_A,2161
34
- odoo_addon_account_commission-15.0.3.2.3.dist-info/METADATA,sha256=J5_w7IcvihqLF0AmFOzfNMgSlWQ8eXzbOVpmabD-VRs,6666
35
- odoo_addon_account_commission-15.0.3.2.3.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
36
- odoo_addon_account_commission-15.0.3.2.3.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
37
- odoo_addon_account_commission-15.0.3.2.3.dist-info/RECORD,,
34
+ odoo_addon_account_commission-15.0.3.3.0.dist-info/METADATA,sha256=DEwcGqmyixduLb4s3YWXkxibeVof1cfOAjscpo85vLY,6684
35
+ odoo_addon_account_commission-15.0.3.3.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
36
+ odoo_addon_account_commission-15.0.3.3.0.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
37
+ odoo_addon_account_commission-15.0.3.3.0.dist-info/RECORD,,