stable
watcha.h 2016-01-13 14:58:57 +07:00
parent 6177a247ad
commit b9a546e4ca
1 changed files with 3 additions and 3 deletions

View File

@ -18,9 +18,9 @@ class Migration(migration.Migration):
]
for hdcase in get_model("clinic.hd.case").search_browse(dom):
nums=hdcase.number.split("-")
if len(nums)==3 and len(nums[2])==6:
run=nums[2]
number='-'.join([nums[0],nums[1]+run[0:2],run[2:]])
if len(nums)==3 and len(nums[1])==4:
run=nums[1]
number='-'.join([nums[0],run[0:2],run[2:],nums[2]])
print('XXX', hdcase.number, ' --> ', number)
hdcase.write({
'number': number,