Merge branch 'develop' of https://github.com/frappe/erpnext into youtube-analytics

This commit is contained in:
marination 2020-08-02 05:37:30 +05:30
commit ddc2be36ab
4 changed files with 31 additions and 31 deletions

View File

@ -1084,7 +1084,7 @@
"idx": 105, "idx": 105,
"is_submittable": 1, "is_submittable": 1,
"links": [], "links": [],
"modified": "2020-07-18 05:09:33.800633", "modified": "2020-07-31 14:13:44.610190",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Buying", "module": "Buying",
"name": "Purchase Order", "name": "Purchase Order",
@ -1135,5 +1135,5 @@
"sort_field": "modified", "sort_field": "modified",
"sort_order": "DESC", "sort_order": "DESC",
"timeline_field": "supplier", "timeline_field": "supplier",
"title_field": "title" "title_field": "supplier"
} }

View File

@ -1,8 +1,5 @@
import traceback import traceback
import pycountry
import taxjar
import frappe import frappe
from erpnext import get_default_company from erpnext import get_default_company
from frappe import _ from frappe import _
@ -32,6 +29,7 @@ def get_client():
def create_transaction(doc, method): def create_transaction(doc, method):
import taxjar
"""Create an order transaction in TaxJar""" """Create an order transaction in TaxJar"""
if not TAXJAR_CREATE_TRANSACTIONS: if not TAXJAR_CREATE_TRANSACTIONS:
@ -208,6 +206,7 @@ def get_shipping_address_details(doc):
def get_iso_3166_2_state_code(address): def get_iso_3166_2_state_code(address):
import pycountry
country_code = frappe.db.get_value("Country", address.get("country"), "code") country_code = frappe.db.get_value("Country", address.get("country"), "code")
error_message = _("""{0} is not a valid state! Check for typos or enter the ISO code for your state.""").format(address.get("state")) error_message = _("""{0} is not a valid state! Check for typos or enter the ISO code for your state.""").format(address.get("state"))

View File

@ -96,33 +96,35 @@ def get_data(filters):
def get_parent_row(sp_jo_map, sp, jo_ja_map, ja_joff_map): def get_parent_row(sp_jo_map, sp, jo_ja_map, ja_joff_map):
data = [] data = []
for jo in sp_jo_map[sp]: if sp in sp_jo_map.keys():
row = { for jo in sp_jo_map[sp]:
"staffing_plan" : sp, row = {
"job_opening" : jo["name"], "staffing_plan" : sp,
} "job_opening" : jo["name"],
data.append(row) }
child_row = get_child_row( jo["name"], jo_ja_map, ja_joff_map) data.append(row)
data += child_row child_row = get_child_row( jo["name"], jo_ja_map, ja_joff_map)
data += child_row
return data return data
def get_child_row(jo, jo_ja_map, ja_joff_map): def get_child_row(jo, jo_ja_map, ja_joff_map):
data = [] data = []
for ja in jo_ja_map[jo]: if jo in jo_ja_map.keys():
row = { for ja in jo_ja_map[jo]:
"indent":1, row = {
"job_applicant": ja.name, "indent":1,
"applicant_name": ja.applicant_name, "job_applicant": ja.name,
"application_status": ja.status, "applicant_name": ja.applicant_name,
} "application_status": ja.status,
if ja.name in ja_joff_map.keys(): }
jo_detail =ja_joff_map[ja.name][0] if ja.name in ja_joff_map.keys():
row["job_offer"] = jo_detail.name jo_detail =ja_joff_map[ja.name][0]
row["job_offer_status"] = jo_detail.status row["job_offer"] = jo_detail.name
row["offer_date"]= jo_detail.offer_date.strftime("%d-%m-%Y") row["job_offer_status"] = jo_detail.status
row["designation"] = jo_detail.designation row["offer_date"]= jo_detail.offer_date.strftime("%d-%m-%Y")
row["designation"] = jo_detail.designation
data.append(row) data.append(row)
return data return data
def get_staffing_plan(filters): def get_staffing_plan(filters):
@ -177,7 +179,7 @@ def get_job_applicant(jo_list):
def get_job_offer(ja_list): def get_job_offer(ja_list):
ja_joff_map = {} ja_joff_map = {}
offers = frappe.get_all("Job offer", filters = [["job_applicant", "IN", ja_list]], fields =["name", "job_applicant", "status", 'offer_date', 'designation']) offers = frappe.get_all("Job Offer", filters = [["job_applicant", "IN", ja_list]], fields =["name", "job_applicant", "status", 'offer_date', 'designation'])
for offer in offers: for offer in offers:
if offer.job_applicant not in ja_joff_map.keys(): if offer.job_applicant not in ja_joff_map.keys():

View File

@ -1,7 +1,6 @@
{ {
"actions": [], "actions": [],
"allow_import": 1, "allow_import": 1,
"allow_workflow": 1,
"autoname": "naming_series:", "autoname": "naming_series:",
"creation": "2013-06-18 12:39:59", "creation": "2013-06-18 12:39:59",
"doctype": "DocType", "doctype": "DocType",
@ -1461,7 +1460,7 @@
"idx": 105, "idx": 105,
"is_submittable": 1, "is_submittable": 1,
"links": [], "links": [],
"modified": "2020-07-18 05:13:06.680696", "modified": "2020-07-31 14:13:17.962015",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Selling", "module": "Selling",
"name": "Sales Order", "name": "Sales Order",
@ -1535,7 +1534,7 @@
"sort_field": "modified", "sort_field": "modified",
"sort_order": "DESC", "sort_order": "DESC",
"timeline_field": "customer", "timeline_field": "customer",
"title_field": "title", "title_field": "customer",
"track_changes": 1, "track_changes": 1,
"track_seen": 1 "track_seen": 1
} }