I want to override/extend the execute_import from the model base_import.import.
Base Code:
class Import(models.TransientModel):
_name = 'base_import.import'
def execute_import(self, fields, columns, options, dryrun=False):
//some code
import_result = model.load(import_fields, merged_data)
return import_result
From the above code, i want to override and do some of my own logic using 'import_result'.
Here's what I've done(Inherited code):
class Import(models.TransientModel):
_inherit = 'base_import.import
def execute_import(self, fields, columns, options, dryrun=False):
res_import = super(Import, self).execute_import(fields, columns, options, dryrun)
// here i need to use import_result values
result = import_result.get('ids')
How to access import_result in inherited method.
Thank you