mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[IMP] account_statement_base_import: private method that returns import type to ease inheritance
[IMP] account_statement_ofx_import: changed accordingly previous improvement
This commit is contained in:
@@ -31,12 +31,13 @@ from parser import new_bank_statement_parser
|
||||
class AccountStatementProfil(Model):
|
||||
_inherit = "account.statement.profile"
|
||||
|
||||
def get_import_type_selection(self, cr, uid, context=None):
|
||||
"""
|
||||
Has to be inherited to add parser
|
||||
"""
|
||||
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 _get_import_type selection(cr, uid, context=context)
|
||||
|
||||
_columns = {
|
||||
'launch_import_completion': fields.boolean(
|
||||
"Launch completion after import",
|
||||
|
||||
@@ -24,7 +24,7 @@ from openerp.osv import fields, orm
|
||||
class AccountStatementProfil(orm.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):
|
||||
"""
|
||||
Inherited from parent to add parser.
|
||||
"""
|
||||
@@ -33,14 +33,3 @@ class AccountStatementProfil(orm.Model):
|
||||
context=context)
|
||||
selection.append(('ofx_so', _('OFX - Open Financial Exchange')))
|
||||
return selection
|
||||
|
||||
_columns = {
|
||||
'import_type': fields.selection(
|
||||
get_import_type_selection,
|
||||
'Type of import',
|
||||
required=True,
|
||||
help="Choose here the method by which you want to import bank"
|
||||
"statement for this profile."),
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user