mirror of
https://github.com/NaN-tic/trytond-csv_import.git
synced 2023-12-14 02:02:55 +01:00
Post Import method. Change model to profile paramether
This commit is contained in:
parent
75012d9ab7
commit
7c4bfdb6e4
|
@ -231,11 +231,10 @@ class CSVArchive(Workflow, ModelSQL, ModelView):
|
|||
return values
|
||||
|
||||
@classmethod
|
||||
def post_import(cls, model, records):
|
||||
def post_import(cls, profile, records):
|
||||
""" This method is made to be overridden and execute something with
|
||||
imported records after import them. At the end of the inherited
|
||||
@param cr: The database cursor,
|
||||
@param model: base object
|
||||
@param profile: profile object
|
||||
@param records: List of id records.
|
||||
"""
|
||||
pass
|
||||
|
@ -370,7 +369,7 @@ class CSVArchive(Workflow, ModelSQL, ModelView):
|
|||
logs.append(cls.raise_user_error('success_simulation',
|
||||
raise_exception=False))
|
||||
|
||||
cls.post_import(Base, new_records)
|
||||
cls.post_import(profile, new_records)
|
||||
cls.write([archive], {'logs': '\n'.join(logs)})
|
||||
|
||||
@classmethod
|
||||
|
|
Loading…
Reference in a new issue