diff --git a/account_advanced_reconcile/__init__.py b/account_advanced_reconcile/__init__.py deleted file mode 100644 index 1c643cae..00000000 --- a/account_advanced_reconcile/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Author: Guewen Baconnier -# Copyright 2012 Camptocamp SA -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -import easy_reconcile -import base_advanced_reconciliation -import advanced_reconciliation diff --git a/account_advanced_reconcile/__openerp__.py b/account_advanced_reconcile/__openerp__.py deleted file mode 100644 index 00ec44b4..00000000 --- a/account_advanced_reconcile/__openerp__.py +++ /dev/null @@ -1,83 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Author: Guewen Baconnier -# Copyright 2012 Camptocamp SA -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -{'name': "Advanced Reconcile", - 'version': '1.0', - 'author': 'Camptocamp', - 'maintainer': 'Camptocamp', - 'category': 'Finance', - 'complexity': 'normal', - 'depends': ['account_easy_reconcile', - ], - 'description': """ -Advanced reconciliation methods for the module account_easy_reconcile. - -In addition to the features implemented in account_easy_reconcile, which are: - - reconciliation facilities for big volume of transactions - - setup different profiles of reconciliation by account - - each profile can use many methods of reconciliation - - this module is also a base to create others reconciliation methods - which can plug in the profiles - - a profile a reconciliation can be run manually or by a cron - - monitoring of reconcilation runs with an history - -It implements a basis to created advanced reconciliation methods in a few lines -of code. - -Typically, such a method can be: - - Reconcile Journal items if the partner and the ref are equal - - Reconcile Journal items if the partner is equal and the ref - is the same than ref or name - - Reconcile Journal items if the partner is equal and the ref - match with a pattern - -And they allows: - - Reconciliations with multiple credit / multiple debit lines - - Partial reconciliations - - Write-off amount as well - -A method is already implemented in this module, it matches on items: - - Partner - - Ref on credit move lines should be case insensitive equals to the ref or - the name of the debit move line - -The base class to find the reconciliations is built to be as efficient as -possible. - -So basically, if you have an invoice with 3 payments (one per month), the first -month, it will partial reconcile the debit move line with the first payment, the second -month, it will partial reconcile the debit move line with 2 first payments, -the third month, it will make the full reconciliation. - -This module is perfectly adapted for E-Commerce business where a big volume of -move lines and so, reconciliations, are involved and payments often come from -many offices. - - """, - 'website': 'http://www.camptocamp.com', - 'data': ['easy_reconcile_view.xml'], - 'test': [], - 'images': [], - 'installable': True, - 'auto_install': False, - 'license': 'AGPL-3', - 'application': True, -} diff --git a/account_advanced_reconcile/advanced_reconciliation.py b/account_advanced_reconcile/advanced_reconciliation.py deleted file mode 100644 index 5ac292c1..00000000 --- a/account_advanced_reconcile/advanced_reconciliation.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Author: Guewen Baconnier -# Copyright 2012 Camptocamp SA -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv import orm - - -class easy_reconcile_advanced_ref(orm.TransientModel): - - _name = 'easy.reconcile.advanced.ref' - _inherit = 'easy.reconcile.advanced' - - def _skip_line(self, cr, uid, rec, move_line, context=None): - """ - When True is returned on some conditions, the credit move line - will be skipped for reconciliation. Can be inherited to - skip on some conditions. ie: ref or partner_id is empty. - """ - return not (move_line.get('ref') and move_line.get('partner_id')) - - def _matchers(self, cr, uid, rec, move_line, context=None): - """ - Return the values used as matchers to find the opposite lines - - All the matcher keys in the dict must have their equivalent in - the `_opposite_matchers`. - - The values of each matcher key will be searched in the - one returned by the `_opposite_matchers` - - Must be inherited to implement the matchers for one method - - For instance, it can return: - return ('ref', move_line['rec']) - - or - return (('partner_id', move_line['partner_id']), - ('ref', "prefix_%s" % move_line['rec'])) - - All the matchers have to be found in the opposite lines - to consider them as "opposite" - - The matchers will be evaluated in the same order as declared - vs the the opposite matchers, so you can gain performance by - declaring first the partners with the less computation. - - All matchers should match with their opposite to be considered - as "matching". - So with the previous example, partner_id and ref have to be - equals on the opposite line matchers. - - :return: tuple of tuples (key, value) where the keys are - the matchers keys - (must be the same than `_opposite_matchers` returns, - and their values to match in the opposite lines. - A matching key can have multiples values. - """ - return (('partner_id', move_line['partner_id']), - ('ref', move_line['ref'].lower().strip())) - - def _opposite_matchers(self, cr, uid, rec, move_line, context=None): - """ - Return the values of the opposite line used as matchers - so the line is matched - - Must be inherited to implement the matchers for one method - It can be inherited to apply some formatting of fields - (strip(), lower() and so on) - - This method is the counterpart of the `_matchers()` method. - - Each matcher has to yield its value respecting the order - of the `_matchers()`. - - When a matcher does not correspond, the next matchers won't - be evaluated so the ones which need the less computation - have to be executed first. - - If the `_matchers()` returns: - (('partner_id', move_line['partner_id']), - ('ref', move_line['ref'])) - - Here, you should yield : - yield ('partner_id', move_line['partner_id']) - yield ('ref', move_line['ref']) - - Note that a matcher can contain multiple values, as instance, - if for a move line, you want to search from its `ref` in the - `ref` or `name` fields of the opposite move lines, you have to - yield ('partner_id', move_line['partner_id']) - yield ('ref', (move_line['ref'], move_line['name']) - - An OR is used between the values for the same key. - An AND is used between the differents keys. - - :param dict move_line: values of the move_line - :yield: matchers as tuple ('matcher key', value(s)) - """ - yield ('partner_id', move_line['partner_id']) - yield ('ref', ((move_line['ref'] or '').lower().strip(), - move_line['name'].lower().strip())) diff --git a/account_advanced_reconcile/base_advanced_reconciliation.py b/account_advanced_reconcile/base_advanced_reconciliation.py deleted file mode 100644 index 14177f26..00000000 --- a/account_advanced_reconcile/base_advanced_reconciliation.py +++ /dev/null @@ -1,272 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Author: Guewen Baconnier -# Copyright 2012 Camptocamp SA -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from itertools import product -from openerp.osv import orm - - -class easy_reconcile_advanced(orm.AbstractModel): - - _name = 'easy.reconcile.advanced' - _inherit = 'easy.reconcile.base' - - def _query_debit(self, cr, uid, rec, context=None): - """Select all move (debit>0) as candidate. """ - select = self._select(rec) - sql_from = self._from(rec) - where, params = self._where(rec) - where += " AND account_move_line.debit > 0 " - - where2, params2 = self._get_filter(cr, uid, rec, context=context) - - query = ' '.join((select, sql_from, where, where2)) - - cr.execute(query, params + params2) - return cr.dictfetchall() - - def _query_credit(self, cr, uid, rec, context=None): - """Select all move (credit>0) as candidate. """ - select = self._select(rec) - sql_from = self._from(rec) - where, params = self._where(rec) - where += " AND account_move_line.credit > 0 " - - where2, params2 = self._get_filter(cr, uid, rec, context=context) - - query = ' '.join((select, sql_from, where, where2)) - - cr.execute(query, params + params2) - return cr.dictfetchall() - - def _matchers(self, cr, uid, rec, move_line, context=None): - """ - Return the values used as matchers to find the opposite lines - - All the matcher keys in the dict must have their equivalent in - the `_opposite_matchers`. - - The values of each matcher key will be searched in the - one returned by the `_opposite_matchers` - - Must be inherited to implement the matchers for one method - - As instance, it can return: - return ('ref', move_line['rec']) - - or - return (('partner_id', move_line['partner_id']), - ('ref', "prefix_%s" % move_line['rec'])) - - All the matchers have to be found in the opposite lines - to consider them as "opposite" - - The matchers will be evaluated in the same order as declared - vs the the opposite matchers, so you can gain performance by - declaring first the partners with the less computation. - - All matchers should match with their opposite to be considered - as "matching". - So with the previous example, partner_id and ref have to be - equals on the opposite line matchers. - - :return: tuple of tuples (key, value) where the keys are - the matchers keys - (must be the same than `_opposite_matchers` returns, - and their values to match in the opposite lines. - A matching key can have multiples values. - """ - raise NotImplementedError - - def _opposite_matchers(self, cr, uid, rec, move_line, context=None): - """ - Return the values of the opposite line used as matchers - so the line is matched - - Must be inherited to implement the matchers for one method - It can be inherited to apply some formatting of fields - (strip(), lower() and so on) - - This method is the counterpart of the `_matchers()` method. - - Each matcher has to yield its value respecting the order - of the `_matchers()`. - - When a matcher does not correspond, the next matchers won't - be evaluated so the ones which need the less computation - have to be executed first. - - If the `_matchers()` returns: - (('partner_id', move_line['partner_id']), - ('ref', move_line['ref'])) - - Here, you should yield : - yield ('partner_id', move_line['partner_id']) - yield ('ref', move_line['ref']) - - Note that a matcher can contain multiple values, as instance, - if for a move line, you want to search from its `ref` in the - `ref` or `name` fields of the opposite move lines, you have to - yield ('partner_id', move_line['partner_id']) - yield ('ref', (move_line['ref'], move_line['name']) - - An OR is used between the values for the same key. - An AND is used between the differents keys. - - :param dict move_line: values of the move_line - :yield: matchers as tuple ('matcher key', value(s)) - """ - raise NotImplementedError - - @staticmethod - def _compare_values(key, value, opposite_value): - """Can be inherited to modify the equality condition - specifically according to the matcher key (maybe using - a like operator instead of equality on 'ref' as instance) - """ - # consider that empty vals are not valid matchers - # it can still be inherited for some special cases - # where it would be allowed - if not (value and opposite_value): - return False - - if value == opposite_value: - return True - return False - - @staticmethod - def _compare_matcher_values(key, values, opposite_values): - """ Compare every values from a matcher vs an opposite matcher - and return True if it matches - """ - for value, ovalue in product(values, opposite_values): - # we do not need to compare all values, if one matches - # we are done - if easy_reconcile_advanced._compare_values(key, value, ovalue): - return True - return False - - @staticmethod - def _compare_matchers(matcher, opposite_matcher): - """ - Prepare and check the matchers to compare - """ - mkey, mvalue = matcher - omkey, omvalue = opposite_matcher - assert mkey == omkey, ("A matcher %s is compared with a matcher %s, " - " the _matchers and _opposite_matchers are probably wrong" % - (mkey, omkey)) - if not isinstance(mvalue, (list, tuple)): - mvalue = mvalue, - if not isinstance(omvalue, (list, tuple)): - omvalue = omvalue, - return easy_reconcile_advanced._compare_matcher_values(mkey, mvalue, omvalue) - - def _compare_opposite(self, cr, uid, rec, move_line, opposite_move_line, - matchers, context=None): - """ Iterate over the matchers of the move lines vs opposite move lines - and if they all match, return True. - - If all the matchers match for a move line and an opposite move line, - they are candidate for a reconciliation. - """ - opp_matchers = self._opposite_matchers(cr, uid, rec, opposite_move_line, - context=context) - for matcher in matchers: - try: - opp_matcher = opp_matchers.next() - except StopIteration: - # if you fall here, you probably missed to put a `yield` - # in `_opposite_matchers()` - raise ValueError("Missing _opposite_matcher: %s" % matcher[0]) - - if not self._compare_matchers(matcher, opp_matcher): - # if any of the matcher fails, the opposite line - # is not a valid counterpart - # directly returns so the next yield of _opposite_matchers - # are not evaluated - return False - - return True - - def _search_opposites(self, cr, uid, rec, move_line, opposite_move_lines, context=None): - """ - Search the opposite move lines for a move line - - :param dict move_line: the move line for which we search opposites - :param list opposite_move_lines: list of dict of move lines values, the move - lines we want to search for - :return: list of matching lines - """ - matchers = self._matchers(cr, uid, rec, move_line, context=context) - return [op for op in opposite_move_lines if - self._compare_opposite( - cr, uid, rec, move_line, op, matchers, context=context)] - - def _action_rec(self, cr, uid, rec, context=None): - credit_lines = self._query_credit(cr, uid, rec, context=context) - debit_lines = self._query_debit(cr, uid, rec, context=context) - return self._rec_auto_lines_advanced( - cr, uid, rec, credit_lines, debit_lines, context=context) - - def _skip_line(self, cr, uid, rec, move_line, context=None): - """ - When True is returned on some conditions, the credit move line - will be skipped for reconciliation. Can be inherited to - skip on some conditions. ie: ref or partner_id is empty. - """ - return False - - def _rec_auto_lines_advanced(self, cr, uid, rec, credit_lines, debit_lines, context=None): - """ Advanced reconciliation main loop """ - reconciled_ids = [] - partial_reconciled_ids = [] - reconcile_groups = [] - - for credit_line in credit_lines: - if self._skip_line(cr, uid, rec, credit_line, context=context): - continue - - opposite_lines = self._search_opposites( - cr, uid, rec, credit_line, debit_lines, context=context) - - if not opposite_lines: - continue - - opposite_ids = [l['id'] for l in opposite_lines] - line_ids = opposite_ids + [credit_line['id']] - for group in reconcile_groups: - if any([lid in group for lid in opposite_ids]): - group.update(line_ids) - break - else: - reconcile_groups.append(set(line_ids)) - - lines_by_id = dict([(l['id'], l) for l in credit_lines + debit_lines]) - for reconcile_group_ids in reconcile_groups: - group_lines = [lines_by_id[lid] for lid in reconcile_group_ids] - reconciled, full = self._reconcile_lines( - cr, uid, rec, group_lines, allow_partial=True, context=context) - if reconciled and full: - reconciled_ids += reconcile_group_ids - elif reconciled: - partial_reconciled_ids += reconcile_group_ids - - return reconciled_ids, partial_reconciled_ids diff --git a/account_advanced_reconcile/easy_reconcile.py b/account_advanced_reconcile/easy_reconcile.py deleted file mode 100644 index 5506917b..00000000 --- a/account_advanced_reconcile/easy_reconcile.py +++ /dev/null @@ -1,36 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Author: Guewen Baconnier -# Copyright 2012 Camptocamp SA -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv import orm - - -class account_easy_reconcile_method(orm.Model): - - _inherit = 'account.easy.reconcile.method' - - def _get_all_rec_method(self, cr, uid, context=None): - methods = super(account_easy_reconcile_method, self).\ - _get_all_rec_method(cr, uid, context=context) - methods += [ - ('easy.reconcile.advanced.ref', - 'Advanced. Partner and Ref.'), - ] - return methods diff --git a/account_advanced_reconcile/easy_reconcile_view.xml b/account_advanced_reconcile/easy_reconcile_view.xml deleted file mode 100644 index 7d35927d..00000000 --- a/account_advanced_reconcile/easy_reconcile_view.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - account.easy.reconcile.form - account.easy.reconcile - - - - - - - - - - - diff --git a/account_advanced_reconcile/i18n/account_advanced_reconcile.pot b/account_advanced_reconcile/i18n/account_advanced_reconcile.pot deleted file mode 100644 index 98382751..00000000 --- a/account_advanced_reconcile/i18n/account_advanced_reconcile.pot +++ /dev/null @@ -1,90 +0,0 @@ -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# * account_advanced_reconcile -# -msgid "" -msgstr "" -"Project-Id-Version: OpenERP Server 7.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-21 11:54+0000\n" -"PO-Revision-Date: 2014-01-21 11:54+0000\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_advanced_reconcile -#: field:easy.reconcile.advanced,partner_ids:0 -#: field:easy.reconcile.advanced.ref,partner_ids:0 -msgid "Restrict on partners" -msgstr "" - -#. module: account_advanced_reconcile -#: field:easy.reconcile.advanced,account_id:0 -#: field:easy.reconcile.advanced.ref,account_id:0 -msgid "Account" -msgstr "" - -#. module: account_advanced_reconcile -#: model:ir.model,name:account_advanced_reconcile.model_account_easy_reconcile_method -msgid "reconcile method for account_easy_reconcile" -msgstr "" - -#. module: account_advanced_reconcile -#: field:easy.reconcile.advanced,journal_id:0 -#: field:easy.reconcile.advanced.ref,journal_id:0 -msgid "Journal" -msgstr "" - -#. module: account_advanced_reconcile -#: field:easy.reconcile.advanced,account_profit_id:0 -#: field:easy.reconcile.advanced.ref,account_profit_id:0 -msgid "Account Profit" -msgstr "" - -#. module: account_advanced_reconcile -#: view:account.easy.reconcile:0 -msgid "Match multiple debit vs multiple credit entries. Allow partial reconciliation. The lines should have the partner, the credit entry ref. is matched vs the debit entry ref. or name." -msgstr "" - -#. module: account_advanced_reconcile -#: field:easy.reconcile.advanced,filter:0 -#: field:easy.reconcile.advanced.ref,filter:0 -msgid "Filter" -msgstr "" - -#. module: account_advanced_reconcile -#: view:account.easy.reconcile:0 -msgid "Advanced. Partner and Ref" -msgstr "" - -#. module: account_advanced_reconcile -#: field:easy.reconcile.advanced,date_base_on:0 -#: field:easy.reconcile.advanced.ref,date_base_on:0 -msgid "Date of reconciliation" -msgstr "" - -#. module: account_advanced_reconcile -#: model:ir.model,name:account_advanced_reconcile.model_easy_reconcile_advanced -msgid "easy.reconcile.advanced" -msgstr "" - -#. module: account_advanced_reconcile -#: field:easy.reconcile.advanced,account_lost_id:0 -#: field:easy.reconcile.advanced.ref,account_lost_id:0 -msgid "Account Lost" -msgstr "" - -#. module: account_advanced_reconcile -#: model:ir.model,name:account_advanced_reconcile.model_easy_reconcile_advanced_ref -msgid "easy.reconcile.advanced.ref" -msgstr "" - -#. module: account_advanced_reconcile -#: field:easy.reconcile.advanced,write_off:0 -#: field:easy.reconcile.advanced.ref,write_off:0 -msgid "Write off allowed" -msgstr "" - diff --git a/account_advanced_reconcile/i18n/es.po b/account_advanced_reconcile/i18n/es.po deleted file mode 100644 index cc47462f..00000000 --- a/account_advanced_reconcile/i18n/es.po +++ /dev/null @@ -1,98 +0,0 @@ -# Spanish translation for banking-addons -# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 -# This file is distributed under the same license as the banking-addons package. -# FIRST AUTHOR , 2014. -# -msgid "" -msgstr "" -"Project-Id-Version: banking-addons\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2014-01-21 11:54+0000\n" -"PO-Revision-Date: 2014-06-05 22:30+0000\n" -"Last-Translator: Pedro Manuel Baeza \n" -"Language-Team: Spanish \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-06-06 06:36+0000\n" -"X-Generator: Launchpad (build 17031)\n" - -#. module: account_advanced_reconcile -#: field:easy.reconcile.advanced,partner_ids:0 -#: field:easy.reconcile.advanced.ref,partner_ids:0 -msgid "Restrict on partners" -msgstr "Restringir a las empresas" - -#. module: account_advanced_reconcile -#: field:easy.reconcile.advanced,account_id:0 -#: field:easy.reconcile.advanced.ref,account_id:0 -msgid "Account" -msgstr "Cuenta" - -#. module: account_advanced_reconcile -#: model:ir.model,name:account_advanced_reconcile.model_account_easy_reconcile_method -msgid "reconcile method for account_easy_reconcile" -msgstr "método de conciliación para account_easy_reconcile" - -#. module: account_advanced_reconcile -#: field:easy.reconcile.advanced,journal_id:0 -#: field:easy.reconcile.advanced.ref,journal_id:0 -msgid "Journal" -msgstr "Diario" - -#. module: account_advanced_reconcile -#: field:easy.reconcile.advanced,account_profit_id:0 -#: field:easy.reconcile.advanced.ref,account_profit_id:0 -msgid "Account Profit" -msgstr "Cuenta de ganancias" - -#. module: account_advanced_reconcile -#: view:account.easy.reconcile:0 -msgid "" -"Match multiple debit vs multiple credit entries. Allow partial " -"reconciliation. The lines should have the partner, the credit entry ref. is " -"matched vs the debit entry ref. or name." -msgstr "" -"Casa múltiples líneas del debe con múltiples líneas del haber. Permite " -"conciliación parcial. Las líneas deben tener la empresa, la referencia de la " -"línea del haber se casa contra la referencia de la línea del debe o el " -"nombre." - -#. module: account_advanced_reconcile -#: field:easy.reconcile.advanced,filter:0 -#: field:easy.reconcile.advanced.ref,filter:0 -msgid "Filter" -msgstr "Filtro" - -#. module: account_advanced_reconcile -#: view:account.easy.reconcile:0 -msgid "Advanced. Partner and Ref" -msgstr "Avanzado. Empresa y referencia" - -#. module: account_advanced_reconcile -#: field:easy.reconcile.advanced,date_base_on:0 -#: field:easy.reconcile.advanced.ref,date_base_on:0 -msgid "Date of reconciliation" -msgstr "Fecha de conciliación" - -#. module: account_advanced_reconcile -#: model:ir.model,name:account_advanced_reconcile.model_easy_reconcile_advanced -msgid "easy.reconcile.advanced" -msgstr "easy.reconcile.advanced" - -#. module: account_advanced_reconcile -#: field:easy.reconcile.advanced,account_lost_id:0 -#: field:easy.reconcile.advanced.ref,account_lost_id:0 -msgid "Account Lost" -msgstr "Cuenta de pérdidas" - -#. module: account_advanced_reconcile -#: model:ir.model,name:account_advanced_reconcile.model_easy_reconcile_advanced_ref -msgid "easy.reconcile.advanced.ref" -msgstr "easy.reconcile.advanced.ref" - -#. module: account_advanced_reconcile -#: field:easy.reconcile.advanced,write_off:0 -#: field:easy.reconcile.advanced.ref,write_off:0 -msgid "Write off allowed" -msgstr "Desajuste permitido" diff --git a/account_advanced_reconcile/i18n/fr.po b/account_advanced_reconcile/i18n/fr.po deleted file mode 100644 index 0c3e9eb9..00000000 --- a/account_advanced_reconcile/i18n/fr.po +++ /dev/null @@ -1,98 +0,0 @@ -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# * account_advanced_reconcile -# -msgid "" -msgstr "" -"Project-Id-Version: OpenERP Server 6.1\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-21 11:54+0000\n" -"PO-Revision-Date: 2014-03-21 15:24+0000\n" -"Last-Translator: Guewen Baconnier @ Camptocamp \n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-05-22 06:49+0000\n" -"X-Generator: Launchpad (build 17017)\n" -"Language: \n" - -#. module: account_advanced_reconcile -#: field:easy.reconcile.advanced,partner_ids:0 -#: field:easy.reconcile.advanced.ref,partner_ids:0 -msgid "Restrict on partners" -msgstr "Restriction sur les partenaires" - -#. module: account_advanced_reconcile -#: field:easy.reconcile.advanced,account_id:0 -#: field:easy.reconcile.advanced.ref,account_id:0 -msgid "Account" -msgstr "Compte" - -#. module: account_advanced_reconcile -#: model:ir.model,name:account_advanced_reconcile.model_account_easy_reconcile_method -msgid "reconcile method for account_easy_reconcile" -msgstr "Méthode de lettrage pour le module account_easy_reconcile" - -#. module: account_advanced_reconcile -#: field:easy.reconcile.advanced,journal_id:0 -#: field:easy.reconcile.advanced.ref,journal_id:0 -msgid "Journal" -msgstr "Journal" - -#. module: account_advanced_reconcile -#: field:easy.reconcile.advanced,account_profit_id:0 -#: field:easy.reconcile.advanced.ref,account_profit_id:0 -msgid "Account Profit" -msgstr "Compte de produit" - -#. module: account_advanced_reconcile -#: view:account.easy.reconcile:0 -msgid "" -"Match multiple debit vs multiple credit entries. Allow partial " -"reconciliation. The lines should have the partner, the credit entry ref. is " -"matched vs the debit entry ref. or name." -msgstr "" -"Le Lettrage peut s'effectuer sur plusieurs écritures de débit et crédit. Le " -"Lettrage partiel est autorisé. Les écritures doivent avoir le même " -"partenaire et la référence sur les écritures de crédit doit se retrouver " -"dans la référence ou la description sur les écritures de débit." - -#. module: account_advanced_reconcile -#: field:easy.reconcile.advanced,filter:0 -#: field:easy.reconcile.advanced.ref,filter:0 -msgid "Filter" -msgstr "Filtre" - -#. module: account_advanced_reconcile -#: view:account.easy.reconcile:0 -msgid "Advanced. Partner and Ref" -msgstr "Avancé. Partenaire et Réf." - -#. module: account_advanced_reconcile -#: field:easy.reconcile.advanced,date_base_on:0 -#: field:easy.reconcile.advanced.ref,date_base_on:0 -msgid "Date of reconciliation" -msgstr "Date de lettrage" - -#. module: account_advanced_reconcile -#: model:ir.model,name:account_advanced_reconcile.model_easy_reconcile_advanced -msgid "easy.reconcile.advanced" -msgstr "easy.reconcile.advanced" - -#. module: account_advanced_reconcile -#: field:easy.reconcile.advanced,account_lost_id:0 -#: field:easy.reconcile.advanced.ref,account_lost_id:0 -msgid "Account Lost" -msgstr "Compte de charge" - -#. module: account_advanced_reconcile -#: model:ir.model,name:account_advanced_reconcile.model_easy_reconcile_advanced_ref -msgid "easy.reconcile.advanced.ref" -msgstr "easy.reconcile.advanced.ref" - -#. module: account_advanced_reconcile -#: field:easy.reconcile.advanced,write_off:0 -#: field:easy.reconcile.advanced.ref,write_off:0 -msgid "Write off allowed" -msgstr "Écart autorisé" diff --git a/account_easy_reconcile/__init__.py b/account_easy_reconcile/__init__.py deleted file mode 100755 index b648751f..00000000 --- a/account_easy_reconcile/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Copyright 2012 Camptocamp SA (Guewen Baconnier) -# Copyright (C) 2010 Sébastien Beau -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -import easy_reconcile -import base_reconciliation -import simple_reconciliation -import easy_reconcile_history diff --git a/account_easy_reconcile/__openerp__.py b/account_easy_reconcile/__openerp__.py deleted file mode 100755 index a3f22d54..00000000 --- a/account_easy_reconcile/__openerp__.py +++ /dev/null @@ -1,66 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Copyright 2012 Camptocamp SA (Guewen Baconnier) -# Copyright (C) 2010 Sébastien Beau -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -{ - "name": "Easy Reconcile", - "version": "1.3.0", - "depends": ["account"], - "author": "Akretion,Camptocamp", - "description": """ -Easy Reconcile -============== - -This is a shared work between Akretion and Camptocamp -in order to provide: - - reconciliation facilities for big volume of transactions - - setup different profiles of reconciliation by account - - each profile can use many methods of reconciliation - - this module is also a base to create others - reconciliation methods which can plug in the profiles - - a profile a reconciliation can be run manually - or by a cron - - monitoring of reconciliation runs with an history - which keep track of the reconciled Journal items - -2 simple reconciliation methods are integrated -in this module, the simple reconciliations works -on 2 lines (1 debit / 1 credit) and do not allow -partial reconcilation, they also match on 1 key, -partner or Journal item name. - -You may be interested to install also the -``account_advanced_reconciliation`` module. -This latter add more complex reconciliations, -allows multiple lines and partial. - -""", - "website": "http://www.akretion.com/", - "category": "Finance", - "demo_xml": [], - "data": ["easy_reconcile.xml", - "easy_reconcile_history_view.xml", - "security/ir_rule.xml", - "security/ir.model.access.csv"], - 'license': 'AGPL-3', - "auto_install": False, - "installable": True, - -} diff --git a/account_easy_reconcile/base_reconciliation.py b/account_easy_reconcile/base_reconciliation.py deleted file mode 100644 index b50c06b9..00000000 --- a/account_easy_reconcile/base_reconciliation.py +++ /dev/null @@ -1,208 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Copyright 2012-2013 Camptocamp SA (Guewen Baconnier) -# Copyright (C) 2010 Sébastien Beau -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv import fields, orm -from operator import itemgetter, attrgetter - - -class easy_reconcile_base(orm.AbstractModel): - """Abstract Model for reconciliation methods""" - - _name = 'easy.reconcile.base' - - _inherit = 'easy.reconcile.options' - - _columns = { - 'account_id': fields.many2one( - 'account.account', 'Account', required=True), - 'partner_ids': fields.many2many( - 'res.partner', string="Restrict on partners"), - # other columns are inherited from easy.reconcile.options - } - - def automatic_reconcile(self, cr, uid, ids, context=None): - """ Reconciliation method called from the view. - - :return: list of reconciled ids, list of partially reconciled items - """ - if isinstance(ids, (int, long)): - ids = [ids] - assert len(ids) == 1, "Has to be called on one id" - rec = self.browse(cr, uid, ids[0], context=context) - return self._action_rec(cr, uid, rec, context=context) - - def _action_rec(self, cr, uid, rec, context=None): - """ Must be inherited to implement the reconciliation - - :return: list of reconciled ids - """ - raise NotImplementedError - - def _base_columns(self, rec): - """ Mandatory columns for move lines queries - An extra column aliased as ``key`` should be defined - in each query.""" - aml_cols = ( - 'id', - 'debit', - 'credit', - 'date', - 'period_id', - 'ref', - 'name', - 'partner_id', - 'account_id', - 'move_id') - return ["account_move_line.%s" % col for col in aml_cols] - - def _select(self, rec, *args, **kwargs): - return "SELECT %s" % ', '.join(self._base_columns(rec)) - - def _from(self, rec, *args, **kwargs): - return "FROM account_move_line" - - def _where(self, rec, *args, **kwargs): - where = ("WHERE account_move_line.account_id = %s " - "AND account_move_line.reconcile_id IS NULL ") - # it would be great to use dict for params - # but as we use _where_calc in _get_filter - # which returns a list, we have to - # accomodate with that - params = [rec.account_id.id] - - if rec.partner_ids: - where += " AND account_move_line.partner_id IN %s" - params.append(tuple([l.id for l in rec.partner_ids])) - return where, params - - def _get_filter(self, cr, uid, rec, context): - ml_obj = self.pool.get('account.move.line') - where = '' - params = [] - if rec.filter: - dummy, where, params = ml_obj._where_calc( - cr, uid, eval(rec.filter), context=context).get_sql() - if where: - where = " AND %s" % where - return where, params - - def _below_writeoff_limit(self, cr, uid, rec, lines, - writeoff_limit, context=None): - precision = self.pool.get('decimal.precision').precision_get( - cr, uid, 'Account') - keys = ('debit', 'credit') - sums = reduce( - lambda line, memo: - dict((key, value + memo[key]) - for key, value - in line.iteritems() - if key in keys), lines) - - debit, credit = sums['debit'], sums['credit'] - writeoff_amount = round(debit - credit, precision) - return bool(writeoff_limit >= abs(writeoff_amount)), debit, credit - - def _get_rec_date(self, cr, uid, rec, lines, - based_on='end_period_last_credit', context=None): - period_obj = self.pool.get('account.period') - - def last_period(mlines): - period_ids = [ml['period_id'] for ml in mlines] - periods = period_obj.browse( - cr, uid, period_ids, context=context) - return max(periods, key=attrgetter('date_stop')) - - def last_date(mlines): - return max(mlines, key=itemgetter('date')) - - def credit(mlines): - return [l for l in mlines if l['credit'] > 0] - - def debit(mlines): - return [l for l in mlines if l['debit'] > 0] - - if based_on == 'end_period_last_credit': - return last_period(credit(lines)).date_stop - if based_on == 'end_period': - return last_period(lines).date_stop - elif based_on == 'newest': - return last_date(lines)['date'] - elif based_on == 'newest_credit': - return last_date(credit(lines))['date'] - elif based_on == 'newest_debit': - return last_date(debit(lines))['date'] - # reconcilation date will be today - # when date is None - return None - - def _reconcile_lines(self, cr, uid, rec, lines, allow_partial=False, context=None): - """ Try to reconcile given lines - - :param list lines: list of dict of move lines, they must at least - contain values for : id, debit, credit - :param boolean allow_partial: if True, partial reconciliation will be - created, otherwise only Full - reconciliation will be created - :return: tuple of boolean values, first item is wether the items - have been reconciled or not, - the second is wether the reconciliation is full (True) - or partial (False) - """ - if context is None: - context = {} - - ml_obj = self.pool.get('account.move.line') - writeoff = rec.write_off - - line_ids = [l['id'] for l in lines] - below_writeoff, sum_debit, sum_credit = self._below_writeoff_limit( - cr, uid, rec, lines, writeoff, context=context) - date = self._get_rec_date( - cr, uid, rec, lines, rec.date_base_on, context=context) - - rec_ctx = dict(context, date_p=date) - if below_writeoff: - if sum_credit < sum_debit: - writeoff_account_id = rec.account_profit_id.id - else: - writeoff_account_id = rec.account_lost_id.id - - period_id = self.pool.get('account.period').find( - cr, uid, dt=date, context=context)[0] - - ml_obj.reconcile( - cr, uid, - line_ids, - type='auto', - writeoff_acc_id=writeoff_account_id, - writeoff_period_id=period_id, - writeoff_journal_id=rec.journal_id.id, - context=rec_ctx) - return True, True - elif allow_partial: - ml_obj.reconcile_partial( - cr, uid, - line_ids, - type='manual', - context=rec_ctx) - return True, False - - return False, False diff --git a/account_easy_reconcile/easy_reconcile.py b/account_easy_reconcile/easy_reconcile.py deleted file mode 100644 index 6a2c2273..00000000 --- a/account_easy_reconcile/easy_reconcile.py +++ /dev/null @@ -1,345 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Copyright 2012-2013 Camptocamp SA (Guewen Baconnier) -# Copyright (C) 2010 Sébastien Beau -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv import fields, osv, orm -from openerp.tools.translate import _ -from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT -from openerp.tools.translate import _ - - -class easy_reconcile_options(orm.AbstractModel): - """Options of a reconciliation profile - - Columns shared by the configuration of methods - and by the reconciliation wizards. - This allows decoupling of the methods and the - wizards and allows to launch the wizards alone - """ - - _name = 'easy.reconcile.options' - - def _get_rec_base_date(self, cr, uid, context=None): - return [('end_period_last_credit', 'End of period of most recent credit'), - ('newest', 'Most recent move line'), - ('actual', 'Today'), - ('end_period', 'End of period of most recent move line'), - ('newest_credit', 'Date of most recent credit'), - ('newest_debit', 'Date of most recent debit')] - - _columns = { - 'write_off': fields.float('Write off allowed'), - 'account_lost_id': fields.many2one( - 'account.account', 'Account Lost'), - 'account_profit_id': fields.many2one( - 'account.account', 'Account Profit'), - 'journal_id': fields.many2one( - 'account.journal', 'Journal'), - 'date_base_on': fields.selection( - _get_rec_base_date, - required=True, - string='Date of reconciliation'), - 'filter': fields.char('Filter', size=128), - } - - _defaults = { - 'write_off': 0., - 'date_base_on': 'end_period_last_credit', - } - - -class account_easy_reconcile_method(orm.Model): - - _name = 'account.easy.reconcile.method' - _description = 'reconcile method for account_easy_reconcile' - - _inherit = 'easy.reconcile.options' - - _order = 'sequence' - - def _get_all_rec_method(self, cr, uid, context=None): - return [ - ('easy.reconcile.simple.name', 'Simple. Amount and Name'), - ('easy.reconcile.simple.partner', 'Simple. Amount and Partner'), - ('easy.reconcile.simple.reference', 'Simple. Amount and Reference'), - ] - - def _get_rec_method(self, cr, uid, context=None): - return self._get_all_rec_method(cr, uid, context=None) - - _columns = { - 'name': fields.selection( - _get_rec_method, 'Type', required=True), - 'sequence': fields.integer( - 'Sequence', - required=True, - help="The sequence field is used to order " - "the reconcile method"), - 'task_id': fields.many2one( - 'account.easy.reconcile', - string='Task', - required=True, - ondelete='cascade'), - 'company_id': fields.related('task_id','company_id', - relation='res.company', - type='many2one', - string='Company', - store=True, - readonly=True), - } - - _defaults = { - 'sequence': 1, - } - - def init(self, cr): - """ Migration stuff - - Name is not anymore methods names but the name - of the model which does the reconciliation - """ - cr.execute(""" - UPDATE account_easy_reconcile_method - SET name = 'easy.reconcile.simple.partner' - WHERE name = 'action_rec_auto_partner' - """) - cr.execute(""" - UPDATE account_easy_reconcile_method - SET name = 'easy.reconcile.simple.name' - WHERE name = 'action_rec_auto_name' - """) - - -class account_easy_reconcile(orm.Model): - - _name = 'account.easy.reconcile' - _description = 'account easy reconcile' - - def _get_total_unrec(self, cr, uid, ids, name, arg, context=None): - obj_move_line = self.pool.get('account.move.line') - res = {} - for task in self.browse(cr, uid, ids, context=context): - res[task.id] = len(obj_move_line.search( - cr, uid, - [('account_id', '=', task.account.id), - ('reconcile_id', '=', False), - ('reconcile_partial_id', '=', False)], - context=context)) - return res - - def _get_partial_rec(self, cr, uid, ids, name, arg, context=None): - obj_move_line = self.pool.get('account.move.line') - res = {} - for task in self.browse(cr, uid, ids, context=context): - res[task.id] = len(obj_move_line.search( - cr, uid, - [('account_id', '=', task.account.id), - ('reconcile_id', '=', False), - ('reconcile_partial_id', '!=', False)], - context=context)) - return res - - def _last_history(self, cr, uid, ids, name, args, context=None): - result = {} - for history in self.browse(cr, uid, ids, context=context): - result[history.id] = False - if history.history_ids: - # history is sorted by date desc - result[history.id] = history.history_ids[0].id - return result - - _columns = { - 'name': fields.char('Name', required=True), - 'account': fields.many2one( - 'account.account', 'Account', required=True), - 'reconcile_method': fields.one2many( - 'account.easy.reconcile.method', 'task_id', 'Method'), - 'unreconciled_count': fields.function( - _get_total_unrec, type='integer', string='Unreconciled Items'), - 'reconciled_partial_count': fields.function( - _get_partial_rec, - type='integer', - string='Partially Reconciled Items'), - 'history_ids': fields.one2many( - 'easy.reconcile.history', - 'easy_reconcile_id', - string='History', - readonly=True), - 'last_history': - fields.function( - _last_history, - string='Last History', - type='many2one', - relation='easy.reconcile.history', - readonly=True), - 'company_id': fields.many2one('res.company', 'Company'), - } - - def copy_data(self, cr, uid, id, default=None, context=None): - if default is None: - default = {} - default = dict(default, rec_log=False) - return super(account_easy_reconcile, self).copy_data( - cr, uid, id, default=default, context=context) - - def _prepare_run_transient(self, cr, uid, rec_method, context=None): - return {'account_id': rec_method.task_id.account.id, - 'write_off': rec_method.write_off, - 'account_lost_id': (rec_method.account_lost_id and - rec_method.account_lost_id.id), - 'account_profit_id': (rec_method.account_profit_id and - rec_method.account_profit_id.id), - 'journal_id': (rec_method.journal_id and - rec_method.journal_id.id), - 'date_base_on': rec_method.date_base_on, - 'filter': rec_method.filter} - - def run_reconcile(self, cr, uid, ids, context=None): - def find_reconcile_ids(fieldname, move_line_ids): - if not move_line_ids: - return [] - sql = ("SELECT DISTINCT " + fieldname + - " FROM account_move_line " - " WHERE id in %s " - " AND " + fieldname + " IS NOT NULL") - cr.execute(sql, (tuple(move_line_ids),)) - res = cr.fetchall() - return [row[0] for row in res] - - for rec in self.browse(cr, uid, ids, context=context): - all_ml_rec_ids = [] - all_ml_partial_ids = [] - - for method in rec.reconcile_method: - rec_model = self.pool.get(method.name) - auto_rec_id = rec_model.create( - cr, uid, - self._prepare_run_transient( - cr, uid, method, context=context), - context=context) - - ml_rec_ids, ml_partial_ids = rec_model.automatic_reconcile( - cr, uid, auto_rec_id, context=context) - - all_ml_rec_ids += ml_rec_ids - all_ml_partial_ids += ml_partial_ids - - reconcile_ids = find_reconcile_ids( - 'reconcile_id', all_ml_rec_ids) - partial_ids = find_reconcile_ids( - 'reconcile_partial_id', all_ml_partial_ids) - - self.pool.get('easy.reconcile.history').create( - cr, - uid, - {'easy_reconcile_id': rec.id, - 'date': fields.datetime.now(), - 'reconcile_ids': [(4, rid) for rid in reconcile_ids], - 'reconcile_partial_ids': [(4, rid) for rid in partial_ids]}, - context=context) - return True - - def _no_history(self, cr, uid, rec, context=None): - """ Raise an `osv.except_osv` error, supposed to - be called when there is no history on the reconciliation - task. - """ - raise osv.except_osv( - _('Error'), - _('There is no history of reconciled ' - 'items on the task: %s.') % rec.name) - - def _open_move_line_list(sefl, cr, uid, move_line_ids, name, context=None): - return { - 'name': name, - 'view_mode': 'tree,form', - 'view_id': False, - 'view_type': 'form', - 'res_model': 'account.move.line', - 'type': 'ir.actions.act_window', - 'nodestroy': True, - 'target': 'current', - 'domain': unicode([('id', 'in', move_line_ids)]), - } - - def open_unreconcile(self, cr, uid, ids, context=None): - """ Open the view of move line with the unreconciled move lines - """ - - assert len(ids) == 1 , \ - "You can only open entries from one profile at a time" - - obj_move_line = self.pool.get('account.move.line') - res = {} - for task in self.browse(cr, uid, ids, context=context): - line_ids = obj_move_line.search( - cr, uid, - [('account_id', '=', task.account.id), - ('reconcile_id', '=', False), - ('reconcile_partial_id', '=', False)], - context=context) - - name = _('Unreconciled items') - return self._open_move_line_list(cr, uid, line_ids, name, context=context) - - def open_partial_reconcile(self, cr, uid, ids, context=None): - """ Open the view of move line with the unreconciled move lines - """ - - assert len(ids) == 1 , \ - "You can only open entries from one profile at a time" - - obj_move_line = self.pool.get('account.move.line') - res = {} - for task in self.browse(cr, uid, ids, context=context): - line_ids = obj_move_line.search( - cr, uid, - [('account_id', '=', task.account.id), - ('reconcile_id', '=', False), - ('reconcile_partial_id', '!=', False)], - context=context) - name = _('Partial reconciled items') - return self._open_move_line_list(cr, uid, line_ids, name, context=context) - - def last_history_reconcile(self, cr, uid, rec_id, context=None): - """ Get the last history record for this reconciliation profile - and return the action which opens move lines reconciled - """ - if isinstance(rec_id, (tuple, list)): - assert len(rec_id) == 1, \ - "Only 1 id expected" - rec_id = rec_id[0] - rec = self.browse(cr, uid, rec_id, context=context) - if not rec.last_history: - self._no_history(cr, uid, rec, context=context) - return rec.last_history.open_reconcile() - - def last_history_partial(self, cr, uid, rec_id, context=None): - """ Get the last history record for this reconciliation profile - and return the action which opens move lines reconciled - """ - if isinstance(rec_id, (tuple, list)): - assert len(rec_id) == 1, \ - "Only 1 id expected" - rec_id = rec_id[0] - rec = self.browse(cr, uid, rec_id, context=context) - if not rec.last_history: - self._no_history(cr, uid, rec, context=context) - return rec.last_history.open_partial() diff --git a/account_easy_reconcile/easy_reconcile.xml b/account_easy_reconcile/easy_reconcile.xml deleted file mode 100644 index 00771b73..00000000 --- a/account_easy_reconcile/easy_reconcile.xml +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - account.easy.reconcile.form - 20 - account.easy.reconcile - -
-
-
- - - - - - - - - - - -