mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 08:54:45 +00:00
Merge branch 'develop' of https://github.com/frappe/erpnext into e-commerce-refactor-develop
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
## temp utility
|
||||
from __future__ import print_function, unicode_literals
|
||||
|
||||
import frappe
|
||||
from frappe.utils import cstr
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
from frappe import _
|
||||
from six import iteritems
|
||||
|
||||
import erpnext
|
||||
|
||||
@@ -46,7 +44,7 @@ def get_level():
|
||||
"Work Order": 5
|
||||
}
|
||||
|
||||
for doctype, min_count in iteritems(doctypes):
|
||||
for doctype, min_count in doctypes.items():
|
||||
count = frappe.db.count(doctype)
|
||||
if count > min_count:
|
||||
activation_level += 1
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
from frappe import _
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
from frappe.model.document import Document
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from frappe.model.document import Document
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import unittest
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
# import frappe
|
||||
import unittest
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import re
|
||||
from datetime import datetime
|
||||
@@ -12,7 +10,6 @@ import pytz
|
||||
from frappe import _
|
||||
from frappe.model.document import Document
|
||||
from pyyoutube import Api
|
||||
from six import string_types
|
||||
|
||||
|
||||
class Video(Document):
|
||||
@@ -89,7 +86,7 @@ def get_id_from_url(url):
|
||||
Returns video id from url
|
||||
:param youtube url: String URL
|
||||
"""
|
||||
if not isinstance(url, string_types):
|
||||
if not isinstance(url, str):
|
||||
frappe.throw(_("URL can only be a string"), title=_("Invalid URL"))
|
||||
|
||||
pattern = re.compile(r'[a-z\:\//\.]+(youtube|youtu)\.(com|be)/(watch\?v=|embed/|.+\?v=)?([^"&?\s]{11})?')
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
# import frappe
|
||||
import unittest
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
from apiclient.discovery import build
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# MIT License. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
from frappe import _
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
from frappe import _
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import frappe.share
|
||||
from frappe import _
|
||||
from frappe.utils import cint, cstr, flt, get_time, now_datetime
|
||||
from six import string_types
|
||||
|
||||
from erpnext.controllers.status_updater import StatusUpdater
|
||||
|
||||
@@ -179,7 +177,7 @@ def delete_events(ref_type, ref_name):
|
||||
frappe.delete_doc("Event", events, for_reload=True)
|
||||
|
||||
def validate_uom_is_integer(doc, uom_field, qty_fields, child_dt=None):
|
||||
if isinstance(qty_fields, string_types):
|
||||
if isinstance(qty_fields, str):
|
||||
qty_fields = [qty_fields]
|
||||
|
||||
distinct_uoms = list(set(d.get(uom_field) for d in doc.get_all_children()))
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
|
||||
def get_context(context):
|
||||
# do your magic here
|
||||
context.show_sidebar = True
|
||||
|
||||
@@ -1,19 +1,12 @@
|
||||
{
|
||||
"category": "",
|
||||
"charts": [],
|
||||
"content": "[{\"type\": \"header\", \"data\": {\"text\": \"Reports & Masters\", \"level\": 4, \"col\": 12}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Video\", \"col\": 4}}]",
|
||||
"creation": "2020-09-10 12:21:22.335307",
|
||||
"developer_mode_only": 0,
|
||||
"disable_user_customization": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "Workspace",
|
||||
"extends": "",
|
||||
"extends_another_page": 0,
|
||||
"for_user": "",
|
||||
"hide_custom": 0,
|
||||
"idx": 0,
|
||||
"is_default": 0,
|
||||
"is_standard": 0,
|
||||
"label": "Utilities",
|
||||
"links": [
|
||||
{
|
||||
@@ -47,15 +40,12 @@
|
||||
"type": "Link"
|
||||
}
|
||||
],
|
||||
"modified": "2021-08-05 12:16:03.350804",
|
||||
"modified": "2021-08-05 12:16:03.350805",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Utilities",
|
||||
"name": "Utilities",
|
||||
"onboarding": "",
|
||||
"owner": "user@erpnext.com",
|
||||
"parent_page": "",
|
||||
"pin_to_bottom": 0,
|
||||
"pin_to_top": 0,
|
||||
"public": 1,
|
||||
"restrict_to_domain": "",
|
||||
"roles": [],
|
||||
|
||||
Reference in New Issue
Block a user