mirror of
https://github.com/erpnext/foundation.git
synced 2026-10-16 09:50:47 +02:00
Merge pull request #477 from erpnext/compatibility-fixes
fix: Compatibility fixes for Frappe v13, develop & Py3
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe.model.document import Document
|
||||
from frappe.website.utils import get_comment_list
|
||||
from frappe.utils import date_diff, nowdate, fmt_money, add_months
|
||||
from frappe.website.utils import get_comment_list
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
class TestBounty(unittest.TestCase):
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
class TestConferenceParticipant(unittest.TestCase):
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe.model.document import Document
|
||||
|
||||
class ConferenceSettings(Document):
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
class TestConferenceTalkProposal(unittest.TestCase):
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
class TestDeveloperSprint(unittest.TestCase):
|
||||
|
||||
@@ -14,8 +14,8 @@ class ESoCApplicant(Document):
|
||||
self.validate_agreement_check()
|
||||
|
||||
def validate_email_type(self, email):
|
||||
from frappe.utils import validate_email_add
|
||||
validate_email_add(email.strip(), True)
|
||||
from frappe.utils import validate_email_address
|
||||
validate_email_address(email.strip(), True)
|
||||
|
||||
def validate_dob(self):
|
||||
from frappe.utils import now_datetime, getdate
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe.model.document import Document
|
||||
|
||||
class ESoCProjectDetail(Document):
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
class TestFoundationFellowship(unittest.TestCase):
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
from __future__ import unicode_literals
|
||||
# import frappe
|
||||
from frappe.model.document import Document
|
||||
from frappe.website.render import clear_cache as clear_website_cache
|
||||
from frappe.website.utils import clear_cache as clear_website_cache
|
||||
|
||||
class FoundationProject(Document):
|
||||
def validate(self):
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe.website.website_generator import WebsiteGenerator
|
||||
|
||||
class FrappeApp(WebsiteGenerator):
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
class TestFrappeApp(unittest.TestCase):
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
from frappe.website.website_generator import WebsiteGenerator
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
# test_records = frappe.get_test_records('Portal Event')
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
# test_records = frappe.get_test_records('Portal Job')
|
||||
|
||||
@@ -25,6 +25,6 @@ def get_last_login_diff(user):
|
||||
Returns difference between todays date and last login date
|
||||
"""
|
||||
last_login = frappe.db.get_value("User", user, ["last_login"])
|
||||
for x in xrange(1,10):
|
||||
for x in range(1,10):
|
||||
print((get_datetime() - get_datetime(last_login)).days, user)
|
||||
return (get_datetime() - get_datetime(last_login)).days
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
# test_records = frappe.get_test_records('Service Provider')
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
|
||||
def get_context(context):
|
||||
# do your magic here
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
|
||||
def get_context(context):
|
||||
# do your magic here
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
|
||||
def get_context(context):
|
||||
# do your magic here
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
|
||||
def get_context(context):
|
||||
# do your magic here
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
|
||||
def get_context(context):
|
||||
# do your magic here
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
|
||||
def get_context(context):
|
||||
# do your magic here
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
|
||||
def get_context(context):
|
||||
# do your magic here
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
|
||||
def get_context(context):
|
||||
# do your magic here
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
|
||||
def get_context(context):
|
||||
# do your magic here
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
|
||||
def get_context(context):
|
||||
# do your magic here
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
|
||||
def get_context(context):
|
||||
# do your magic here
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import datetime
|
||||
from frappe.utils import fmt_money
|
||||
|
||||
def get_context(context):
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
|
||||
def get_context(context):
|
||||
# do your magic here
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
|
||||
def get_context(context):
|
||||
# do your magic here
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
|
||||
def get_context(context):
|
||||
# do your magic here
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
|
||||
def get_context(context):
|
||||
# do your magic here
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import frappe
|
||||
|
||||
def migrate():
|
||||
pass
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import frappe
|
||||
|
||||
def get_context(context):
|
||||
context.schedules = [
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import frappe
|
||||
import foundation
|
||||
|
||||
no_cache = 1
|
||||
def get_context(context):
|
||||
|
||||
Reference in New Issue
Block a user