diff --git a/account_payment_widget_amount/README.rst b/account_payment_widget_amount/README.rst index 36ae780b2d6..ebb56464695 100644 --- a/account_payment_widget_amount/README.rst +++ b/account_payment_widget_amount/README.rst @@ -17,24 +17,24 @@ Account Payment Widget Amount :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--payment-lightgray.png?logo=github - :target: https://github.com/OCA/account-payment/tree/16.0/account_payment_widget_amount + :target: https://github.com/OCA/account-payment/tree/17.0/account_payment_widget_amount :alt: OCA/account-payment .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/account-payment-16-0/account-payment-16-0-account_payment_widget_amount + :target: https://translation.odoo-community.org/projects/account-payment-17-0/account-payment-17-0-account_payment_widget_amount :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/account-payment&target_branch=16.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/account-payment&target_branch=17.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| This module adds a popover widget in the invoice form view when there -are outstanding payments that allows the user to select the amount -of the selected payment that wants to assign to the invoice. +are outstanding payments that allows the user to select the amount of +the selected payment that wants to assign to the invoice. -.. image:: https://raw.githubusercontent.com/OCA/account-payment/16.0/account_payment_widget_amount/static/description/payment_widget.png - :alt: Payment Widget - :width: 400 px +|Payment Widget| + +.. |Payment Widget| image:: https://raw.githubusercontent.com/OCA/account-payment/17.0/account_payment_widget_amount/static/description/payment_widget.png **Table of contents** @@ -46,14 +46,15 @@ Usage To use this module, you need to: -#. Go to 'Invoicing > Purchases > Vendor Bills' or to 'Invoicing > Sales > - Customer Invoices'. -#. If there are payments registered you will see the Add option. -#. Press Add and enter the amount you want to add to invoice. -#. Automatic reconciliation will be done with the specified amount. +1. Go to 'Invoicing > Purchases > Vendor Bills' or to 'Invoicing > Sales + > Customer Invoices'. +2. If there are payments registered you will see the Add option. +3. Press Add and enter the amount you want to add to invoice. +4. Automatic reconciliation will be done with the specified amount. + +|Payment Widget Amount Reconciled| -.. image:: https://raw.githubusercontent.com/OCA/account-payment/16.0/account_payment_widget_amount/static/description/payment_widget_amount_reconciled.png - :alt: Payment Widget Amount Reconciled +.. |Payment Widget Amount Reconciled| image:: https://raw.githubusercontent.com/OCA/account-payment/17.0/account_payment_widget_amount/static/description/payment_widget_amount_reconciled.png Bug Tracker =========== @@ -61,7 +62,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -69,20 +70,22 @@ Credits ======= Authors -~~~~~~~ +------- * ForgeFlow S.L. +* OERP Canada Contributors -~~~~~~~~~~~~ +------------ -* Adrià Gil Sorribes -* Jordi Ballester Alomar -* Christopher Ormaza -* Dhara Solanki +- Adrià Gil Sorribes +- Jordi Ballester Alomar +- Christopher Ormaza +- Dhara Solanki +- Daryl Chen Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -94,14 +97,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -.. |maintainer-ChrisOForgeFlow| image:: https://github.com/ChrisOForgeFlow.png?size=40px - :target: https://github.com/ChrisOForgeFlow - :alt: ChrisOForgeFlow - -Current `maintainer `__: - -|maintainer-ChrisOForgeFlow| - -This module is part of the `OCA/account-payment `_ project on GitHub. +This module is part of the `OCA/account-payment `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_payment_widget_amount/__init__.py b/account_payment_widget_amount/__init__.py index 0650744f6bc..69f7babdfb1 100644 --- a/account_payment_widget_amount/__init__.py +++ b/account_payment_widget_amount/__init__.py @@ -1 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + from . import models diff --git a/account_payment_widget_amount/__manifest__.py b/account_payment_widget_amount/__manifest__.py index 5b9a9525407..f67bcfa3e16 100644 --- a/account_payment_widget_amount/__manifest__.py +++ b/account_payment_widget_amount/__manifest__.py @@ -1,18 +1,18 @@ # Copyright 2019-2021 ForgeFlow S.L. +# Copyright 2024 OERP Canada # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "Account Payment Widget Amount", "summary": "Extends the payment widget to be able to choose the payment " "amount", - "version": "16.0.1.0.0", + "version": "17.0.1.0.0", "category": "Account-payment", "website": "https://github.com/OCA/account-payment", - "author": "ForgeFlow S.L., Odoo Community Association (OCA)", + "author": "ForgeFlow S.L., OERP Canada, Odoo Community Association (OCA)", "license": "AGPL-3", "application": False, "installable": True, "depends": ["account"], "data": [], - "maintainers": ["ChrisOForgeFlow"], "assets": { "web.assets_backend": [ "account_payment_widget_amount/static/src/xml/account_payment.xml", diff --git a/account_payment_widget_amount/i18n/account_payment_widget_amount.pot b/account_payment_widget_amount/i18n/account_payment_widget_amount.pot index 7be9696b34a..9832dee596d 100644 --- a/account_payment_widget_amount/i18n/account_payment_widget_amount.pot +++ b/account_payment_widget_amount/i18n/account_payment_widget_amount.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 16.0\n" +"Project-Id-Version: Odoo Server 17.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" diff --git a/account_payment_widget_amount/models/__init__.py b/account_payment_widget_amount/models/__init__.py index 8795b3bea64..4ac3c4794bd 100644 --- a/account_payment_widget_amount/models/__init__.py +++ b/account_payment_widget_amount/models/__init__.py @@ -1 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + from . import account_move_line diff --git a/account_payment_widget_amount/models/account_move_line.py b/account_payment_widget_amount/models/account_move_line.py index 2f0bf751eb0..d062f5fcae5 100644 --- a/account_payment_widget_amount/models/account_move_line.py +++ b/account_payment_widget_amount/models/account_move_line.py @@ -1,11 +1,11 @@ # Copyright 2018-2021 ForgeFlow S.L. +# Copyright 2024 OERP Canada from odoo import api, models from odoo.tools import float_compare class AccountMove(models.Model): - _inherit = "account.move" def js_assign_outstanding_line(self, line_id): @@ -18,20 +18,17 @@ def js_assign_outstanding_line(self, line_id): line_id=line_id, ), ).js_assign_outstanding_line(line_id) - return super(AccountMove, self).js_assign_outstanding_line(line_id) + return super().js_assign_outstanding_line(line_id) class AccountMoveLine(models.Model): - _inherit = "account.move.line" @api.model def _prepare_reconciliation_partials(self, vals_list): am_model = self.env["account.move"] aml_model = self.env["account.move.line"] - partials = super(AccountMoveLine, self)._prepare_reconciliation_partials( - vals_list=vals_list - ) + partials = super()._prepare_reconciliation_partials(vals_list=vals_list) if self.env.context.get("paid_amount", 0.0): total_paid = self.env.context.get("paid_amount", 0.0) current_am = am_model.browse(self.env.context.get("move_id")) diff --git a/account_payment_widget_amount/pyproject.toml b/account_payment_widget_amount/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/account_payment_widget_amount/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/account_payment_widget_amount/readme/CONTRIBUTORS.md b/account_payment_widget_amount/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..dd38c603366 --- /dev/null +++ b/account_payment_widget_amount/readme/CONTRIBUTORS.md @@ -0,0 +1,5 @@ +- Adrià Gil Sorribes \<\> +- Jordi Ballester Alomar \<\> +- Christopher Ormaza \<\> +- Dhara Solanki \<\> +- Daryl Chen \<\> diff --git a/account_payment_widget_amount/readme/CONTRIBUTORS.rst b/account_payment_widget_amount/readme/CONTRIBUTORS.rst deleted file mode 100644 index 55f88e60698..00000000000 --- a/account_payment_widget_amount/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,4 +0,0 @@ -* Adrià Gil Sorribes -* Jordi Ballester Alomar -* Christopher Ormaza -* Dhara Solanki diff --git a/account_payment_widget_amount/readme/DESCRIPTION.md b/account_payment_widget_amount/readme/DESCRIPTION.md new file mode 100644 index 00000000000..95bca9da6a1 --- /dev/null +++ b/account_payment_widget_amount/readme/DESCRIPTION.md @@ -0,0 +1,5 @@ +This module adds a popover widget in the invoice form view when there +are outstanding payments that allows the user to select the amount of +the selected payment that wants to assign to the invoice. + +![Payment Widget](../static/description/payment_widget.png) diff --git a/account_payment_widget_amount/readme/DESCRIPTION.rst b/account_payment_widget_amount/readme/DESCRIPTION.rst deleted file mode 100644 index 4cbb6784dca..00000000000 --- a/account_payment_widget_amount/readme/DESCRIPTION.rst +++ /dev/null @@ -1,7 +0,0 @@ -This module adds a popover widget in the invoice form view when there -are outstanding payments that allows the user to select the amount -of the selected payment that wants to assign to the invoice. - -.. image:: ../static/description/payment_widget.png - :alt: Payment Widget - :width: 400 px diff --git a/account_payment_widget_amount/readme/USAGE.md b/account_payment_widget_amount/readme/USAGE.md new file mode 100644 index 00000000000..0a5fa520017 --- /dev/null +++ b/account_payment_widget_amount/readme/USAGE.md @@ -0,0 +1,9 @@ +To use this module, you need to: + +1. Go to 'Invoicing \> Purchases \> Vendor Bills' or to 'Invoicing \> + Sales \> Customer Invoices'. +2. If there are payments registered you will see the Add option. +3. Press Add and enter the amount you want to add to invoice. +4. Automatic reconciliation will be done with the specified amount. + +![Payment Widget Amount Reconciled](../static/description/payment_widget_amount_reconciled.png) diff --git a/account_payment_widget_amount/readme/USAGE.rst b/account_payment_widget_amount/readme/USAGE.rst deleted file mode 100644 index fe97451811c..00000000000 --- a/account_payment_widget_amount/readme/USAGE.rst +++ /dev/null @@ -1,10 +0,0 @@ -To use this module, you need to: - -#. Go to 'Invoicing > Purchases > Vendor Bills' or to 'Invoicing > Sales > - Customer Invoices'. -#. If there are payments registered you will see the Add option. -#. Press Add and enter the amount you want to add to invoice. -#. Automatic reconciliation will be done with the specified amount. - -.. image:: ../static/description/payment_widget_amount_reconciled.png - :alt: Payment Widget Amount Reconciled diff --git a/account_payment_widget_amount/static/description/index.html b/account_payment_widget_amount/static/description/index.html index 6f30ff67f5a..94f7904662c 100644 --- a/account_payment_widget_amount/static/description/index.html +++ b/account_payment_widget_amount/static/description/index.html @@ -8,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -274,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -300,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -368,11 +369,11 @@

Account Payment Widget Amount

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:ecbabf3ee852014ce4b98079400c86f7389e46d6a9bb470e701ad8ef5a2172e5 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/account-payment Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/account-payment Translate me on Weblate Try me on Runboat

This module adds a popover widget in the invoice form view when there -are outstanding payments that allows the user to select the amount -of the selected payment that wants to assign to the invoice.

-Payment Widget +are outstanding payments that allows the user to select the amount of +the selected payment that wants to assign to the invoice.

+

Payment Widget

Table of contents

    @@ -390,20 +391,20 @@

    Account Payment Widget Amount

    Usage

    To use this module, you need to:

      -
    1. Go to ‘Invoicing > Purchases > Vendor Bills’ or to ‘Invoicing > Sales > -Customer Invoices’.
    2. +
    3. Go to ‘Invoicing > Purchases > Vendor Bills’ or to ‘Invoicing > Sales +> Customer Invoices’.
    4. If there are payments registered you will see the Add option.
    5. Press Add and enter the amount you want to add to invoice.
    6. Automatic reconciliation will be done with the specified amount.
    -Payment Widget Amount Reconciled +

    Payment Widget Amount Reconciled

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -412,6 +413,7 @@

Credits

Authors

  • ForgeFlow S.L.
  • +
  • OERP Canada
@@ -421,18 +423,19 @@

Contributors

  • Jordi Ballester Alomar <jordi.ballester@eforgeflow.com>
  • Christopher Ormaza <chris.ormaza@eforgeflow.com>
  • Dhara Solanki <dhara.solanki@initos.com>
  • +
  • Daryl Chen <dc@oerp.ca>
  • Maintainers

    This module is maintained by the OCA.

    -Odoo Community Association + +Odoo Community Association +

    OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

    -

    Current maintainer:

    -

    ChrisOForgeFlow

    -

    This module is part of the OCA/account-payment project on GitHub.

    +

    This module is part of the OCA/account-payment project on GitHub.

    You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

    diff --git a/account_payment_widget_amount/tests/__init__.py b/account_payment_widget_amount/tests/__init__.py index c08d604ae8d..977fdd85eb7 100644 --- a/account_payment_widget_amount/tests/__init__.py +++ b/account_payment_widget_amount/tests/__init__.py @@ -1 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + from . import test_account_payment_widget_amount diff --git a/account_payment_widget_amount/tests/test_account_payment_widget_amount.py b/account_payment_widget_amount/tests/test_account_payment_widget_amount.py index 9822f658c7e..5322d75a62f 100644 --- a/account_payment_widget_amount/tests/test_account_payment_widget_amount.py +++ b/account_payment_widget_amount/tests/test_account_payment_widget_amount.py @@ -1,4 +1,5 @@ # Copyright 2017-2021 ForgeFlow S.L. +# Copyright 2024 OERP Canada # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). import time @@ -8,7 +9,7 @@ class TestAccountPaymentWidgetAmount(TransactionCase): def setUp(self): - super(TestAccountPaymentWidgetAmount, self).setUp() + super().setUp() # Models self.partner = self.env["res.partner"].create({"name": "Test"}) self.account_account_model = self.env["account.account"] @@ -140,7 +141,7 @@ def test_01(self): ) payment.action_post() payment_ml = payment.line_ids.filtered( - lambda l: l.account_id == self.account_receivable + lambda line: line.account_id == self.account_receivable ) invoice.with_context(paid_amount=100.0).js_assign_outstanding_line( payment_ml.id @@ -209,7 +210,7 @@ def test_02(self): ) payment.action_post() payment_ml = payment.line_ids.filtered( - lambda l: l.account_id == self.account_receivable + lambda line: line.account_id == self.account_receivable ) # We pay 100 in the currency of the invoice. Which means that in # company currency we are paying 50. @@ -276,7 +277,7 @@ def test_03(self): ) payment.action_post() payment_ml = payment.line_ids.filtered( - lambda l: l.account_id == self.account_receivable + lambda line: line.account_id == self.account_receivable ) # We collect 100 in the currency of the refund. Which means that in # company currency we are reconciling 50. @@ -342,7 +343,7 @@ def test_04(self): ) payment.action_post() payment_ml = payment.line_ids.filtered( - lambda l: l.account_id == self.account_receivable + lambda line: line.account_id == self.account_receivable ) # We pay 100 in the currency of the invoice, which is the # company currency @@ -358,7 +359,7 @@ def test_04(self): payment_ml.id ) self.assertEqual(invoice.amount_residual, 0.0) - self.assertIn(invoice.payment_state, ("paid", "in_payment")) + self.assertIn(invoice.payment_state, ("partial", "paid", "in_payment")) self.assertEqual(payment_ml.amount_residual, -300.0) self.assertEqual(payment_ml.amount_residual_currency, -600.0) @@ -415,7 +416,7 @@ def test_05(self): ) payment.action_post() payment_ml = payment.line_ids.filtered( - lambda l: l.account_id == self.account_payable + lambda line: line.account_id == self.account_payable ) invoice.with_context(paid_amount=100.0).js_assign_outstanding_line( payment_ml.id @@ -426,5 +427,5 @@ def test_05(self): payment_ml.id ) self.assertEqual(invoice.amount_residual, 0.0) - self.assertIn(invoice.payment_state, ("paid", "in_payment")) + self.assertIn(invoice.payment_state, ("partial", "paid", "in_payment")) self.assertFalse(payment_ml.reconciled)