mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 22:49:19 +00:00
chore: remove all six compat code
This commit is contained in:
@@ -7,7 +7,6 @@ import json
|
||||
import frappe
|
||||
from frappe.model.document import Document
|
||||
from frappe.utils.jinja import validate_template
|
||||
from six import string_types
|
||||
|
||||
|
||||
class ContractTemplate(Document):
|
||||
@@ -17,7 +16,7 @@ class ContractTemplate(Document):
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_contract_template(template_name, doc):
|
||||
if isinstance(doc, string_types):
|
||||
if isinstance(doc, str):
|
||||
doc = json.loads(doc)
|
||||
|
||||
contract_template = frappe.get_doc("Contract Template", template_name)
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
def get_data():
|
||||
return {
|
||||
'fieldname': 'lead',
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
def get_data():
|
||||
return {
|
||||
'fieldname': 'opportunity',
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
import frappe
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import frappe
|
||||
import pandas
|
||||
from frappe import _
|
||||
from frappe.utils import flt
|
||||
from six import iteritems
|
||||
|
||||
from erpnext.setup.utils import get_exchange_rate
|
||||
|
||||
@@ -126,7 +125,7 @@ class OpportunitySummaryBySalesStage(object):
|
||||
self.data = []
|
||||
self.get_formatted_data()
|
||||
|
||||
for based_on,data in iteritems(self.formatted_data):
|
||||
for based_on,data in self.formatted_data.items():
|
||||
row_based_on={
|
||||
'Opportunity Owner': 'opportunity_owner',
|
||||
'Source': 'source',
|
||||
@@ -251,4 +250,4 @@ class OpportunitySummaryBySalesStage(object):
|
||||
if data.get('currency') != default_currency:
|
||||
opportunity_currency = data.get('currency')
|
||||
value = self.currency_conversion(opportunity_currency,default_currency)
|
||||
data['amount'] = data['amount'] * value
|
||||
data['amount'] = data['amount'] * value
|
||||
|
||||
@@ -9,7 +9,6 @@ import pandas
|
||||
from dateutil.relativedelta import relativedelta
|
||||
from frappe import _
|
||||
from frappe.utils import cint, flt
|
||||
from six import iteritems
|
||||
|
||||
from erpnext.setup.utils import get_exchange_rate
|
||||
|
||||
@@ -295,7 +294,7 @@ class SalesPipelineAnalytics(object):
|
||||
|
||||
def append_data(self, pipeline_by, period_by):
|
||||
self.data = []
|
||||
for pipeline,period_data in iteritems(self.periodic_data):
|
||||
for pipeline,period_data in self.periodic_data.items():
|
||||
row = {pipeline_by : pipeline}
|
||||
for info in self.query_result:
|
||||
if self.filters.get('range') == 'Monthly':
|
||||
@@ -330,4 +329,4 @@ class SalesPipelineAnalytics(object):
|
||||
if data.get('currency') != default_currency:
|
||||
opportunity_currency = data.get('currency')
|
||||
value = self.get_currency_rate(opportunity_currency,default_currency)
|
||||
data['amount'] = data['amount'] * value
|
||||
data['amount'] = data['amount'] * value
|
||||
|
||||
Reference in New Issue
Block a user