odoo-addon-account-commission 16.0.2.3.0.1__py3-none-any.whl → 16.0.2.4.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:160d10472aa0794ac787e52c597d274c4b78c88b593ac1e9b2d78bab3df2fcc3
10
+ !! source digest: sha256:8ba2b2321dee20dece1882cb3f664fb78a27b4fbccb785d1f5410b7d009889c6
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": "16.0.2.3.0",
6
+ "version": "16.0.2.4.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:160d10472aa0794ac787e52c597d274c4b78c88b593ac1e9b2d78bab3df2fcc3
369
+ !! source digest: sha256:8ba2b2321dee20dece1882cb3f664fb78a27b4fbccb785d1f5410b7d009889c6
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/16.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-16-0/commission-16-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=16.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>
@@ -659,3 +659,38 @@ class TestAccountCommission(TestCommissionBase):
659
659
  )
660
660
  self.assertEqual(3, len(settlements.line_ids))
661
661
  self.assertAlmostEqual(0.6, sum(settlements.mapped("total")), 2)
662
+
663
+ def _register_payment(self, invoice):
664
+ payment_journal = self.env["account.journal"].search(
665
+ [("type", "=", "cash"), ("company_id", "=", self.env.company.id)],
666
+ limit=1,
667
+ )
668
+ register_payments = (
669
+ self.env["account.payment.register"]
670
+ .with_context(active_ids=invoice.id, active_model="account.move")
671
+ .create({"journal_id": payment_journal.id})
672
+ )
673
+ register_payments.action_create_payments()
674
+
675
+ def test_invoice_pending_settlement(self):
676
+ """Make in one settlement all pending invoices to wizard date"""
677
+ fields.Date.today()
678
+ self.commission_net_paid.invoice_state = "paid"
679
+ invoice1 = self._create_invoice(
680
+ self.agent_pending, self.commission_net_paid, "2024-02-15", currency=None
681
+ )
682
+ # Register payment for the new invoice
683
+ invoice2 = self._create_invoice(
684
+ self.agent_pending, self.commission_net_paid, "2024-03-15", currency=None
685
+ )
686
+ invoice3 = self._create_invoice(
687
+ self.agent_pending, self.commission_net_paid, "2024-04-15", currency=None
688
+ )
689
+ # invoice1.invoice_line_ids.agent_ids._compute_amount()
690
+ (invoice1 + invoice2 + invoice3).action_post()
691
+ self._register_payment(invoice1)
692
+ self._register_payment(invoice2)
693
+ self._register_payment(invoice3)
694
+ self._settle_agent_invoice(self.agent_pending, 1)
695
+ settlements = self.settle_model.search([("state", "=", "settled")])
696
+ 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: 16.0.2.3.0.1
3
+ Version: 16.0.2.4.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:160d10472aa0794ac787e52c597d274c4b78c88b593ac1e9b2d78bab3df2fcc3
27
+ !! source digest: sha256:8ba2b2321dee20dece1882cb3f664fb78a27b4fbccb785d1f5410b7d009889c6
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=KC_55ZPhZZon08Y1Jp7zbEYQ91LcVWR_w2UTzuNowQw,6143
1
+ odoo/addons/account_commission/README.rst,sha256=bErZvikPOqrQGBT6A3nzp-6zxTR7yM1iEgW0ZW1rmfA,6161
2
2
  odoo/addons/account_commission/__init__.py,sha256=8JG3SPnwMlgXTppOwkp3YTgDDQGo7U7veMEMpG1bL_c,64
3
- odoo/addons/account_commission/__manifest__.py,sha256=sZuCAQKKKqvXfAXN62ez_3MRRz4qmIAkhycrKTTZrV4,893
3
+ odoo/addons/account_commission/__manifest__.py,sha256=42FSmeQcbUVKDo30soNfVD5vJa7S9PjlYgLJ4lrIkUg,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=YM_lHjaDADe8EjFteiOtG5wRZutjZuvuXy8P7hCbZRU,21969
6
6
  odoo/addons/account_commission/i18n/es.po,sha256=jxrHiOiX9oSFupF-6e_0fsD5v7K8xjZTwcTfxpCfQSc,25072
@@ -14,7 +14,7 @@ odoo/addons/account_commission/models/account_move.py,sha256=6P9SkOsurOvxTY4eA3h
14
14
  odoo/addons/account_commission/models/commission.py,sha256=OHzmB5iH-h4oQf5JQGV4EFpNOkAHxC1_0-j0g-8nDXE,576
15
15
  odoo/addons/account_commission/models/commission_settlement.py,sha256=zlC641aN3U_13O0qVp2fPuHHMXnEhMS_Q-RbD4z4JU8,7177
16
16
  odoo/addons/account_commission/readme/CONFIGURE.rst,sha256=vUEhtDTSXiZc88gXBuQZIcSkM3CbkmzQQwdVgJfnbSA,466
17
- odoo/addons/account_commission/readme/CONTRIBUTORS.rst,sha256=QsQobB9fWIKbpeWn8EHcxpOVKgnsjuqydf3FRLbC3v4,667
17
+ odoo/addons/account_commission/readme/CONTRIBUTORS.rst,sha256=Z8obkoMhHL_8ftRejdtx1bByqZJCUWVpQmSwAoAOtVQ,685
18
18
  odoo/addons/account_commission/readme/DESCRIPTION.rst,sha256=dLMZSNYGysvHiOC7Untw2leoCloADPLcrkIoE8FDEVI,208
19
19
  odoo/addons/account_commission/readme/USAGE.rst,sha256=kyhxu0d4eBImmEfJ4f-blVNPNByzArlsT9SIvLpQFqI,1798
20
20
  odoo/addons/account_commission/report/__init__.py,sha256=w7t-EO6EMoLF3jDCOZz5mMxeLWYADB6TeEI2GWbzy5M,34
@@ -24,9 +24,9 @@ odoo/addons/account_commission/security/account_commission_security.xml,sha256=p
24
24
  odoo/addons/account_commission/security/ir.model.access.csv,sha256=c0k8cFhVg1A4XCaUQ-mzJdLIotKKt1ltIYznK8ELhYE,883
25
25
  odoo/addons/account_commission/static/description/icon.png,sha256=ydxSIUuHSeE4CfMVsEzLjKKVdX4RicuPj8VGM2rBpBg,8219
26
26
  odoo/addons/account_commission/static/description/icon.svg,sha256=96b_cQ-F1XuDU6S5mDi9ioe0d22Vwn30uBDQ_3ZSi5w,17220
27
- odoo/addons/account_commission/static/description/index.html,sha256=bKS86_wLMuyOBzB6p9igambrcB5z-MHfoHPizONXUYM,17067
27
+ odoo/addons/account_commission/static/description/index.html,sha256=lWfH_040z49S9We93KfBmNA7fTkr2W8UEHAiyKE2Ixo,17090
28
28
  odoo/addons/account_commission/tests/__init__.py,sha256=bxd564RH-TWEpEJWbbc558dPFEJZCsH9JM8JF3-PMUM,38
29
- odoo/addons/account_commission/tests/test_account_commission.py,sha256=yhSNC5SyEqDt3kFG7edGLka3eZl0C7FzqtBYKoIXQp8,27141
29
+ odoo/addons/account_commission/tests/test_account_commission.py,sha256=AMkGc0mPvdB9tIMBVec0w-zoE9pnapEteD8xFCJziOE,28724
30
30
  odoo/addons/account_commission/views/account_move_views.xml,sha256=N6PGXNMSxgpwaz5HtydDTRX0stu3QzTX5vBICCksP9s,6600
31
31
  odoo/addons/account_commission/views/commission_settlement_views.xml,sha256=JG5sX13R5jdB79m1Pub2rwqhM1s3Kux3btXAbgv_sFk,3496
32
32
  odoo/addons/account_commission/views/commission_views.xml,sha256=oY2-WJ-lEn3gCoFMqStKObGT3LRkBxMmANm2MRhYuRE,614
@@ -35,7 +35,7 @@ odoo/addons/account_commission/wizards/__init__.py,sha256=ddwjnl0fpZTw56iNQmRcDJ
35
35
  odoo/addons/account_commission/wizards/commission_make_settle.py,sha256=k7yztap0JSa5q-QH71GXd0WFaUG639ETaAKrqdH8UE0,1717
36
36
  odoo/addons/account_commission/wizards/wizard_invoice.py,sha256=SumDW3606uLS4d6L2rKjQbwdvfmIYovKark-EUMTve0,3162
37
37
  odoo/addons/account_commission/wizards/wizard_invoice.xml,sha256=Afx90Mccl0EjLzZ2dJa2dOikYhWxIY5tQ7objmca8gc,2292
38
- odoo_addon_account_commission-16.0.2.3.0.1.dist-info/METADATA,sha256=mJQqvjpVKEJE7uVP9jsV_drb8CPg25GHDHhc6zLLrHs,6731
39
- odoo_addon_account_commission-16.0.2.3.0.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
40
- odoo_addon_account_commission-16.0.2.3.0.1.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
41
- odoo_addon_account_commission-16.0.2.3.0.1.dist-info/RECORD,,
38
+ odoo_addon_account_commission-16.0.2.4.0.dist-info/METADATA,sha256=CRzEfVbxXSqaq8ihUJNxIQcKQ0jMbgtdbyGfgtrTo3Y,6747
39
+ odoo_addon_account_commission-16.0.2.4.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
40
+ odoo_addon_account_commission-16.0.2.4.0.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
41
+ odoo_addon_account_commission-16.0.2.4.0.dist-info/RECORD,,