~akretion-team/banking-addons/bank-statement-reconcile-7.0-file-exchange

« back to all changes in this revision

Viewing changes to account_statement_file_document/statement.py

  • Committer: Sebastien Beau
  • Date: 2013-12-16 15:31:20 UTC
  • Revision ID: sebastien.beau@akretion.com-20131216153120-gpyd3zzqtrlczp0f
[FIX] fix error call super was done with the wrong class

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#
21
21
###############################################################################
22
22
 
23
 
 
24
23
from openerp.osv import fields, orm
25
24
 
 
25
 
26
26
class account_bank_statement(orm.Model):
27
27
    _inherit = "account.bank.statement"
28
28
 
29
29
    _columns = {
30
30
        'file_id': fields.many2one('file.document', string='File Document', readonly=True)
31
31
    }
32
 
 
33
 
class AccountStatementProfil(orm.Model):
 
32
 
 
33
 
 
34
class account_statement_profil(orm.Model):
34
35
    _inherit = "account.statement.profile"
35
36
      
36
37
    def _attach_file_stream(self, cr, uid, statement_id, file_stream, ftype, context=None):
37
38
        if context.get('default_file_id'):
38
39
            return True
39
40
        else:
40
 
            return super(account_bank_statement, self)._attach_file_stream(cr,
 
41
            return super(account_statement_profil, self)._attach_file_stream(cr,
41
42
                    uid, statement_id, file_stream, ftype, context=context)  
42
43