mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[MIGR] migration of the modules account_easy_reconcile and account_advanced_reconcile to version 7.0
This commit is contained in:
@@ -30,8 +30,6 @@
|
||||
'description': """
|
||||
Advanced reconciliation methods for the module account_easy_reconcile.
|
||||
|
||||
account_easy_reconcile, which is a dependency, is available in the branch: lp:account-extra-addons
|
||||
|
||||
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
|
||||
@@ -39,31 +37,31 @@ In addition to the features implemented in account_easy_reconcile, which are:
|
||||
- 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 a few logs
|
||||
- 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 entries if the partner and the ref are equal
|
||||
- Reconcile entries if the partner is equal and the ref is the same than ref
|
||||
or name
|
||||
- Reconcile entries if the partner is equal and the ref match with a pattern
|
||||
- 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 entries:
|
||||
* Partner
|
||||
* Ref on credit move lines should be case insensitive equals to the ref or
|
||||
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,
|
||||
@@ -75,9 +73,7 @@ many offices.
|
||||
|
||||
""",
|
||||
'website': 'http://www.camptocamp.com',
|
||||
'init_xml': [],
|
||||
'update_xml': ['easy_reconcile_view.xml'],
|
||||
'demo_xml': [],
|
||||
'data': ['easy_reconcile_view.xml'],
|
||||
'test': [],
|
||||
'images': [],
|
||||
'installable': True,
|
||||
|
||||
@@ -19,14 +19,13 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp.osv.orm import TransientModel
|
||||
from openerp.osv import orm
|
||||
|
||||
|
||||
class easy_reconcile_advanced_ref(TransientModel):
|
||||
class easy_reconcile_advanced_ref(orm.TransientModel):
|
||||
|
||||
_name = 'easy.reconcile.advanced.ref'
|
||||
_inherit = 'easy.reconcile.advanced'
|
||||
_auto = True # False when inherited from AbstractModel
|
||||
|
||||
def _skip_line(self, cr, uid, rec, move_line, context=None):
|
||||
"""
|
||||
|
||||
@@ -19,21 +19,17 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from itertools import groupby, product
|
||||
from operator import itemgetter
|
||||
from openerp.osv.orm import Model, AbstractModel, TransientModel
|
||||
from openerp.osv import fields, osv
|
||||
from itertools import product
|
||||
from openerp.osv import orm
|
||||
|
||||
|
||||
class easy_reconcile_advanced(AbstractModel):
|
||||
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. Optional choice on invoice
|
||||
will filter with an inner join on the related moves.
|
||||
"""
|
||||
"""Select all move (debit>0) as candidate. """
|
||||
select = self._select(rec)
|
||||
sql_from = self._from(rec)
|
||||
where, params = self._where(rec)
|
||||
@@ -47,9 +43,7 @@ class easy_reconcile_advanced(AbstractModel):
|
||||
return cr.dictfetchall()
|
||||
|
||||
def _query_credit(self, cr, uid, rec, context=None):
|
||||
"""Select all move (credit>0) as candidate. Optional choice on invoice
|
||||
will filter with an inner join on the related moves.
|
||||
"""
|
||||
"""Select all move (credit>0) as candidate. """
|
||||
select = self._select(rec)
|
||||
sql_from = self._from(rec)
|
||||
where, params = self._where(rec)
|
||||
@@ -176,9 +170,9 @@ class easy_reconcile_advanced(AbstractModel):
|
||||
"""
|
||||
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)
|
||||
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)):
|
||||
@@ -186,7 +180,13 @@ class easy_reconcile_advanced(AbstractModel):
|
||||
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):
|
||||
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:
|
||||
@@ -216,14 +216,15 @@ class easy_reconcile_advanced(AbstractModel):
|
||||
: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)]
|
||||
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)
|
||||
cr, uid, rec, credit_lines, debit_lines, context=context)
|
||||
|
||||
def _skip_line(self, cr, uid, rec, move_line, context=None):
|
||||
"""
|
||||
@@ -234,9 +235,7 @@ class easy_reconcile_advanced(AbstractModel):
|
||||
return False
|
||||
|
||||
def _rec_auto_lines_advanced(self, cr, uid, rec, credit_lines, debit_lines, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
""" Advanced reconciliation main loop """
|
||||
reconciled_ids = []
|
||||
partial_reconciled_ids = []
|
||||
reconcile_groups = []
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp.osv.orm import Model
|
||||
from openerp.osv import orm
|
||||
|
||||
|
||||
class account_easy_reconcile_method(Model):
|
||||
class account_easy_reconcile_method(orm.Model):
|
||||
|
||||
_inherit = 'account.easy.reconcile.method'
|
||||
|
||||
@@ -31,6 +31,6 @@ class account_easy_reconcile_method(Model):
|
||||
_get_all_rec_method(cr, uid, context=context)
|
||||
methods += [
|
||||
('easy.reconcile.advanced.ref',
|
||||
'Advanced. Partner and Ref.'),
|
||||
'Advanced. Partner and Ref.'),
|
||||
]
|
||||
return methods
|
||||
|
||||
@@ -4,13 +4,12 @@
|
||||
<record id="view_easy_reconcile_form" model="ir.ui.view">
|
||||
<field name="name">account.easy.reconcile.form</field>
|
||||
<field name="model">account.easy.reconcile</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="account_easy_reconcile.account_easy_reconcile_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<page name="information" position="inside">
|
||||
<group colspan="2" col="2">
|
||||
<separator colspan="4" string="Advanced. Partner and Ref"/>
|
||||
<label string="Match multiple debit vs multiple credit entries. Allow partial reconcilation.
|
||||
<label string="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." colspan="4"/>
|
||||
</group>
|
||||
</page>
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_advanced_reconcile
|
||||
# * account_advanced_reconcile
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 6.1\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2012-11-07 12:34+0000\n"
|
||||
"PO-Revision-Date: 2012-11-07 12:34+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"POT-Creation-Date: 2013-01-04 08:25+0000\n"
|
||||
"PO-Revision-Date: 2013-01-04 09:27+0100\n"
|
||||
"Last-Translator: Guewen Baconnier <guewen.baconnier@camptocamp.com>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: account_advanced_reconcile
|
||||
@@ -32,12 +33,6 @@ msgstr "Compte"
|
||||
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,date_base_on:0
|
||||
#: field:easy.reconcile.advanced.ref,date_base_on:0
|
||||
msgid "Date of reconcilation"
|
||||
msgstr "Date de lettrage"
|
||||
|
||||
#. module: account_advanced_reconcile
|
||||
#: field:easy.reconcile.advanced,journal_id:0
|
||||
#: field:easy.reconcile.advanced.ref,journal_id:0
|
||||
@@ -50,6 +45,11 @@ msgstr "Journal"
|
||||
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
|
||||
@@ -62,9 +62,10 @@ msgid "Advanced. Partner and Ref"
|
||||
msgstr "Avancé. Partenaire et Réf."
|
||||
|
||||
#. module: account_advanced_reconcile
|
||||
#: view:account.easy.reconcile:0
|
||||
msgid "Match multiple debit vs multiple credit entries. Allow partial reconcilation. 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."
|
||||
#: 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
|
||||
|
||||
@@ -20,11 +20,11 @@
|
||||
##############################################################################
|
||||
|
||||
{
|
||||
"name" : "Easy Reconcile",
|
||||
"version" : "1.1",
|
||||
"depends" : ["account",
|
||||
"name": "Easy Reconcile",
|
||||
"version": "1.1",
|
||||
"depends": ["account",
|
||||
],
|
||||
"author" : "Akretion,Camptocamp",
|
||||
"author": "Akretion,Camptocamp",
|
||||
"description": """
|
||||
Easy Reconcile
|
||||
==============
|
||||
@@ -39,13 +39,13 @@ in order to provide:
|
||||
- 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 entries
|
||||
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 entry name.
|
||||
partner or Journal item name.
|
||||
|
||||
You may be interested to install also the
|
||||
``account_advanced_reconciliation`` module.
|
||||
@@ -53,11 +53,11 @@ This latter add more complex reconciliations,
|
||||
allows multiple lines and partial.
|
||||
|
||||
""",
|
||||
"website" : "http://www.akretion.com/",
|
||||
"category" : "Finance",
|
||||
"init_xml" : [],
|
||||
"demo_xml" : [],
|
||||
"update_xml" : [
|
||||
"website": "http://www.akretion.com/",
|
||||
"category": "Finance",
|
||||
"init_xml": [],
|
||||
"demo_xml": [],
|
||||
"update_xml": [
|
||||
"easy_reconcile.xml",
|
||||
"easy_reconcile_history_view.xml",
|
||||
],
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright 2012 Camptocamp SA (Guewen Baconnier)
|
||||
# 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
|
||||
@@ -19,29 +19,29 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp.osv.orm import AbstractModel
|
||||
from openerp.osv import fields, osv
|
||||
from openerp.osv import fields, orm
|
||||
from operator import itemgetter, attrgetter
|
||||
|
||||
|
||||
class easy_reconcile_base(AbstractModel):
|
||||
class easy_reconcile_base(orm.AbstractModel):
|
||||
"""Abstract Model for reconciliation methods"""
|
||||
|
||||
_name = 'easy.reconcile.base'
|
||||
|
||||
_inherit = 'easy.reconcile.options'
|
||||
_auto = True # restore property set to False by AbstractModel
|
||||
|
||||
_columns = {
|
||||
'account_id': fields.many2one('account.account', 'Account', required=True),
|
||||
'partner_ids': fields.many2many('res.partner',
|
||||
string="Restrict on partners"),
|
||||
'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):
|
||||
"""
|
||||
:return: list of reconciled ids, list of partially reconciled entries
|
||||
""" Reconciliation method called from the view.
|
||||
|
||||
:return: list of reconciled ids, list of partially reconciled items
|
||||
"""
|
||||
if isinstance(ids, (int, long)):
|
||||
ids = [ids]
|
||||
@@ -50,14 +50,15 @@ class easy_reconcile_base(AbstractModel):
|
||||
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
|
||||
""" 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
|
||||
""" Mandatory columns for move lines queries
|
||||
An extra column aliased as ``key`` should be defined
|
||||
in each query."""
|
||||
aml_cols = (
|
||||
'id',
|
||||
@@ -104,7 +105,7 @@ class easy_reconcile_base(AbstractModel):
|
||||
return where, params
|
||||
|
||||
def _below_writeoff_limit(self, cr, uid, rec, lines,
|
||||
writeoff_limit, context=None):
|
||||
writeoff_limit, context=None):
|
||||
precision = self.pool.get('decimal.precision').precision_get(
|
||||
cr, uid, 'Account')
|
||||
keys = ('debit', 'credit')
|
||||
@@ -119,7 +120,8 @@ class easy_reconcile_base(AbstractModel):
|
||||
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):
|
||||
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):
|
||||
@@ -155,12 +157,14 @@ class easy_reconcile_base(AbstractModel):
|
||||
""" Try to reconcile given lines
|
||||
|
||||
:param list lines: list of dict of move lines, they must at least
|
||||
contain values for : id, debit, credit
|
||||
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 the entries
|
||||
have been reconciled or not, the second is wether the reconciliation
|
||||
is full (True) or partial (False)
|
||||
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 = {}
|
||||
@@ -168,8 +172,6 @@ class easy_reconcile_base(AbstractModel):
|
||||
ml_obj = self.pool.get('account.move.line')
|
||||
writeoff = rec.write_off
|
||||
|
||||
keys = ('debit', 'credit')
|
||||
|
||||
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)
|
||||
@@ -204,4 +206,3 @@ class easy_reconcile_base(AbstractModel):
|
||||
return True, False
|
||||
|
||||
return False, False
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright 2012 Camptocamp SA (Guewen Baconnier)
|
||||
# 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
|
||||
@@ -19,19 +19,18 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
from openerp.osv.orm import Model, AbstractModel
|
||||
from openerp.osv import fields, osv
|
||||
from openerp.osv import fields, osv, orm
|
||||
from openerp.tools.translate import _
|
||||
from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT
|
||||
|
||||
|
||||
class easy_reconcile_options(AbstractModel):
|
||||
"""Options of a reconciliation profile, columns
|
||||
shared by the configuration of methods and by the
|
||||
reconciliation wizards. This allows decoupling
|
||||
of the methods with the wizards and allows to
|
||||
launch the wizards alone
|
||||
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'
|
||||
@@ -46,12 +45,16 @@ class easy_reconcile_options(AbstractModel):
|
||||
|
||||
_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,
|
||||
'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 reconcilation'),
|
||||
string='Date of reconciliation'),
|
||||
'filter': fields.char('Filter', size=128),
|
||||
}
|
||||
|
||||
@@ -61,13 +64,12 @@ class easy_reconcile_options(AbstractModel):
|
||||
}
|
||||
|
||||
|
||||
class account_easy_reconcile_method(Model):
|
||||
class account_easy_reconcile_method(orm.Model):
|
||||
|
||||
_name = 'account.easy.reconcile.method'
|
||||
_description = 'reconcile method for account_easy_reconcile'
|
||||
|
||||
_inherit = 'easy.reconcile.options'
|
||||
_auto = True # restore property set to False by AbstractModel
|
||||
|
||||
_order = 'sequence'
|
||||
|
||||
@@ -82,11 +84,18 @@ class account_easy_reconcile_method(Model):
|
||||
return self._get_all_rec_method(cr, uid, context=None)
|
||||
|
||||
_columns = {
|
||||
'name': fields.selection(_get_rec_method, 'Type', size=128, 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', 'Task',
|
||||
required=True, ondelete='cascade'),
|
||||
'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'),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
@@ -94,8 +103,11 @@ class account_easy_reconcile_method(Model):
|
||||
}
|
||||
|
||||
def init(self, cr):
|
||||
""" Migration stuff, name is not anymore methods names
|
||||
but models name"""
|
||||
""" 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'
|
||||
@@ -108,7 +120,7 @@ class account_easy_reconcile_method(Model):
|
||||
""")
|
||||
|
||||
|
||||
class account_easy_reconcile(Model):
|
||||
class account_easy_reconcile(orm.Model):
|
||||
|
||||
_name = 'account.easy.reconcile'
|
||||
_description = 'account easy reconcile'
|
||||
@@ -140,22 +152,29 @@ class account_easy_reconcile(Model):
|
||||
def _last_history(self, cr, uid, ids, name, args, context=None):
|
||||
result = {}
|
||||
for history in self.browse(cr, uid, ids, context=context):
|
||||
# history is sorted by date desc
|
||||
result[history.id] = history.history_ids[0].id
|
||||
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', size=64, 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 Entries'),
|
||||
'reconciled_partial_count': fields.function(_get_partial_rec,
|
||||
type='integer', string='Partially Reconciled Entries'),
|
||||
'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'),
|
||||
string='History',
|
||||
readonly=True),
|
||||
'last_history':
|
||||
fields.function(
|
||||
_last_history,
|
||||
@@ -168,11 +187,12 @@ class account_easy_reconcile(Model):
|
||||
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,
|
||||
'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}
|
||||
|
||||
@@ -188,8 +208,6 @@ class account_easy_reconcile(Model):
|
||||
res = cr.fetchall()
|
||||
return [row[0] for row in res]
|
||||
|
||||
if context is None:
|
||||
context = {}
|
||||
for rec in self.browse(cr, uid, ids, context=context):
|
||||
all_ml_rec_ids = []
|
||||
all_ml_partial_ids = []
|
||||
@@ -198,7 +216,8 @@ class account_easy_reconcile(Model):
|
||||
rec_model = self.pool.get(method.name)
|
||||
auto_rec_id = rec_model.create(
|
||||
cr, uid,
|
||||
self._prepare_run_transient(cr, uid, method, context=context),
|
||||
self._prepare_run_transient(
|
||||
cr, uid, method, context=context),
|
||||
context=context)
|
||||
|
||||
ml_rec_ids, ml_partial_ids = rec_model.automatic_reconcile(
|
||||
@@ -222,6 +241,16 @@ class account_easy_reconcile(Model):
|
||||
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 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
|
||||
@@ -231,6 +260,8 @@ class account_easy_reconcile(Model):
|
||||
"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):
|
||||
@@ -242,4 +273,6 @@ class account_easy_reconcile(Model):
|
||||
"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()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
@@ -7,52 +7,63 @@
|
||||
<field name="name">account.easy.reconcile.form</field>
|
||||
<field name="priority">20</field>
|
||||
<field name="model">account.easy.reconcile</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Automatic Easy Reconcile">
|
||||
<separator colspan="4" string="Task Information" />
|
||||
<field name="name" select="1"/>
|
||||
<field name="account"/>
|
||||
<field name="unreconciled_count"/>
|
||||
<field name="reconciled_partial_count"/>
|
||||
<separator colspan="4" string="Reconcile Method" />
|
||||
<notebook colspan="4">
|
||||
<page name="methods" string="Configuration">
|
||||
<field name="reconcile_method" colspan = "4" nolabel="1"/>
|
||||
<button icon="gtk-ok" name="run_reconcile" colspan="4"
|
||||
string="Start Auto Reconcilation" type="object"/>
|
||||
<button icon="STOCK_JUMP_TO" name="last_history_reconcile" colspan="2"
|
||||
string="Display items reconciled on the last run" type="object"/>
|
||||
<button icon="STOCK_JUMP_TO" name="last_history_partial" colspan="2"
|
||||
string="Display items partially reconciled on the last run"
|
||||
type="object"/>
|
||||
</page>
|
||||
<page name="history" string="History">
|
||||
<field name="history_ids" nolabel="1">
|
||||
<tree string="Automatic Easy Reconcile History">
|
||||
<field name="date"/>
|
||||
<!-- display the count of lines -->
|
||||
<field name="reconcile_line_ids"/>
|
||||
<button icon="STOCK_JUMP_TO" name="open_reconcile"
|
||||
string="Go to reconciled items" type="object"/>
|
||||
<!-- display the count of lines -->
|
||||
<field name="partial_line_ids"/>
|
||||
<button icon="STOCK_JUMP_TO" name="open_partial"
|
||||
string="Go to partially reconciled items" type="object"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page name="information" string="Information">
|
||||
<separator colspan="4" string="Simple. Amount and Name"/>
|
||||
<label string="Match one debit line vs one credit line. Do not allow partial reconcilation.
|
||||
<form string="Automatic Easy Reconcile" version="7.0">
|
||||
<header>
|
||||
<button name="run_reconcile" class="oe_highlight"
|
||||
string="Start Auto Reconciliation" type="object"/>
|
||||
<button icon="STOCK_JUMP_TO" name="last_history_reconcile"
|
||||
class="oe_highlight"
|
||||
string="Display items reconciled on the last run"
|
||||
type="object"/>
|
||||
<button icon="STOCK_JUMP_TO" name="last_history_partial"
|
||||
class="oe_highlight"
|
||||
string="Display items partially reconciled on the last run"
|
||||
type="object"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<separator colspan="4" string="Profile Information" />
|
||||
<group>
|
||||
<group>
|
||||
<field name="name" select="1"/>
|
||||
<field name="account"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="unreconciled_count"/>
|
||||
<field name="reconciled_partial_count"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page name="methods" string="Configuration">
|
||||
<field name="reconcile_method" colspan = "4" nolabel="1"/>
|
||||
</page>
|
||||
<page name="history" string="History">
|
||||
<field name="history_ids" nolabel="1">
|
||||
<tree string="Automatic Easy Reconcile History">
|
||||
<field name="date"/>
|
||||
<button icon="STOCK_JUMP_TO" name="open_reconcile"
|
||||
string="Go to reconciled items" type="object"/>
|
||||
<button icon="STOCK_JUMP_TO" name="open_partial"
|
||||
string="Go to partially reconciled items" type="object"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page name="information" string="Information">
|
||||
<separator colspan="4" string="Simple. Amount and Name"/>
|
||||
<label string="Match one debit line vs one credit line. Do not allow partial reconciliation.
|
||||
The lines should have the same amount (with the write-off) and the same name to be reconciled." colspan="4"/>
|
||||
|
||||
<separator colspan="4" string="Simple. Amount and Name"/>
|
||||
<label string="Match one debit line vs one credit line. Do not allow partial reconcilation.
|
||||
<separator colspan="4" string="Simple. Amount and Partner"/>
|
||||
<label string="Match one debit line vs one credit line. Do not allow partial reconciliation.
|
||||
The lines should have the same amount (with the write-off) and the same partner to be reconciled." colspan="4"/>
|
||||
|
||||
</page>
|
||||
</notebook>
|
||||
<separator colspan="4" string="Simple. Amount and Reference"/>
|
||||
<label string="Match one debit line vs one credit line. Do not allow partial reconciliation.
|
||||
The lines should have the same amount (with the write-off) and the same reference to be reconciled." colspan="4"/>
|
||||
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
@@ -61,7 +72,6 @@ The lines should have the same amount (with the write-off) and the same partner
|
||||
<field name="name">account.easy.reconcile.tree</field>
|
||||
<field name="priority">20</field>
|
||||
<field name="model">account.easy.reconcile</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Automatic Easy Reconcile">
|
||||
<field name="name"/>
|
||||
@@ -85,16 +95,25 @@ The lines should have the same amount (with the write-off) and the same partner
|
||||
<field name="res_model">account.easy.reconcile</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Click to add a reconciliation profile.
|
||||
</p><p>
|
||||
A reconciliation profile specifies, for one account, how
|
||||
the entries should be reconciled.
|
||||
You can select one or many reconciliation methods which will
|
||||
be run sequentially to match the entries between them.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- account.easy.reconcile.method view -->
|
||||
<!-- account.easy.reconcile.method view -->
|
||||
|
||||
<record id="account_easy_reconcile_method_form" model="ir.ui.view">
|
||||
<field name="name">account.easy.reconcile.method.form</field>
|
||||
<field name="priority">20</field>
|
||||
<field name="model">account.easy.reconcile.method</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Automatic Easy Reconcile Method">
|
||||
<field name="sequence"/>
|
||||
@@ -104,7 +123,6 @@ The lines should have the same amount (with the write-off) and the same partner
|
||||
<field name="account_profit_id" attrs="{'required':[('write_off','>',0)]}"/>
|
||||
<field name="journal_id" attrs="{'required':[('write_off','>',0)]}"/>
|
||||
<field name="date_base_on"/>
|
||||
<field name="filter" groups="base.group_extended"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
@@ -113,8 +131,7 @@ The lines should have the same amount (with the write-off) and the same partner
|
||||
<field name="name">account.easy.reconcile.method.tree</field>
|
||||
<field name="priority">20</field>
|
||||
<field name="model">account.easy.reconcile.method</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="top" string="Automatic Easy Reconcile Method">
|
||||
<field name="sequence"/>
|
||||
<field name="name"/>
|
||||
@@ -123,14 +140,15 @@ The lines should have the same amount (with the write-off) and the same partner
|
||||
<field name="account_profit_id" attrs="{'required':[('write_off','>',0)]}"/>
|
||||
<field name="journal_id" attrs="{'required':[('write_off','>',0)]}"/>
|
||||
<field name="date_base_on"/>
|
||||
<field name="filter"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- menu item -->
|
||||
<!-- menu item -->
|
||||
|
||||
<menuitem action="action_account_easy_reconcile" id="menu_easy_reconcile" parent="account.periodical_processing_reconciliation"/>
|
||||
<menuitem action="action_account_easy_reconcile"
|
||||
id="menu_easy_reconcile"
|
||||
parent="account.periodical_processing_reconciliation"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
<record id="view_easy_reconcile_history_search" model="ir.ui.view">
|
||||
<field name="name">easy.reconcile.history.search</field>
|
||||
<field name="model">easy.reconcile.history</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Automatic Easy Reconcile History">
|
||||
<filter icon="terp-go-today" string="Today"
|
||||
@@ -34,44 +33,44 @@
|
||||
|
||||
<record id="easy_reconcile_history_form" model="ir.ui.view">
|
||||
<field name="name">easy.reconcile.history.form</field>
|
||||
<field name="priority">16</field>
|
||||
<field name="model">easy.reconcile.history</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Automatic Easy Reconcile History">
|
||||
<field name="easy_reconcile_id"/>
|
||||
<field name="date"/>
|
||||
<group colspan="2" col="2">
|
||||
<separator colspan="2" string="Reconcilations"/>
|
||||
<field name="reconcile_ids" nolabel="1"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator colspan="2" string="Partial Reconcilations"/>
|
||||
<field name="reconcile_partial_ids" nolabel="1"/>
|
||||
</group>
|
||||
<group col="2" colspan="4">
|
||||
<button icon="STOCK_JUMP_TO" name="open_reconcile" string="Go to reconciled items" type="object"/>
|
||||
<button icon="STOCK_JUMP_TO" name="open_partial" string="Go to partially reconciled items" type="object"/>
|
||||
</group>
|
||||
<form string="Automatic Easy Reconcile History" version="7.0">
|
||||
<header>
|
||||
<button name="open_reconcile"
|
||||
string="Go to reconciled items"
|
||||
icon="STOCK_JUMP_TO" type="object"/>
|
||||
<button name="open_partial"
|
||||
string="Go to partially reconciled items"
|
||||
icon="STOCK_JUMP_TO" type="object"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="easy_reconcile_id"/>
|
||||
<field name="date"/>
|
||||
</group>
|
||||
<group col="2">
|
||||
<separator colspan="2" string="Reconciliations"/>
|
||||
<field name="reconcile_ids" nolabel="1"/>
|
||||
</group>
|
||||
<group col="2">
|
||||
<separator colspan="2" string="Partial Reconciliations"/>
|
||||
<field name="reconcile_partial_ids" nolabel="1"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="easy_reconcile_history_tree" model="ir.ui.view">
|
||||
<field name="name">easy.reconcile.history.tree</field>
|
||||
<field name="priority">16</field>
|
||||
<field name="model">easy.reconcile.history</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Automatic Easy Reconcile History">
|
||||
<field name="easy_reconcile_id"/>
|
||||
<field name="date"/>
|
||||
<!-- display the count of lines -->
|
||||
<field name="reconcile_line_ids"/>
|
||||
<button icon="STOCK_JUMP_TO" name="open_reconcile"
|
||||
string="Go to reconciled items" type="object"/>
|
||||
<!-- display the count of lines -->
|
||||
<field name="partial_line_ids"/>
|
||||
<button icon="STOCK_JUMP_TO" name="open_partial"
|
||||
string="Go to partially reconciled items" type="object"/>
|
||||
</tree>
|
||||
|
||||
@@ -6,45 +6,73 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 6.1\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2012-12-20 08:54+0000\n"
|
||||
"PO-Revision-Date: 2012-11-07 12:59+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"POT-Creation-Date: 2013-01-04 08:39+0000\n"
|
||||
"PO-Revision-Date: 2013-01-04 09:55+0100\n"
|
||||
"Last-Translator: Guewen Baconnier <guewen.baconnier@camptocamp.com>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: code:addons/account_easy_reconcile/easy_reconcile_history.py:103
|
||||
#: code:addons/account_easy_reconcile/easy_reconcile_history.py:101
|
||||
#: view:easy.reconcile.history:0
|
||||
#: field:easy.reconcile.history,reconcile_ids:0
|
||||
#, python-format
|
||||
msgid "Reconciliations"
|
||||
msgstr "Lettrages"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: view:account.easy.reconcile:0
|
||||
#: view:easy.reconcile.history:0
|
||||
msgid "Automatic Easy Reconcile History"
|
||||
msgstr "Historique des lettrages automatisés"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: view:account.easy.reconcile:0
|
||||
msgid "Information"
|
||||
msgstr "Information"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: view:account.easy.reconcile:0 view:easy.reconcile.history:0
|
||||
msgid "Automatic Easy Reconcile History"
|
||||
msgstr "Historique des lettrages automatisés"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: view:account.easy.reconcile:0 view:easy.reconcile.history:0
|
||||
#: view:account.easy.reconcile:0
|
||||
#: view:easy.reconcile.history:0
|
||||
msgid "Go to partially reconciled items"
|
||||
msgstr "Voir les entrées partiellement lettrées"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: help:account.easy.reconcile.method,sequence:0
|
||||
msgid "The sequence field is used to order the reconcile method"
|
||||
msgstr "La séquence détermine l'ordre des méthodes de lettrage"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: model:ir.model,name:account_easy_reconcile.model_easy_reconcile_history
|
||||
msgid "easy.reconcile.history"
|
||||
msgstr "easy.reconcile.history"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: model:ir.model,name:account_easy_reconcile.model_easy_reconcile_simple_name
|
||||
msgid "easy.reconcile.simple.name"
|
||||
msgstr "easy.reconcile.simple.name"
|
||||
#: model:ir.actions.act_window,help:account_easy_reconcile.action_account_easy_reconcile
|
||||
msgid ""
|
||||
"<p class=\"oe_view_nocontent_create\">\n"
|
||||
" Click to add a reconciliation profile.\n"
|
||||
" </p><p>\n"
|
||||
" A reconciliation profile specifies, for one account, how\n"
|
||||
" the entries should be reconciled.\n"
|
||||
" You can select one or many reconciliation methods which will\n"
|
||||
" be run sequentially to match the entries between them.\n"
|
||||
" </p>\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"<p class=\"oe_view_nocontent_create\">\n"
|
||||
" Cliquez pour ajouter un profil de lettrage.\n"
|
||||
" </p><p>\n"
|
||||
" Un profil de lettrage spécifie, pour un compte, comment\n"
|
||||
" les écritures doivent être lettrées.\n"
|
||||
" Vous pouvez sélectionner une ou plusieurs méthodes de lettrage\n"
|
||||
" qui seront lancées successivement pour identifier les écritures\n"
|
||||
" devant être lettrées. </p>\n"
|
||||
" "
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: model:ir.model,name:account_easy_reconcile.model_easy_reconcile_options
|
||||
@@ -57,20 +85,25 @@ msgid "Group By..."
|
||||
msgstr "Grouper par..."
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: view:account.easy.reconcile:0
|
||||
msgid "Task Information"
|
||||
msgstr "Information sur la tâche"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: view:account.easy.reconcile:0
|
||||
msgid "Reconcile Method"
|
||||
msgstr "Méthode de lettrage"
|
||||
#: field:account.easy.reconcile,unreconciled_count:0
|
||||
msgid "Unreconciled Items"
|
||||
msgstr "Écritures non lettrées"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: model:ir.model,name:account_easy_reconcile.model_easy_reconcile_base
|
||||
msgid "easy.reconcile.base"
|
||||
msgstr "easy.reconcile.base"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: field:easy.reconcile.history,reconcile_line_ids:0
|
||||
msgid "Reconciled Items"
|
||||
msgstr "Écritures lettrées"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: field:account.easy.reconcile,reconcile_method:0
|
||||
msgid "Method"
|
||||
msgstr "Méthode"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: view:easy.reconcile.history:0
|
||||
msgid "7 Days"
|
||||
@@ -82,19 +115,19 @@ msgid "Easy Automatic Reconcile History"
|
||||
msgstr "Lettrage automatisé"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: model:ir.actions.act_window,name:account_easy_reconcile.act_easy_reconcile_to_history
|
||||
msgid "History Details"
|
||||
msgstr "Détails de l'historique"
|
||||
#: field:easy.reconcile.history,date:0
|
||||
msgid "Run date"
|
||||
msgstr "Date de lancement"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: view:account.easy.reconcile:0
|
||||
msgid ""
|
||||
"Match one debit line vs one credit line. Do not allow partial reconcilation. "
|
||||
"The lines should have the same amount (with the write-off) and the same name "
|
||||
"to be reconciled."
|
||||
msgstr ""
|
||||
"Lettre un débit avec un crédit ayant le même montant et la même description. "
|
||||
"Le lettrage ne peut être partiel (écriture d'ajustement en cas d'écart)."
|
||||
msgid "Match one debit line vs one credit line. Do not allow partial reconciliation. The lines should have the same amount (with the write-off) and the same reference to be reconciled."
|
||||
msgstr "Lettre un débit avec un crédit ayant le même montant et la même référence. Le lettrage ne peut être partiel (écriture d'ajustement en cas d'écart)."
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: model:ir.actions.act_window,name:account_easy_reconcile.act_easy_reconcile_to_history
|
||||
msgid "History Details"
|
||||
msgstr "Détails de l'historique"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: view:account.easy.reconcile:0
|
||||
@@ -102,9 +135,31 @@ msgid "Display items reconciled on the last run"
|
||||
msgstr "Voir les entrées lettrées au dernier lettrage"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: model:ir.model,name:account_easy_reconcile.model_account_easy_reconcile_method
|
||||
msgid "reconcile method for account_easy_reconcile"
|
||||
msgstr "Méthode de lettrage"
|
||||
#: field:account.easy.reconcile.method,name:0
|
||||
msgid "Type"
|
||||
msgstr "Type"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: field:account.easy.reconcile.method,journal_id:0
|
||||
#: field:easy.reconcile.base,journal_id:0
|
||||
#: field:easy.reconcile.options,journal_id:0
|
||||
#: field:easy.reconcile.simple,journal_id:0
|
||||
#: field:easy.reconcile.simple.name,journal_id:0
|
||||
#: field:easy.reconcile.simple.partner,journal_id:0
|
||||
#: field:easy.reconcile.simple.reference,journal_id:0
|
||||
msgid "Journal"
|
||||
msgstr "Journal"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: field:account.easy.reconcile.method,account_profit_id:0
|
||||
#: field:easy.reconcile.base,account_profit_id:0
|
||||
#: field:easy.reconcile.options,account_profit_id:0
|
||||
#: field:easy.reconcile.simple,account_profit_id:0
|
||||
#: field:easy.reconcile.simple.name,account_profit_id:0
|
||||
#: field:easy.reconcile.simple.partner,account_profit_id:0
|
||||
#: field:easy.reconcile.simple.reference,account_profit_id:0
|
||||
msgid "Account Profit"
|
||||
msgstr "Compte de profits"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: view:easy.reconcile.history:0
|
||||
@@ -116,6 +171,15 @@ msgstr "Lettrages du jour"
|
||||
msgid "Simple. Amount and Name"
|
||||
msgstr "Simple. Montant et description"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: field:easy.reconcile.base,partner_ids:0
|
||||
#: field:easy.reconcile.simple,partner_ids:0
|
||||
#: field:easy.reconcile.simple.name,partner_ids:0
|
||||
#: field:easy.reconcile.simple.partner,partner_ids:0
|
||||
#: field:easy.reconcile.simple.reference,partner_ids:0
|
||||
msgid "Restrict on partners"
|
||||
msgstr "Filtrer sur des partenaires"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: model:ir.actions.act_window,name:account_easy_reconcile.action_account_easy_reconcile
|
||||
#: model:ir.ui.menu,name:account_easy_reconcile.menu_easy_reconcile
|
||||
@@ -132,26 +196,132 @@ msgstr "Aujourd'hui"
|
||||
msgid "Date"
|
||||
msgstr "Date"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: field:account.easy.reconcile,last_history:0
|
||||
msgid "Last History"
|
||||
msgstr "Dernier historique"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: view:account.easy.reconcile:0
|
||||
msgid "Configuration"
|
||||
msgstr "Configuration"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: field:account.easy.reconcile,reconciled_partial_count:0
|
||||
#: field:easy.reconcile.history,partial_line_ids:0
|
||||
msgid "Partially Reconciled Items"
|
||||
msgstr "Écritures partiellement lettrées"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: model:ir.model,name:account_easy_reconcile.model_easy_reconcile_simple_partner
|
||||
msgid "easy.reconcile.simple.partner"
|
||||
msgstr "easy.reconcile.simple.partner"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: field:account.easy.reconcile.method,write_off:0
|
||||
#: field:easy.reconcile.base,write_off:0
|
||||
#: field:easy.reconcile.options,write_off:0
|
||||
#: field:easy.reconcile.simple,write_off:0
|
||||
#: field:easy.reconcile.simple.name,write_off:0
|
||||
#: field:easy.reconcile.simple.partner,write_off:0
|
||||
#: field:easy.reconcile.simple.reference,write_off:0
|
||||
msgid "Write off allowed"
|
||||
msgstr "Écart autorisé"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: view:account.easy.reconcile:0
|
||||
msgid "Automatic Easy Reconcile"
|
||||
msgstr "Lettrage automatisé"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: field:account.easy.reconcile,account:0
|
||||
#: field:easy.reconcile.base,account_id:0
|
||||
#: field:easy.reconcile.simple,account_id:0
|
||||
#: field:easy.reconcile.simple.name,account_id:0
|
||||
#: field:easy.reconcile.simple.partner,account_id:0
|
||||
#: field:easy.reconcile.simple.reference,account_id:0
|
||||
msgid "Account"
|
||||
msgstr "Compte"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: field:account.easy.reconcile.method,task_id:0
|
||||
msgid "Task"
|
||||
msgstr "Tâche"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: field:account.easy.reconcile,name:0
|
||||
msgid "Name"
|
||||
msgstr "Nom"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: view:account.easy.reconcile:0
|
||||
msgid "Simple. Amount and Partner"
|
||||
msgstr "Simple. Montant et partenaire"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: view:account.easy.reconcile:0
|
||||
msgid "Start Auto Reconcilation"
|
||||
msgstr "Lancer le lettrage automatisé"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: model:ir.model,name:account_easy_reconcile.model_easy_reconcile_simple_name
|
||||
msgid "easy.reconcile.simple.name"
|
||||
msgstr "easy.reconcile.simple.name"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: field:account.easy.reconcile.method,filter:0
|
||||
#: field:easy.reconcile.base,filter:0
|
||||
#: field:easy.reconcile.options,filter:0
|
||||
#: field:easy.reconcile.simple,filter:0
|
||||
#: field:easy.reconcile.simple.name,filter:0
|
||||
#: field:easy.reconcile.simple.partner,filter:0
|
||||
#: field:easy.reconcile.simple.reference,filter:0
|
||||
msgid "Filter"
|
||||
msgstr "Filtre"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: view:account.easy.reconcile:0
|
||||
msgid "Match one debit line vs one credit line. Do not allow partial reconciliation. The lines should have the same amount (with the write-off) and the same partner to be reconciled."
|
||||
msgstr "Lettre un débit avec un crédit ayant le même montant et le même partenaire. Le lettrage ne peut être partiel (écriture d'ajustement en cas d'écart)."
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: field:easy.reconcile.history,easy_reconcile_id:0
|
||||
msgid "Reconcile Profile"
|
||||
msgstr "Profil de réconciliation"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: view:account.easy.reconcile:0
|
||||
msgid "Start Auto Reconciliation"
|
||||
msgstr "Lancer le lettrage automatisé"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: code:addons/account_easy_reconcile/easy_reconcile.py:250
|
||||
#, python-format
|
||||
msgid "Error"
|
||||
msgstr "Erreur"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: code:addons/account_easy_reconcile/easy_reconcile.py:251
|
||||
#, python-format
|
||||
msgid "There is no history of reconciled items on the task: %s."
|
||||
msgstr "Il n'y a pas d'historique d'écritures lettrées sur la tâche: %s."
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: view:account.easy.reconcile:0
|
||||
msgid "Match one debit line vs one credit line. Do not allow partial reconciliation. The lines should have the same amount (with the write-off) and the same name to be reconciled."
|
||||
msgstr "Lettre un débit avec un crédit ayant le même montant et la même description. Le lettrage ne peut être partiel (écriture d'ajustement en cas d'écart)."
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: field:account.easy.reconcile.method,account_lost_id:0
|
||||
#: field:easy.reconcile.base,account_lost_id:0
|
||||
#: field:easy.reconcile.options,account_lost_id:0
|
||||
#: field:easy.reconcile.simple,account_lost_id:0
|
||||
#: field:easy.reconcile.simple.name,account_lost_id:0
|
||||
#: field:easy.reconcile.simple.partner,account_lost_id:0
|
||||
#: field:easy.reconcile.simple.reference,account_lost_id:0
|
||||
msgid "Account Lost"
|
||||
msgstr "Compte de pertes"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: view:easy.reconcile.history:0
|
||||
msgid "Reconciliation Profile"
|
||||
@@ -159,14 +329,21 @@ msgstr "Profil de réconciliation"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: view:account.easy.reconcile:0
|
||||
#: field:account.easy.reconcile,history_ids:0
|
||||
msgid "History"
|
||||
msgstr "Historique"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: view:account.easy.reconcile:0 view:easy.reconcile.history:0
|
||||
#: view:account.easy.reconcile:0
|
||||
#: view:easy.reconcile.history:0
|
||||
msgid "Go to reconciled items"
|
||||
msgstr "Voir les entrées lettrées"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: view:account.easy.reconcile:0
|
||||
msgid "Profile Information"
|
||||
msgstr "Information sur le profil"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: view:account.easy.reconcile.method:0
|
||||
msgid "Automatic Easy Reconcile Method"
|
||||
@@ -174,13 +351,8 @@ msgstr "Méthode de lettrage automatisé"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: view:account.easy.reconcile:0
|
||||
msgid ""
|
||||
"Match one debit line vs one credit line. Do not allow partial reconcilation. "
|
||||
"The lines should have the same amount (with the write-off) and the same "
|
||||
"partner to be reconciled."
|
||||
msgstr ""
|
||||
"Lettre un débit avec un crédit ayant le même montant et le même partenaire. "
|
||||
"Le lettrage ne peut être partiel (écriture d'ajustement en cas d'écart)."
|
||||
msgid "Simple. Amount and Reference"
|
||||
msgstr "Simple. Montant et référence"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: view:account.easy.reconcile:0
|
||||
@@ -188,9 +360,9 @@ msgid "Display items partially reconciled on the last run"
|
||||
msgstr "Afficher les entrées partiellement lettrées au dernier lettrage"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: view:easy.reconcile.history:0
|
||||
msgid "Partial Reconcilations"
|
||||
msgstr "Lettrages partiels"
|
||||
#: field:account.easy.reconcile.method,sequence:0
|
||||
msgid "Sequence"
|
||||
msgstr "Séquence"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: model:ir.model,name:account_easy_reconcile.model_easy_reconcile_simple
|
||||
@@ -203,10 +375,29 @@ msgid "Reconciliations of last 7 days"
|
||||
msgstr "Lettrages des 7 derniers jours"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: code:addons/account_easy_reconcile/easy_reconcile_history.py:106
|
||||
#: field:account.easy.reconcile.method,date_base_on:0
|
||||
#: field:easy.reconcile.base,date_base_on:0
|
||||
#: field:easy.reconcile.options,date_base_on:0
|
||||
#: field:easy.reconcile.simple,date_base_on:0
|
||||
#: field:easy.reconcile.simple.name,date_base_on:0
|
||||
#: field:easy.reconcile.simple.partner,date_base_on:0
|
||||
#: field:easy.reconcile.simple.reference,date_base_on:0
|
||||
msgid "Date of reconciliation"
|
||||
msgstr "Date de lettrage"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: code:addons/account_easy_reconcile/easy_reconcile_history.py:104
|
||||
#: view:easy.reconcile.history:0
|
||||
#: field:easy.reconcile.history,reconcile_partial_ids:0
|
||||
#, python-format
|
||||
msgid "Partial Reconciliations"
|
||||
msgstr "Lettrages partiels"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: model:ir.model,name:account_easy_reconcile.model_account_easy_reconcile_method
|
||||
msgid "reconcile method for account_easy_reconcile"
|
||||
msgstr "Méthode de lettrage"
|
||||
|
||||
#. module: account_easy_reconcile
|
||||
#: model:ir.model,name:account_easy_reconcile.model_easy_reconcile_simple_reference
|
||||
msgid "easy.reconcile.simple.reference"
|
||||
@@ -217,5 +408,18 @@ msgstr "easy.reconcile.simple.reference"
|
||||
msgid "account easy reconcile"
|
||||
msgstr "Lettrage automatisé"
|
||||
|
||||
#~ msgid "Unreconciled Entries"
|
||||
#~ msgstr "Écritures non lettrées"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Partially Reconciled Entries"
|
||||
#~ msgstr "Lettrages partiels"
|
||||
|
||||
#~ msgid "Task Information"
|
||||
#~ msgstr "Information sur la tâche"
|
||||
|
||||
#~ msgid "Reconcile Method"
|
||||
#~ msgstr "Méthode de lettrage"
|
||||
|
||||
#~ msgid "Log"
|
||||
#~ msgstr "Historique"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright 2012 Camptocamp SA (Guewen Baconnier)
|
||||
# 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
|
||||
@@ -41,7 +41,7 @@ class easy_reconcile_simple(AbstractModel):
|
||||
count = 0
|
||||
res = []
|
||||
while (count < len(lines)):
|
||||
for i in range(count+1, len(lines)):
|
||||
for i in xrange(count+1, len(lines)):
|
||||
writeoff_account_id = False
|
||||
if lines[count][self._key_field] != lines[i][self._key_field]:
|
||||
break
|
||||
@@ -94,7 +94,6 @@ class easy_reconcile_simple_name(TransientModel):
|
||||
|
||||
_name = 'easy.reconcile.simple.name'
|
||||
_inherit = 'easy.reconcile.simple'
|
||||
_auto = True # False when inherited from AbstractModel
|
||||
|
||||
# has to be subclassed
|
||||
# field name used as key for matching the move lines
|
||||
@@ -105,17 +104,16 @@ class easy_reconcile_simple_partner(TransientModel):
|
||||
|
||||
_name = 'easy.reconcile.simple.partner'
|
||||
_inherit = 'easy.reconcile.simple'
|
||||
_auto = True # False when inherited from AbstractModel
|
||||
|
||||
# has to be subclassed
|
||||
# field name used as key for matching the move lines
|
||||
_key_field = 'partner_id'
|
||||
|
||||
|
||||
class easy_reconcile_simple_reference(TransientModel):
|
||||
|
||||
_name = 'easy.reconcile.simple.reference'
|
||||
_inherit = 'easy.reconcile.simple'
|
||||
_auto = True # False when inherited from AbstractModel
|
||||
|
||||
# has to be subclassed
|
||||
# field name used as key for matching the move lines
|
||||
|
||||
Reference in New Issue
Block a user