odoo-addon-account-loan 16.0.1.0.4.7__py3-none-any.whl → 16.0.1.0.6__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.

Potentially problematic release.


This version of odoo-addon-account-loan might be problematic. Click here for more details.

@@ -7,7 +7,7 @@ Account Loan management
7
7
  !! This file is generated by oca-gen-addon-readme !!
8
8
  !! changes will be overwritten. !!
9
9
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10
- !! source digest: sha256:d328e0b64e0fbd4fda40de7f5439428e12e5996deb3c3da36968ce41b39d38cf
10
+ !! source digest: sha256:351df5b0a8ee65e70ff30a61532d3180efe004ec31c0965b6e74455c396d1cba
11
11
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12
12
 
13
13
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -2,7 +2,7 @@
2
2
  # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3
3
  {
4
4
  "name": "Account Loan management",
5
- "version": "16.0.1.0.4",
5
+ "version": "16.0.1.0.6",
6
6
  "author": "Creu Blanca,Odoo Community Association (OCA)",
7
7
  "website": "https://github.com/OCA/account-financial-tools",
8
8
  "license": "AGPL-3",
@@ -263,6 +263,7 @@ class AccountLoanLine(models.Model):
263
263
  )
264
264
 
265
265
  def _move_vals(self, journal=False, account=False):
266
+ self.ensure_one()
266
267
  return {
267
268
  "loan_line_id": self.id,
268
269
  "loan_id": self.loan_id.id,
@@ -274,8 +275,8 @@ class AccountLoanLine(models.Model):
274
275
  ],
275
276
  }
276
277
 
277
- def _move_line_vals(self, account=False):
278
- vals = []
278
+ def _add_basic_values(self, vals, account):
279
+ self.ensure_one()
279
280
  partner = self.loan_id.partner_id.with_company(self.loan_id.company_id)
280
281
  vals.append(
281
282
  {
@@ -286,14 +287,21 @@ class AccountLoanLine(models.Model):
286
287
  "debit": 0,
287
288
  }
288
289
  )
289
- if self.interests_amount:
290
- vals.append(
291
- {
292
- "account_id": self.loan_id.interest_expenses_account_id.id,
293
- "credit": 0,
294
- "debit": self.interests_amount,
295
- }
296
- )
290
+ return vals
291
+
292
+ def _add_interests_values(self, vals):
293
+ self.ensure_one()
294
+ vals.append(
295
+ {
296
+ "account_id": self.loan_id.interest_expenses_account_id.id,
297
+ "credit": 0,
298
+ "debit": self.interests_amount,
299
+ }
300
+ )
301
+ return vals
302
+
303
+ def _add_short_term_account_values(self, vals):
304
+ self.ensure_one()
297
305
  vals.append(
298
306
  {
299
307
  "account_id": self.loan_id.short_term_loan_account_id.id,
@@ -301,6 +309,10 @@ class AccountLoanLine(models.Model):
301
309
  "debit": self.payment_amount - self.interests_amount,
302
310
  }
303
311
  )
312
+ return vals
313
+
314
+ def _add_long_term_account_values(self, vals):
315
+ self.ensure_one()
304
316
  if self.long_term_loan_account_id and self.long_term_principal_amount:
305
317
  vals.append(
306
318
  {
@@ -318,7 +330,20 @@ class AccountLoanLine(models.Model):
318
330
  )
319
331
  return vals
320
332
 
333
+ def _move_line_vals(self, account=False):
334
+ self.ensure_one()
335
+ vals = []
336
+ vals = self._add_basic_values(vals, account)
337
+ if self.interests_amount:
338
+ vals = self._add_interests_values(vals)
339
+
340
+ vals = self._add_short_term_account_values(vals)
341
+ vals = self._add_long_term_account_values(vals)
342
+
343
+ return vals
344
+
321
345
  def _invoice_vals(self):
346
+ self.ensure_one()
322
347
  return {
323
348
  "loan_line_id": self.id,
324
349
  "loan_id": self.loan_id.id,
@@ -332,8 +357,7 @@ class AccountLoanLine(models.Model):
332
357
  ],
333
358
  }
334
359
 
335
- def _invoice_line_vals(self):
336
- vals = list()
360
+ def _add_basic_values_invoice_line(self, vals):
337
361
  vals.append(
338
362
  {
339
363
  "product_id": self.loan_id.product_id.id,
@@ -343,6 +367,9 @@ class AccountLoanLine(models.Model):
343
367
  "account_id": self.loan_id.short_term_loan_account_id.id,
344
368
  }
345
369
  )
370
+ return vals
371
+
372
+ def _add_interests_values_invoice_line(self, vals):
346
373
  vals.append(
347
374
  {
348
375
  "product_id": self.loan_id.interests_product_id.id,
@@ -354,6 +381,12 @@ class AccountLoanLine(models.Model):
354
381
  )
355
382
  return vals
356
383
 
384
+ def _invoice_line_vals(self):
385
+ vals = list()
386
+ vals = self._add_basic_values_invoice_line(vals)
387
+ vals = self._add_interests_values_invoice_line(vals)
388
+ return vals
389
+
357
390
  def _generate_move(self, journal=False, account=False):
358
391
  """
359
392
  Computes and post the moves of loans
@@ -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:d328e0b64e0fbd4fda40de7f5439428e12e5996deb3c3da36968ce41b39d38cf
370
+ !! source digest: sha256:351df5b0a8ee65e70ff30a61532d3180efe004ec31c0965b6e74455c396d1cba
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/account-financial-tools/tree/16.0/account_loan"><img alt="OCA/account-financial-tools" src="https://img.shields.io/badge/github-OCA%2Faccount--financial--tools-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-financial-tools-16-0/account-financial-tools-16-0-account_loan"><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/account-financial-tools&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 extends the functionality of accounting to support loans.
@@ -418,7 +419,9 @@ leases before a selected date</li>
418
419
  <li>Modify rates when needed (only unposted lines will be modified)</li>
419
420
  <li>Reduce or cancel the debt of a loan / lease</li>
420
421
  </ul>
421
- <a class="reference external image-reference" href="https://runbot.odoo-community.org/runbot/92/12.0"><img alt="Try me on Runbot" src="https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas" /></a>
422
+ <a class="reference external image-reference" href="https://runbot.odoo-community.org/runbot/92/12.0">
423
+ <img alt="Try me on Runbot" src="https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas" />
424
+ </a>
422
425
  </div>
423
426
  <div class="section" id="changelog">
424
427
  <h1><a class="toc-backref" href="#toc-entry-2">Changelog</a></h1>
@@ -454,7 +457,9 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
454
457
  <div class="section" id="maintainers">
455
458
  <h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
456
459
  <p>This module is maintained by the OCA.</p>
457
- <a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
460
+ <a class="reference external image-reference" href="https://odoo-community.org">
461
+ <img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
462
+ </a>
458
463
  <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
459
464
  mission is to support the collaborative development of Odoo features and
460
465
  promote its widespread use.</p>
@@ -45,6 +45,7 @@ class AccountLoanPost(models.TransientModel):
45
45
  res.append(
46
46
  {
47
47
  "account_id": self.account_id.id,
48
+ "name": self.loan_id.name,
48
49
  "partner_id": partner.id,
49
50
  "credit": 0,
50
51
  "debit": line.pending_principal_amount,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-account_loan
3
- Version: 16.0.1.0.4.7
3
+ Version: 16.0.1.0.6
4
4
  Summary: Account Loan management
5
5
  Home-page: https://github.com/OCA/account-financial-tools
6
6
  Author: Creu Blanca,Odoo Community Association (OCA)
@@ -11,9 +11,9 @@ Classifier: Framework :: Odoo
11
11
  Classifier: Framework :: Odoo :: 16.0
12
12
  Classifier: License :: OSI Approved :: GNU Affero General Public License v3
13
13
  Requires-Python: >=3.10
14
- Requires-Dist: numpy-financial <=1.0.0
15
- Requires-Dist: numpy >=1.15
16
- Requires-Dist: odoo <16.1dev,>=16.0a
14
+ Requires-Dist: numpy-financial<=1.0.0
15
+ Requires-Dist: numpy>=1.15
16
+ Requires-Dist: odoo<16.1dev,>=16.0a
17
17
 
18
18
  =======================
19
19
  Account Loan management
@@ -24,7 +24,7 @@ Account Loan management
24
24
  !! This file is generated by oca-gen-addon-readme !!
25
25
  !! changes will be overwritten. !!
26
26
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
27
- !! source digest: sha256:d328e0b64e0fbd4fda40de7f5439428e12e5996deb3c3da36968ce41b39d38cf
27
+ !! source digest: sha256:351df5b0a8ee65e70ff30a61532d3180efe004ec31c0965b6e74455c396d1cba
28
28
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
29
29
 
30
30
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -1,6 +1,6 @@
1
- odoo/addons/account_loan/README.rst,sha256=3b7-3jp4omui9123-6sHCkSoJh6rgFxDVfrcAgVoey0,4771
1
+ odoo/addons/account_loan/README.rst,sha256=I-nMH7QeMixr6x2yhOF_OIU0X2lpxCDIuzOexRS_59o,4771
2
2
  odoo/addons/account_loan/__init__.py,sha256=o9EnCAU5AKoGmP2X6ytOhQFxVqIh5Y1itLUOmzxSUJY,113
3
- odoo/addons/account_loan/__manifest__.py,sha256=Ax8mUSEuCAbiMupJy5SmnbnU41jjSAW4bAyU8wDsuiw,1083
3
+ odoo/addons/account_loan/__manifest__.py,sha256=9qutzkk5tY_MhWAdqmwgmwwYH-OTIHrIwrn0yhdNoLM,1083
4
4
  odoo/addons/account_loan/data/ir_sequence_data.xml,sha256=bLydnK8X-0QWzFoBms4UpGYYle25C2DmbpVECEG4PMc,540
5
5
  odoo/addons/account_loan/i18n/account_loan.pot,sha256=sVRLpDdwv-w1GGgPO4TeTAcM86iBV7o4FGNFSswYxNw,36274
6
6
  odoo/addons/account_loan/i18n/am.po,sha256=3Rhvjs0LBoOJTWs2pHgoq4HSDTzr3eSD46DCSAXywcc,36711
@@ -80,7 +80,7 @@ odoo/addons/account_loan/i18n/zh_CN.po,sha256=klEIONxZXSO1wvk1AeVO7_t2xdzeM9amtG
80
80
  odoo/addons/account_loan/i18n/zh_TW.po,sha256=_7Nn4UdlI3eFqq4tolfYcI1lASMPa4iNUkwy2vRSPbY,36809
81
81
  odoo/addons/account_loan/models/__init__.py,sha256=jwLlr4SgTaxqvv5CCJkgGwhwNus45E4E4e3pijuROJY,211
82
82
  odoo/addons/account_loan/models/account_loan.py,sha256=JHtBEShn5Aek1IqPcUv79EmH_mj8anRlG1hi_gOuSzM,16328
83
- odoo/addons/account_loan/models/account_loan_line.py,sha256=Kv4xwGQ8wN4j8-MWsEDm9kcQQ3kVhEFcA8Vgty6-z0A,17332
83
+ odoo/addons/account_loan/models/account_loan_line.py,sha256=_E7YNaxOmJ3_8SVdamslbZ9CiKTs7O16IwOigq4C1IM,18252
84
84
  odoo/addons/account_loan/models/account_move.py,sha256=8p2V854_J060o_yupWrGyVa5Ps44d8GpkY4azcAUz3k,937
85
85
  odoo/addons/account_loan/models/res_partner.py,sha256=uGZfhvx1x0Bg2DaXA2HrVMzskfa8Gg80yJCU9Y2XJ1g,997
86
86
  odoo/addons/account_loan/readme/CONTRIBUTORS.rst,sha256=Ijn5BrL2AGAUBRbJF1NEm8Kbmd1phhKYB-oD1PzI6S4,151
@@ -90,7 +90,7 @@ odoo/addons/account_loan/readme/USAGE.rst,sha256=kjZZgQy0GLDicDWcYWZ3E8UJOaG0e__
90
90
  odoo/addons/account_loan/security/account_loan_security.xml,sha256=OK99GIjEzFgyBf3-s8u8AojY-oQ_Go61Z1xe4hBarn0,830
91
91
  odoo/addons/account_loan/security/ir.model.access.csv,sha256=3RwBdFKlfSzAJCUWYxDBGUw0t0ZLuBphkZWYtNHGmlI,1009
92
92
  odoo/addons/account_loan/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
93
- odoo/addons/account_loan/static/description/index.html,sha256=f80cfC__uffrUMrZQc4nuIOi0GAquwrl1pd3Uyslu3U,15148
93
+ odoo/addons/account_loan/static/description/index.html,sha256=vfi2QBOg-oXKK12PPlKfrHmmxw75nCN6JCkU9B6Yzxk,15233
94
94
  odoo/addons/account_loan/tests/__init__.py,sha256=I1GwELsBL3FTRS0pVrE5q-qEk537mMnSOXpWkPVcBnY,94
95
95
  odoo/addons/account_loan/tests/test_loan.py,sha256=lCSIDL5nTPiz2xFQQwYiVh0hPTxgA_C-O6X2iSxcZi8,25695
96
96
  odoo/addons/account_loan/views/account_loan_lines_view.xml,sha256=FuqV2E98vUiqVBhEG5RNu8mFnVTdVHu0jARjfAFHCVc,5832
@@ -104,9 +104,9 @@ odoo/addons/account_loan/wizards/account_loan_increase_amount.py,sha256=rR_xp2lM
104
104
  odoo/addons/account_loan/wizards/account_loan_increase_amount.xml,sha256=tsp9itYs-mOtyOKzBGNCfHYexYNpJZYyY-BeDUhBryI,1477
105
105
  odoo/addons/account_loan/wizards/account_loan_pay_amount.py,sha256=-kG1q8Ueh0Fl_glZIr3pRVW-7GnPTPhKbVXm_pfOm1Y,4135
106
106
  odoo/addons/account_loan/wizards/account_loan_pay_amount_view.xml,sha256=9s1qfpai_AiyrmPQk2vtJPz5LiCmsjb84yCmBw9de5o,1619
107
- odoo/addons/account_loan/wizards/account_loan_post.py,sha256=d7beoNhR0nBAxmfa9z6Xy1YxeVIdS9l4fF0qDILm2mo,3150
107
+ odoo/addons/account_loan/wizards/account_loan_post.py,sha256=ImxohbBVZAtG4ufJ9taQh_qRlRaJvOvZTLRhqQBlKUs,3193
108
108
  odoo/addons/account_loan/wizards/account_loan_post_view.xml,sha256=dw5m2GlDtswq07lnsMqWctIEdYRr8Q3r0cpVscbKyUM,1463
109
- odoo_addon_account_loan-16.0.1.0.4.7.dist-info/METADATA,sha256=BuEnk2uJwjAPLJhoDNW3keR3Kmv63CmelKic1-rW3Is,5362
110
- odoo_addon_account_loan-16.0.1.0.4.7.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
111
- odoo_addon_account_loan-16.0.1.0.4.7.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
112
- odoo_addon_account_loan-16.0.1.0.4.7.dist-info/RECORD,,
109
+ odoo_addon_account_loan-16.0.1.0.6.dist-info/METADATA,sha256=DDotfGh8k6CVE_ODvA8aPcuIZCzqt8apmLXcAm4-n4Y,5357
110
+ odoo_addon_account_loan-16.0.1.0.6.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
111
+ odoo_addon_account_loan-16.0.1.0.6.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
112
+ odoo_addon_account_loan-16.0.1.0.6.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.45.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5