diff --git a/base_transaction_id/README.rst b/base_transaction_id/README.rst index 811b82d9..62e93f12 100644 --- a/base_transaction_id/README.rst +++ b/base_transaction_id/README.rst @@ -1,11 +1,31 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: https://www.gnu.org/licenses/agpl - :alt: License: AGPL-3 - ============================================ Base transaction ID for financial institutes ============================================ +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--auth-lightgray.png?logo=github + :target: https://github.com/OCA/server-auth/tree/12.0/base_transaction_id + :alt: OCA/server-auth +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/server-auth-12-0/server-auth-12-0-base_transaction_id + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/251/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + + Adds transaction ID to invoice and sale models and views. On Sales order, you can specify the transaction ID used for the payment and it @@ -18,19 +38,31 @@ Transaction ID into the Odoo sale order field. The main purpose is to ease the reconciliation process and be able to find the partner when importing the bank statement. +**Table of contents** + +.. contents:: + :local: + 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 smash it by providing detailed and welcomed feedback. +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 smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. Credits ======= +Authors +~~~~~~~ + +* Camptocamp + Contributors ------------- +~~~~~~~~~~~~ * Yannick Vaucher * Joël Grand-Guillaume @@ -38,20 +70,19 @@ Contributors * Guewen Baconnier * Lorenzo Battistini -Do not contact contributors directly about support or help with technical issues. +Maintainers +~~~~~~~~~~~ - -Maintainer ----------- +This module is maintained by the OCA. .. image:: https://odoo-community.org/logo.png :alt: Odoo Community Association :target: https://odoo-community.org -This module is maintained by the OCA. - 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. -To contribute to this module, please visit http://odoo-community.org. +This module is part of the `OCA/server-auth `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/base_transaction_id/__manifest__.py b/base_transaction_id/__manifest__.py index 46105bcd..81d94ef8 100644 --- a/base_transaction_id/__manifest__.py +++ b/base_transaction_id/__manifest__.py @@ -1,20 +1,24 @@ -# Copyright 2012 Yannick Vaucher, Camptocamp SA -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -{'name': 'Base transaction ID for financial institutes', - 'version': '11.0.1.0.0', - 'author': "Camptocamp,Odoo Community Association (OCA)", - 'maintainer': 'Camptocamp', - 'category': 'Hidden/Dependency', - 'depends': [ - 'sale', - ], - 'website': 'https://github.com/OCA/account-reconcile', - 'data': [ - 'views/invoice.xml', - 'views/sale.xml', - 'views/account_move_line.xml', - 'views/base_transaction_id.xml', - ], - 'installable': True, - 'license': 'AGPL-3', - } +# Copyright 2019 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + +{ + "name": "Base transaction ID for financial institutes", + "version": "12.0.1.0.0", + "author": "Camptocamp,Odoo Community Association (OCA)", + "maintainer": "Camptocamp", + "category": "Hidden/Dependency", + "depends": [ + "sale", + ], + "website": "https://github.com/OCA/account-reconcile", + "data": [ + "views/invoice.xml", + "views/sale.xml", + "views/account_move_line.xml", + ], + "qweb": [ + "static/src/xml/account_reconciliation.xml", + ], + "installable": True, + "license": "AGPL-3", +} diff --git a/base_transaction_id/models/account_bank_statement_line.py b/base_transaction_id/models/account_bank_statement_line.py index 98f7ac07..15256cc7 100644 --- a/base_transaction_id/models/account_bank_statement_line.py +++ b/base_transaction_id/models/account_bank_statement_line.py @@ -1,5 +1,7 @@ -# Copyright 2016 Yannick Vaucher (Camptocamp SA) -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +# Copyright 2019 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + + from odoo import api, models @@ -21,5 +23,5 @@ class AccountBankStatementLine(models.Model): overlook_partner=overlook_partner) if match_recs and len(match_recs) == 1: return match_recs - _super = super(AccountBankStatementLine, self) + _super = super() return _super.get_reconciliation_proposition(excluded_ids=excluded_ids) diff --git a/base_transaction_id/models/account_move.py b/base_transaction_id/models/account_move.py index 7dfa43e1..651edfbe 100644 --- a/base_transaction_id/models/account_move.py +++ b/base_transaction_id/models/account_move.py @@ -1,5 +1,7 @@ -# Copyright 2014 Guewen Baconnier (Camptocamp) -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +# Copyright 2019 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + + from odoo import models, fields, api from odoo.osv import expression @@ -35,7 +37,7 @@ class AccountMoveLine(models.Model): @api.model def domain_move_lines_for_reconciliation(self, str=False): """Add transaction_ref in search of move lines.""" - _super = super(AccountMoveLine, self) + _super = super() _get_domain = _super.domain_move_lines_for_reconciliation domain = _get_domain(str=str) if not str and str != '/': diff --git a/base_transaction_id/models/invoice.py b/base_transaction_id/models/invoice.py index c8e87901..6d481fcb 100644 --- a/base_transaction_id/models/invoice.py +++ b/base_transaction_id/models/invoice.py @@ -1,6 +1,7 @@ -# Copyright 2011-2012 Nicolas Bessi (Camptocamp) -# Copyright 2012-2015 Yannick Vaucher (Camptocamp) -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +# Copyright 2019 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + + from odoo import models, fields, api @@ -20,7 +21,7 @@ class AccountInvoice(models.Model): The transaction ID is written on the move lines only if the account is the same than the invoice's one. """ - move_lines = super(AccountInvoice, self).finalize_invoice_move_lines( + move_lines = super().finalize_invoice_move_lines( move_lines) for invoice in self: if invoice.transaction_id: diff --git a/base_transaction_id/models/sale.py b/base_transaction_id/models/sale.py index 329cd21b..d89615a0 100644 --- a/base_transaction_id/models/sale.py +++ b/base_transaction_id/models/sale.py @@ -1,5 +1,7 @@ -# Copyright 2011-2012 Nicolas Bessi (Camptocamp) -# Copyright 2012-2015 Yannick Vaucher (Camptocamp) +# Copyright 2019 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + + from odoo import models, fields, api @@ -16,6 +18,6 @@ class SaleOrder(models.Model): @api.multi def _prepare_invoice(self): """Propagate the transaction_id from the sale order to the invoice.""" - invoice_vals = super(SaleOrder, self)._prepare_invoice() + invoice_vals = super()._prepare_invoice() invoice_vals['transaction_id'] = self.transaction_id return invoice_vals diff --git a/base_transaction_id/readme/CONTRIBUTORS.rst b/base_transaction_id/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..d42a9c70 --- /dev/null +++ b/base_transaction_id/readme/CONTRIBUTORS.rst @@ -0,0 +1,7 @@ +* Yannick Vaucher +* Joël Grand-Guillaume +* Alexandre Fayolle +* Guewen Baconnier +* Lorenzo Battistini +* Iryna Vyshnevska +* Mykhailo Panarin diff --git a/base_transaction_id/readme/DESCRIPTION.rst b/base_transaction_id/readme/DESCRIPTION.rst new file mode 100644 index 00000000..c8f3edd9 --- /dev/null +++ b/base_transaction_id/readme/DESCRIPTION.rst @@ -0,0 +1,12 @@ + +Adds transaction ID to invoice and sale models and views. + +On Sales order, you can specify the transaction ID used for the payment and it +will be propagated to the invoice (even if made from packing). +This is mostly used for e-commerce handling. + +You can then add a mapping on that SO field to save the e-commerce financial +Transaction ID into the Odoo sale order field. + +The main purpose is to ease the reconciliation process and be able to find the partner +when importing the bank statement. \ No newline at end of file diff --git a/base_transaction_id/static/description/index.html b/base_transaction_id/static/description/index.html new file mode 100644 index 00000000..4ea618bd --- /dev/null +++ b/base_transaction_id/static/description/index.html @@ -0,0 +1,430 @@ + + + + + + +Base transaction ID for financial institutes + + + +
+

Base transaction ID for financial institutes

+ + +

Beta License: AGPL-3 OCA/server-auth Translate me on Weblate Try me on Runbot

+

Adds transaction ID to invoice and sale models and views.

+

On Sales order, you can specify the transaction ID used for the payment and it +will be propagated to the invoice (even if made from packing). +This is mostly used for e-commerce handling.

+

You can then add a mapping on that SO field to save the e-commerce financial +Transaction ID into the Odoo sale order field.

+

The main purpose is to ease the reconciliation process and be able to find the partner +when importing the bank statement.

+

Table of contents

+ +
+

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 smashing it by providing a detailed and welcomed +feedback.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Camptocamp
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+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.

+

This module is part of the OCA/server-auth project on GitHub.

+

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

+
+
+
+ + diff --git a/base_transaction_id/static/src/js/account_widgets.js b/base_transaction_id/static/src/js/account_widgets.js deleted file mode 100644 index c47dbc71..00000000 --- a/base_transaction_id/static/src/js/account_widgets.js +++ /dev/null @@ -1,14 +0,0 @@ -odoo.define('base_transaction_id.base_transaction_id', function (require) { - - var AccountReconciliation = require('account.reconciliation'); - - AccountReconciliation.bankStatementReconciliation.include({ - decorateMoveLine: function(line) { - this._super(line); - if (line.transaction_ref) { - line.q_label += ' (' + line.transaction_ref + ')'; - } - }, - }); - -}); diff --git a/base_transaction_id/static/src/xml/account_reconciliation.xml b/base_transaction_id/static/src/xml/account_reconciliation.xml new file mode 100644 index 00000000..5254e2de --- /dev/null +++ b/base_transaction_id/static/src/xml/account_reconciliation.xml @@ -0,0 +1,11 @@ + + + + + + + () + + + + diff --git a/base_transaction_id/views/base_transaction_id.xml b/base_transaction_id/views/base_transaction_id.xml deleted file mode 100644 index d3bbcaf8..00000000 --- a/base_transaction_id/views/base_transaction_id.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - -