[FIX] API Improvement

This commit is contained in:
florian-dacosta
2014-07-23 17:30:02 +02:00
parent 1d1ae5741c
commit c6e8ea5500
8 changed files with 18 additions and 32 deletions

View File

@@ -32,12 +32,15 @@ from openerp.tools.config import config
class AccountStatementProfil(Model):
_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"""
return [('generic_csvxls_so', 'Generic .csv/.xls based on SO Name')]
def _get_import_type_selection(self, cr, uid, context=None):
return self.get_import_type_selection(cr, uid, context=context)
def __get_import_type_selection(self, cr, uid, context=None):
"""
Call method which can be inherited
"""
return self._get_import_type_selection(cr, uid, context=context)
_columns = {
'launch_import_completion': fields.boolean(
@@ -48,7 +51,7 @@ class AccountStatementProfil(Model):
# we remove deprecated as it floods logs in standard/warning level sob...
'rec_log': fields.text('log', readonly=True), # Deprecated
'import_type': fields.selection(
_get_import_type_selection,
__get_import_type_selection,
'Type of import',
required=True,
help="Choose here the method by which you want to import bank"