mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[FIX+IMP] account_reconcile_payment_order: Take into account payment orders "non transferred" + Improvements in README+manifest
This commit is contained in:
committed by
CarlosRoca13
parent
22428eeec0
commit
673d8b0de6
@@ -1,23 +1,41 @@
|
|||||||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
||||||
:alt: License: AGPL-3
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
:alt: License: AGPL-3
|
||||||
|
|
||||||
|
========================
|
||||||
Reconcile payment orders
|
Reconcile payment orders
|
||||||
========================
|
========================
|
||||||
|
|
||||||
Payment orders that show up as as one big transaction can be difficult for the accounting to handle if a transfer acount is used. In this case, we need to reconcile this transaction with possibly hunderds of move lines, which can be a bit tiresome. This module tries to recognize transactions deriving from payment orders and propose the unreconciled move lines from this payment order.
|
Payment orders that show up as one big transaction can be difficult for the
|
||||||
|
accounting to handle if a transfer account is used. In this case, we need to
|
||||||
|
reconcile this transaction with possibly hundreds of move lines, which can be a
|
||||||
|
bit tiresome. This module tries to recognize transactions deriving from payment
|
||||||
|
orders and propose the unreconciled move lines from this payment order.
|
||||||
|
|
||||||
|
Installation
|
||||||
|
============
|
||||||
|
|
||||||
|
This module requires the module **account_banking_payment_transfer**, available
|
||||||
|
in https://github.com/OCA/bank-payment.
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
=====
|
=====
|
||||||
|
|
||||||
It should just work. What the module does is to search for a payment order in state 'sent' that has the same amount as the statement line, and the same bank account than the statement.
|
It should just work. What the module does is to search for a payment order in
|
||||||
|
state 'sent' (for orders transferred to an intermediate account) or done (for
|
||||||
|
orders non transferred) that has the same amount as the statement line, and the
|
||||||
|
same bank account than the statement. If any, all move lines are automatically
|
||||||
|
proposed for the reconcile.
|
||||||
|
|
||||||
For further information, please visit:
|
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
||||||
|
:alt: Try me on Runbot
|
||||||
* https://www.odoo.com/forum/help-1
|
:target: https://runbot.odoo-community.org/runbot/98/8.0
|
||||||
|
|
||||||
Known issues / Roadmap
|
Known issues / Roadmap
|
||||||
======================
|
======================
|
||||||
|
|
||||||
* it would be good to check references too, but at least the bank in use here changes some characters, so this doesn't seem to be a general solution.
|
* it would be good to check references too, but at least the bank in use here
|
||||||
|
changes some characters, so this doesn't seem to be a general solution.
|
||||||
|
|
||||||
Bug Tracker
|
Bug Tracker
|
||||||
===========
|
===========
|
||||||
@@ -34,6 +52,7 @@ Contributors
|
|||||||
------------
|
------------
|
||||||
|
|
||||||
* Holger Brunn <hbrunn@therp.nl>
|
* Holger Brunn <hbrunn@therp.nl>
|
||||||
|
* Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
|
||||||
|
|
||||||
Maintainer
|
Maintainer
|
||||||
----------
|
----------
|
||||||
|
|||||||
@@ -19,11 +19,13 @@
|
|||||||
##############################################################################
|
##############################################################################
|
||||||
{
|
{
|
||||||
"name": "Reconcile payment orders",
|
"name": "Reconcile payment orders",
|
||||||
"version": "1.0",
|
"version": "8.0.1.0.0",
|
||||||
"author": "Therp BV,Odoo Community Association (OCA)",
|
"author": "Therp BV,"
|
||||||
|
"Serv. Tecnol. Avanzados - Pedro M. Baeza,"
|
||||||
|
"Odoo Community Association (OCA)",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
"category": "Accounting & Finance",
|
"category": "Accounting & Finance",
|
||||||
"summary": "Automatically reconcile all lines from sent payment orders",
|
"summary": "Automatically reconcile all lines from payment orders",
|
||||||
"depends": [
|
"depends": [
|
||||||
'account_banking_payment_transfer',
|
'account_banking_payment_transfer',
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * account_reconcile_payment_order
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 8.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"Last-Translator: <>\n"
|
||||||
|
"Language-Team: \n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: \n"
|
||||||
|
|
||||||
|
#. module: account_reconcile_payment_order
|
||||||
|
#: model:ir.model,name:account_reconcile_payment_order.model_account_bank_statement_line
|
||||||
|
msgid "Bank Statement Line"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
24
account_reconcile_payment_order/i18n/de.po
Normal file
24
account_reconcile_payment_order/i18n/de.po
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * account_reconcile_payment_order
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: bank-statement-reconcile (8.0)\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2015-10-14 09:25+0000\n"
|
||||||
|
"PO-Revision-Date: 2015-08-19 00:32+0000\n"
|
||||||
|
"Last-Translator: <>\n"
|
||||||
|
"Language-Team: German (http://www.transifex.com/oca/OCA-bank-statement-"
|
||||||
|
"reconcile-8-0/language/de/)\n"
|
||||||
|
"Language: de\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
#. module: account_reconcile_payment_order
|
||||||
|
#: model:ir.model,name:account_reconcile_payment_order.model_account_bank_statement_line
|
||||||
|
msgid "Bank Statement Line"
|
||||||
|
msgstr "Kontoauszugzeile"
|
||||||
24
account_reconcile_payment_order/i18n/fr.po
Normal file
24
account_reconcile_payment_order/i18n/fr.po
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * account_reconcile_payment_order
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: bank-statement-reconcile (8.0)\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2016-04-20 02:39+0000\n"
|
||||||
|
"PO-Revision-Date: 2015-08-19 00:32+0000\n"
|
||||||
|
"Last-Translator: <>\n"
|
||||||
|
"Language-Team: French (http://www.transifex.com/oca/OCA-bank-statement-"
|
||||||
|
"reconcile-8-0/language/fr/)\n"
|
||||||
|
"Language: fr\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||||
|
|
||||||
|
#. module: account_reconcile_payment_order
|
||||||
|
#: model:ir.model,name:account_reconcile_payment_order.model_account_bank_statement_line
|
||||||
|
msgid "Bank Statement Line"
|
||||||
|
msgstr "Ligne de relevé bancaire"
|
||||||
24
account_reconcile_payment_order/i18n/it.po
Normal file
24
account_reconcile_payment_order/i18n/it.po
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * account_reconcile_payment_order
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: bank-statement-reconcile (8.0)\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2015-10-14 09:25+0000\n"
|
||||||
|
"PO-Revision-Date: 2015-08-19 00:32+0000\n"
|
||||||
|
"Last-Translator: <>\n"
|
||||||
|
"Language-Team: Italian (http://www.transifex.com/oca/OCA-bank-statement-"
|
||||||
|
"reconcile-8-0/language/it/)\n"
|
||||||
|
"Language: it\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
#. module: account_reconcile_payment_order
|
||||||
|
#: model:ir.model,name:account_reconcile_payment_order.model_account_bank_statement_line
|
||||||
|
msgid "Bank Statement Line"
|
||||||
|
msgstr "Linea estratto conto"
|
||||||
24
account_reconcile_payment_order/i18n/nl_NL.po
Normal file
24
account_reconcile_payment_order/i18n/nl_NL.po
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * account_reconcile_payment_order
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: bank-statement-reconcile (8.0)\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2017-06-24 00:30+0000\n"
|
||||||
|
"PO-Revision-Date: 2015-08-19 00:32+0000\n"
|
||||||
|
"Last-Translator: <>\n"
|
||||||
|
"Language-Team: Dutch (Netherlands) (http://www.transifex.com/oca/OCA-bank-"
|
||||||
|
"statement-reconcile-8-0/language/nl_NL/)\n"
|
||||||
|
"Language: nl_NL\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
#. module: account_reconcile_payment_order
|
||||||
|
#: model:ir.model,name:account_reconcile_payment_order.model_account_bank_statement_line
|
||||||
|
msgid "Bank Statement Line"
|
||||||
|
msgstr "Bankafschriftregel"
|
||||||
25
account_reconcile_payment_order/i18n/sl.po
Normal file
25
account_reconcile_payment_order/i18n/sl.po
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * account_reconcile_payment_order
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: bank-statement-reconcile (8.0)\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2015-08-19 00:32+0000\n"
|
||||||
|
"PO-Revision-Date: 2015-08-19 00:32+0000\n"
|
||||||
|
"Last-Translator: <>\n"
|
||||||
|
"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-bank-statement-"
|
||||||
|
"reconcile-8-0/language/sl/)\n"
|
||||||
|
"Language: sl\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
|
||||||
|
"%100==4 ? 2 : 3);\n"
|
||||||
|
|
||||||
|
#. module: account_reconcile_payment_order
|
||||||
|
#: model:ir.model,name:account_reconcile_payment_order.model_account_bank_statement_line
|
||||||
|
msgid "Bank Statement Line"
|
||||||
|
msgstr "Postavka bančnega izpiska"
|
||||||
@@ -35,7 +35,7 @@ class AccountBankStatementLine(models.Model):
|
|||||||
select order_id, sum(amount_currency) as amount
|
select order_id, sum(amount_currency) as amount
|
||||||
from payment_line
|
from payment_line
|
||||||
join payment_order o on o.id=order_id
|
join payment_order o on o.id=order_id
|
||||||
where o.state = 'sent'
|
where o.state in ('sent', 'done')
|
||||||
group by order_id)
|
group by order_id)
|
||||||
select order_id from order_sums where amount = %s''',
|
select order_id from order_sums where amount = %s''',
|
||||||
(Decimal(float_repr(abs(this.amount), digits)),))
|
(Decimal(float_repr(abs(this.amount), digits)),))
|
||||||
@@ -55,9 +55,14 @@ class AccountBankStatementLine(models.Model):
|
|||||||
def get_reconcile_lines_from_order(self, this, orders, excluded_ids=None):
|
def get_reconcile_lines_from_order(self, this, orders, excluded_ids=None):
|
||||||
"""return lines to reconcile our statement line with"""
|
"""return lines to reconcile our statement line with"""
|
||||||
order = orders[0]
|
order = orders[0]
|
||||||
|
if order.state == 'sent':
|
||||||
|
move_lines_list = list(set(order._get_transfer_move_lines()))
|
||||||
|
else:
|
||||||
|
move_lines = order.line_ids.mapped('move_line_id').filtered(
|
||||||
|
lambda x: not x.reconcile_id)
|
||||||
|
move_lines_list = [x for x in move_lines]
|
||||||
return self.env['account.move.line']\
|
return self.env['account.move.line']\
|
||||||
.prepare_move_lines_for_reconciliation_widget(
|
.prepare_move_lines_for_reconciliation_widget(move_lines_list)
|
||||||
list(set(order._get_transfer_move_lines())))
|
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def get_reconciliation_proposition(self, this, excluded_ids=None):
|
def get_reconciliation_proposition(self, this, excluded_ids=None):
|
||||||
|
|||||||
Reference in New Issue
Block a user