[IMP] account_statement_base_import: Inheritable method with public name.

This commit is contained in:
Pedro M. Baeza
2014-01-21 02:04:59 +01:00
parent 3e4eb10958
commit 3f1999ed8c
2 changed files with 5 additions and 6 deletions

View File

@@ -31,12 +31,12 @@ from parser import new_bank_statement_parser
class AccountStatementProfil(Model): class AccountStatementProfil(Model):
_inherit = "account.statement.profile" _inherit = "account.statement.profile"
def _get_import_type_selection(self, cr, uid, context=None): def get_import_type_selection(self, cr, uid, context=None):
"""This is the method to be inherited for adding the parser""" """This is the method to be inherited for adding the parser"""
return [('generic_csvxls_so', 'Generic .csv/.xls based on SO Name')] return [('generic_csvxls_so', 'Generic .csv/.xls based on SO Name')]
def get_import_type_selection(self, cr, uid, context=None): def _get_import_type_selection(self, cr, uid, context=None):
return _get_import_type selection(cr, uid, context=context) return get_import_type selection(cr, uid, context=context)
_columns = { _columns = {
'launch_import_completion': fields.boolean( 'launch_import_completion': fields.boolean(
@@ -47,12 +47,11 @@ class AccountStatementProfil(Model):
# we remove deprecated as it floods logs in standard/warning level sob... # we remove deprecated as it floods logs in standard/warning level sob...
'rec_log': fields.text('log', readonly=True), # Deprecated 'rec_log': fields.text('log', readonly=True), # Deprecated
'import_type': fields.selection( 'import_type': fields.selection(
get_import_type_selection, _get_import_type_selection,
'Type of import', 'Type of import',
required=True, required=True,
help="Choose here the method by which you want to import bank" help="Choose here the method by which you want to import bank"
"statement for this profile."), "statement for this profile."),
} }
def _write_extra_statement_lines( def _write_extra_statement_lines(

View File

@@ -24,7 +24,7 @@ from openerp.osv import fields, orm
class AccountStatementProfil(orm.Model): class AccountStatementProfil(orm.Model):
_inherit = "account.statement.profile" _inherit = "account.statement.profile"
def _get_import_type_selection(self, cr, uid, context=None): def get_import_type_selection(self, cr, uid, context=None):
""" """
Inherited from parent to add parser. Inherited from parent to add parser.
""" """