You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
420 B
20 lines
420 B
# coding=utf-8
|
|
import os
|
|
import django
|
|
import sys
|
|
|
|
sys.path.append("/var/www/projects/codemy/")
|
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "lms.settings")
|
|
django.setup()
|
|
|
|
from finance.models import Bill
|
|
|
|
for i in Bill.objects.filter(manager__is_admin=True):
|
|
i.opener = i.manager
|
|
i.manager = None
|
|
i.save()
|
|
|
|
for i in Bill.objects.filter(manager__in_role__in=['M', 'S']):
|
|
i._method = 'S'
|
|
i.save()
|
|
|
|
|