odoo-addon-account-commission 15.0.3.2.3__py3-none-any.whl → 15.0.3.3.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 @@ 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",
@@ -0,0 +1,19 @@
1
+ # Copyright 2024 Tecnativa - Pedro M. Baeza
2
+ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3
+ from openupgradelib import openupgrade
4
+
5
+
6
+ @openupgrade.migrate()
7
+ def migrate(env, version):
8
+ """Fill new invoice_agent_line_id many2one from the old many2many agent_line
9
+ equivalent table. This table always contain only one record on standard use.
10
+ """
11
+ openupgrade.logged_query(
12
+ env.cr,
13
+ """
14
+ UPDATE commission_settlement_line csl
15
+ SET invoice_agent_line_id = agent_line_id
16
+ FROM settlement_agent_line_rel rel
17
+ WHERE rel.settlement_id = csl.id
18
+ """,
19
+ )
@@ -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,12 +1,11 @@
1
1
  Metadata-Version: 2.1
2
- Name: odoo-addon-account-commission
3
- Version: 15.0.3.2.3
2
+ Name: odoo-addon-account_commission
3
+ Version: 15.0.3.3.0.1
4
4
  Summary: Account commissions
5
5
  Home-page: https://github.com/OCA/commission
6
6
  Author: Tecnativa, 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 :: 15.0
@@ -24,7 +23,7 @@ Account commissions
24
23
  !! This file is generated by oca-gen-addon-readme !!
25
24
  !! changes will be overwritten. !!
26
25
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
27
- !! source digest: sha256:e2609e9bf7ee5e4db5257c5f0363d83bc8d15e74a7944d92ebdae64cfabdc3f8
26
+ !! source digest: sha256:a54acf8b8311d933604140598d1a26f163fdfe5fdd0545e4456aeb1501d352a9
28
27
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
29
28
 
30
29
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -145,6 +144,7 @@ Contributors
145
144
 
146
145
  * Pedro M. Baeza
147
146
  * Manuel Calero
147
+ * Sergio Teruel
148
148
 
149
149
  * `Quartile <https://www.quartile.co>`__:
150
150
 
@@ -175,5 +175,3 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
175
175
  This module is part of the `OCA/commission <https://github.com/OCA/commission/tree/15.0/account_commission>`_ project on GitHub.
176
176
 
177
177
  You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
178
-
179
-
@@ -1,16 +1,17 @@
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
7
7
  odoo/addons/account_commission/i18n/ja.po,sha256=ry3KLF4mKnN8qZBXL4Spty6vBs9NF8oc1m6u8YRwh7I,24539
8
+ odoo/addons/account_commission/migrations/15.0.2.0.0/post-migration.py,sha256=6jR095CURI5kZiKYkEmQqJZTGaomu_6WOqF88t7wA8I,626
8
9
  odoo/addons/account_commission/models/__init__.py,sha256=NAnZVtdmEwISK51Ipnoin5jHE3_bVPLsNghvuFcM3NI,88
9
10
  odoo/addons/account_commission/models/account_move.py,sha256=wPUjxq86pW93ILQdf5UR4IuwIQanUjvv9Ks-TFCSz4E,9326
10
11
  odoo/addons/account_commission/models/commission.py,sha256=OHzmB5iH-h4oQf5JQGV4EFpNOkAHxC1_0-j0g-8nDXE,576
11
12
  odoo/addons/account_commission/models/commission_settlement.py,sha256=tQJvLUhuBuKf3mf5yZ0GL4O9ORRiwomIJwYN47WS1mY,7022
12
13
  odoo/addons/account_commission/readme/CONFIGURE.rst,sha256=vUEhtDTSXiZc88gXBuQZIcSkM3CbkmzQQwdVgJfnbSA,466
13
- odoo/addons/account_commission/readme/CONTRIBUTORS.rst,sha256=edkIHruglREEhXtRp3s9Y5RRMcv-MvgbB99y1M7TXck,605
14
+ odoo/addons/account_commission/readme/CONTRIBUTORS.rst,sha256=_wYefgTaoNrP104vwfzX0MZATjzRUWNOif-8zfqV8iw,623
14
15
  odoo/addons/account_commission/readme/DESCRIPTION.rst,sha256=dLMZSNYGysvHiOC7Untw2leoCloADPLcrkIoE8FDEVI,208
15
16
  odoo/addons/account_commission/readme/USAGE.rst,sha256=kyhxu0d4eBImmEfJ4f-blVNPNByzArlsT9SIvLpQFqI,1798
16
17
  odoo/addons/account_commission/report/__init__.py,sha256=w7t-EO6EMoLF3jDCOZz5mMxeLWYADB6TeEI2GWbzy5M,34
@@ -20,9 +21,9 @@ odoo/addons/account_commission/security/account_commission_security.xml,sha256=p
20
21
  odoo/addons/account_commission/security/ir.model.access.csv,sha256=c0k8cFhVg1A4XCaUQ-mzJdLIotKKt1ltIYznK8ELhYE,883
21
22
  odoo/addons/account_commission/static/description/icon.png,sha256=ydxSIUuHSeE4CfMVsEzLjKKVdX4RicuPj8VGM2rBpBg,8219
22
23
  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
24
+ odoo/addons/account_commission/static/description/index.html,sha256=mB6vSwbZuXdko4shgC3qwcLiXcnWs8codRksLwpVIkY,16972
24
25
  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
26
+ odoo/addons/account_commission/tests/test_account_commission.py,sha256=sMIZ5VMJ459LiemxK_aPZDS2dwz_xuPvbQHk_b7BMIA,27847
26
27
  odoo/addons/account_commission/views/account_move_views.xml,sha256=4oYr0ErkcbGrYtGLDj0ip3ozC9NCjp4jBJLB9YxC9Sc,6634
27
28
  odoo/addons/account_commission/views/commission_settlement_views.xml,sha256=jLyChFXOLPE5wqtbRuq6Nh7CxFh5MoTOFDWklE1ZRjc,3523
28
29
  odoo/addons/account_commission/views/commission_views.xml,sha256=oY2-WJ-lEn3gCoFMqStKObGT3LRkBxMmANm2MRhYuRE,614
@@ -31,7 +32,7 @@ odoo/addons/account_commission/wizards/__init__.py,sha256=ddwjnl0fpZTw56iNQmRcDJ
31
32
  odoo/addons/account_commission/wizards/commission_make_settle.py,sha256=Me1_y1AtiUU4KnxAHFsyBmZW_5XqCc6cH6Xr08lx8ik,1543
32
33
  odoo/addons/account_commission/wizards/wizard_invoice.py,sha256=Aga0kHWTtd5F7GehmRrqfwDaFkMlPXVIzEA0jlWTDiE,3259
33
34
  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,,
35
+ odoo_addon_account_commission-15.0.3.3.0.1.dist-info/METADATA,sha256=DeSct7QzGiPvEaWIhaU5LZGI0Q2Xxcdhr0vkbKHMUzI,6666
36
+ odoo_addon_account_commission-15.0.3.3.0.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
37
+ odoo_addon_account_commission-15.0.3.3.0.1.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
38
+ odoo_addon_account_commission-15.0.3.3.0.1.dist-info/RECORD,,