24 lines
742 B
Python
24 lines
742 B
Python
import time
|
|
import csv
|
|
import xlrd
|
|
|
|
from netforce.model import get_model
|
|
from netforce import migration
|
|
from netforce.access import set_active_user, set_active_company
|
|
from netforce.database import get_connection
|
|
|
|
class PatientMove(migration.Migration):
|
|
_name="clinic.patient.move"
|
|
_version="2.12.6"
|
|
|
|
def migrate(self):
|
|
set_active_company(1)
|
|
set_active_user(1)
|
|
datenow=time.strftime("%Y-%m-%d")
|
|
datenow='2017-05-01'
|
|
get_model('clinic.patient.move').auto_get_data(context={'date': datenow})
|
|
#for patient in get_model("clinic.patient").search_browse([],order="department_id"):
|
|
#print(patient.name, patient.location, patient.department_id.name)
|
|
|
|
PatientMove.register()
|