clinic/netforce_clinic/migrations/validate_cycle_item.py

20 lines
561 B
Python

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 Migration(migration.Migration):
_name="clinic.validate.cycle.item"
_version="2.12.5"
def migrate(self):
set_active_company(1)
set_active_user(1)
for citem in get_model("clinic.cycle.item").search_browse([['date','>=','2016-11-10'],['date','<=','2016-11-15']]):
citem.validate()
Migration.register()