~camptocamp/banking-addons/bank-statement-reconcile-70-pending-merge

« back to all changes in this revision

Viewing changes to account_advanced_reconcile_bank_statement/base_advanced_reconciliation.py

  • Committer: Matthieu Dietrich
  • Date: 2014-05-27 14:14:23 UTC
  • Revision ID: matthieu.dietrich@camptocamp.com-20140527141423-nfetynjpkfm2ye4i
[ADD] new reconciliation rule using bank statements

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
##############################################################################
 
3
#
 
4
#    Author: Matthieu Dietrich
 
5
#    Copyright 2014 Camptocamp SA
 
6
#
 
7
#    This program is free software: you can redistribute it and/or modify
 
8
#    it under the terms of the GNU Affero General Public License as
 
9
#    published by the Free Software Foundation, either version 3 of the
 
10
#    License, or (at your option) any later version.
 
11
#
 
12
#    This program is distributed in the hope that it will be useful,
 
13
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
#    GNU Affero General Public License for more details.
 
16
#
 
17
#    You should have received a copy of the GNU Affero General Public License
 
18
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
19
#
 
20
##############################################################################
 
21
 
 
22
from itertools import product
 
23
from openerp.osv import orm
 
24
 
 
25
 
 
26
class easy_reconcile_advanced(orm.AbstractModel):
 
27
 
 
28
    _inherit = 'easy.reconcile.advanced'
 
29
 
 
30
    def _base_columns(self, rec):
 
31
        """ Mandatory columns for move lines queries
 
32
        An extra column aliased as ``key`` should be defined
 
33
        in each query."""
 
34
        aml_cols = (
 
35
            'id',
 
36
            'debit',
 
37
            'credit',
 
38
            'date',
 
39
            'period_id',
 
40
            'ref',
 
41
            'name',
 
42
            'partner_id',
 
43
            'account_id',
 
44
            'move_id',
 
45
            'statement_id')
 
46
        return ["account_move_line.%s" % col for col in aml_cols]