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