23 lines
587 B
Python
23 lines
587 B
Python
|
from netforce.model import get_model
|
||
|
from netforce import migration
|
||
|
|
||
|
class Migration(migration.Migration):
|
||
|
_name="import.acc"
|
||
|
_version="2.10.0"
|
||
|
|
||
|
def migrate(self):
|
||
|
cbv_id=24
|
||
|
cbv=get_model("conv.bal").browse(cbv_id)
|
||
|
cbv.write({
|
||
|
'file': 'tb.csv',
|
||
|
})
|
||
|
print("import acc file (step 1) running ...")
|
||
|
cbv.write({
|
||
|
'file': 'ar.csv',
|
||
|
})
|
||
|
print("import sale file (step 2)running ...")
|
||
|
get_model("conv.bal").import_sale_file([cbv.id],context={})
|
||
|
return True
|
||
|
|
||
|
Migration.register()
|