mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 19:59:12 +00:00
Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
@@ -44,11 +44,18 @@ class DocType(TransactionBase):
|
|||||||
# Get party details
|
# Get party details
|
||||||
#------------------
|
#------------------
|
||||||
def get_party_det(self):
|
def get_party_det(self):
|
||||||
party_det=sql("Select pan_number, address from `tabAccount` where name = '%s'" % self.doc.party_name)
|
party_det=sql("select master_type, master_name from `tabAccount` where name='%s'" % self.doc.party_name)
|
||||||
|
if party_det and party_det[0][0]=='Supplier':
|
||||||
|
try:
|
||||||
|
rec = sql("select name, address_line1, address_line2, city, country, pincode, state from `tabAddress` where supplier = '%s' and docstatus != 2 order by is_primary_address desc limit 1" %(party_det[0][1]), as_dict = 1)
|
||||||
|
address_display = cstr((rec[0]['address_line1'] and rec[0]['address_line1'] or '')) + cstr((rec[0]['address_line2'] and '\n' + rec[0]['address_line2'] or '')) + cstr((rec[0]['city'] and '\n'+rec[0]['city'] or '')) + cstr((rec[0]['pincode'] and '\n' + rec[0]['pincode'] or '')) + cstr((rec[0]['state'] and '\n'+rec[0]['state'] or '')) + cstr((rec[0]['country'] and '\n'+rec[0]['country'] or ''))
|
||||||
|
except:
|
||||||
|
address_display = ''
|
||||||
|
|
||||||
ret = {
|
ret = {
|
||||||
'pan_number': cstr(party_det[0][0]) ,
|
'party_address': cstr(address_display)
|
||||||
'party_address': cstr(party_det[0][1])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return cstr(ret)
|
return cstr(ret)
|
||||||
|
|
||||||
# Get TDS Return acknowledgement
|
# Get TDS Return acknowledgement
|
||||||
|
|||||||
@@ -3,16 +3,16 @@
|
|||||||
|
|
||||||
# These values are common in all dictionaries
|
# These values are common in all dictionaries
|
||||||
{
|
{
|
||||||
'creation': '2011-02-10 14:10:08',
|
'creation': '2011-02-17 13:25:56',
|
||||||
'docstatus': 0,
|
'docstatus': 0,
|
||||||
'modified': '2011-02-17 13:44:37',
|
'modified': '2011-07-08 13:28:15',
|
||||||
'modified_by': 'Administrator',
|
'modified_by': 'Administrator',
|
||||||
'owner': 'Administrator'
|
'owner': 'Administrator'
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocType
|
# These values are common for all DocType
|
||||||
{
|
{
|
||||||
'_last_update': '1305714022',
|
'_last_update': '1310019491',
|
||||||
'autoname': 'LAP/.#####',
|
'autoname': 'LAP/.#####',
|
||||||
'colour': 'White:FFF',
|
'colour': 'White:FFF',
|
||||||
'doctype': 'DocType',
|
'doctype': 'DocType',
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
'show_in_menu': 0,
|
'show_in_menu': 0,
|
||||||
'subject': 'From %(employee_name)s, %(designation)s',
|
'subject': 'From %(employee_name)s, %(designation)s',
|
||||||
'tag_fields': 'leave_type',
|
'tag_fields': 'leave_type',
|
||||||
'version': 18
|
'version': 17
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocField
|
# These values are common for all DocField
|
||||||
@@ -54,37 +54,24 @@
|
|||||||
|
|
||||||
# DocPerm
|
# DocPerm
|
||||||
{
|
{
|
||||||
'amend': 1,
|
'amend': 0,
|
||||||
'cancel': 1,
|
'cancel': 0,
|
||||||
'create': 1,
|
'create': 1,
|
||||||
'doctype': 'DocPerm',
|
'doctype': 'DocPerm',
|
||||||
'idx': 1,
|
'idx': 1,
|
||||||
'match': 'owner',
|
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'submit': 1,
|
'role': 'Employee',
|
||||||
|
'submit': 0,
|
||||||
'write': 1
|
'write': 1
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocPerm
|
|
||||||
{
|
|
||||||
'amend': 0,
|
|
||||||
'cancel': 0,
|
|
||||||
'create': 0,
|
|
||||||
'doctype': 'DocPerm',
|
|
||||||
'idx': 2,
|
|
||||||
'match': 'owner',
|
|
||||||
'permlevel': 0,
|
|
||||||
'submit': 0,
|
|
||||||
'write': 0
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocPerm
|
# DocPerm
|
||||||
{
|
{
|
||||||
'amend': 1,
|
'amend': 1,
|
||||||
'cancel': 1,
|
'cancel': 1,
|
||||||
'create': 1,
|
'create': 1,
|
||||||
'doctype': 'DocPerm',
|
'doctype': 'DocPerm',
|
||||||
'idx': 3,
|
'idx': 2,
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'role': 'HR User',
|
'role': 'HR User',
|
||||||
'submit': 1,
|
'submit': 1,
|
||||||
@@ -97,7 +84,7 @@
|
|||||||
'cancel': 1,
|
'cancel': 1,
|
||||||
'create': 1,
|
'create': 1,
|
||||||
'doctype': 'DocPerm',
|
'doctype': 'DocPerm',
|
||||||
'idx': 4,
|
'idx': 3,
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'role': 'HR Manager',
|
'role': 'HR Manager',
|
||||||
'submit': 1,
|
'submit': 1,
|
||||||
@@ -106,24 +93,33 @@
|
|||||||
|
|
||||||
# DocPerm
|
# DocPerm
|
||||||
{
|
{
|
||||||
|
'amend': 0,
|
||||||
|
'cancel': 0,
|
||||||
|
'create': 0,
|
||||||
'doctype': 'DocPerm',
|
'doctype': 'DocPerm',
|
||||||
'idx': 5,
|
'idx': 4,
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
'role': 'HR User'
|
'role': 'HR User',
|
||||||
|
'submit': 0,
|
||||||
|
'write': 0
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocPerm
|
# DocPerm
|
||||||
{
|
{
|
||||||
|
'amend': 0,
|
||||||
|
'cancel': 0,
|
||||||
|
'create': 0,
|
||||||
'doctype': 'DocPerm',
|
'doctype': 'DocPerm',
|
||||||
'idx': 6,
|
'idx': 5,
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
'role': 'HR Manager'
|
'role': 'HR Manager',
|
||||||
|
'submit': 0,
|
||||||
|
'write': 0
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'column_break1',
|
|
||||||
'fieldtype': 'Column Break',
|
'fieldtype': 'Column Break',
|
||||||
'idx': 1,
|
'idx': 1,
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
@@ -211,7 +207,6 @@
|
|||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'column_break8',
|
|
||||||
'fieldtype': 'Column Break',
|
'fieldtype': 'Column Break',
|
||||||
'idx': 8,
|
'idx': 8,
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
@@ -275,12 +270,23 @@
|
|||||||
'width': '300px'
|
'width': '300px'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': 'DocField',
|
||||||
|
'fieldname': 'letter_head',
|
||||||
|
'fieldtype': 'Link',
|
||||||
|
'idx': 14,
|
||||||
|
'label': 'Letter Head',
|
||||||
|
'options': 'Letter Head',
|
||||||
|
'permlevel': 0
|
||||||
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'amended_from',
|
'fieldname': 'amended_from',
|
||||||
'fieldtype': 'Data',
|
'fieldtype': 'Data',
|
||||||
'idx': 14,
|
'idx': 15,
|
||||||
'label': 'Amended From',
|
'label': 'Amended From',
|
||||||
'permlevel': 1
|
'permlevel': 1
|
||||||
},
|
},
|
||||||
@@ -290,7 +296,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'amendment_date',
|
'fieldname': 'amendment_date',
|
||||||
'fieldtype': 'Date',
|
'fieldtype': 'Date',
|
||||||
'idx': 15,
|
'idx': 16,
|
||||||
'label': 'Amendment Date',
|
'label': 'Amendment Date',
|
||||||
'permlevel': 1
|
'permlevel': 1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# REMEMBER to update this
|
# REMEMBER to update this
|
||||||
# ========================
|
# ========================
|
||||||
|
|
||||||
last_patch = 320
|
last_patch = 322
|
||||||
|
|
||||||
#-------------------------------------------
|
#-------------------------------------------
|
||||||
|
|
||||||
@@ -1281,3 +1281,7 @@ def execute(patch_no):
|
|||||||
sql("delete from tabFeed where doc_name like 'New %'")
|
sql("delete from tabFeed where doc_name like 'New %'")
|
||||||
elif patch_no == 320:
|
elif patch_no == 320:
|
||||||
reload_doc('setup', 'doctype', 'series_detail')
|
reload_doc('setup', 'doctype', 'series_detail')
|
||||||
|
elif patch_no == 321:
|
||||||
|
reload_doc('hr','doctype','leave_application')
|
||||||
|
elif patch_no == 322:
|
||||||
|
sql("delete from `tabDocField` where parent = 'Leave Application' and fieldname = 'latter_head'")
|
||||||
|
|||||||
@@ -58,7 +58,8 @@ class DocType:
|
|||||||
|
|
||||||
# Company
|
# Company
|
||||||
master_dict = {'Company':{'company_name':company_name,
|
master_dict = {'Company':{'company_name':company_name,
|
||||||
'abbr':comp_abbr
|
'abbr':comp_abbr,
|
||||||
|
'default_currency':currency
|
||||||
}}
|
}}
|
||||||
self.create_records(master_dict)
|
self.create_records(master_dict)
|
||||||
|
|
||||||
@@ -74,7 +75,9 @@ class DocType:
|
|||||||
'pr_required':'No',
|
'pr_required':'No',
|
||||||
'emp_created_by':'Naming Series',
|
'emp_created_by':'Naming Series',
|
||||||
'cust_master_name':'Customer Name',
|
'cust_master_name':'Customer Name',
|
||||||
'supp_master_name':'Supplier Name'}
|
'supp_master_name':'Supplier Name',
|
||||||
|
'default_currency_format': (currency=='INR') and 'Lacs' or 'Millions'
|
||||||
|
}
|
||||||
|
|
||||||
# Set
|
# Set
|
||||||
self.set_defaults(def_args)
|
self.set_defaults(def_args)
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class SupportMailbox(POP3Mailbox):
|
|||||||
|
|
||||||
st = get_obj('Support Ticket', thread_id)
|
st = get_obj('Support Ticket', thread_id)
|
||||||
st.make_response_record(content, mail.mail['From'], content_type)
|
st.make_response_record(content, mail.mail['From'], content_type)
|
||||||
webnotes.conn.set(st.doc, 'status', 'To Reply')
|
webnotes.conn.set(st.doc, 'status', 'Open')
|
||||||
update_feed(st.doc)
|
update_feed(st.doc)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -62,3 +62,9 @@ def get_support_mails():
|
|||||||
Gets new emails from support inbox and updates / creates Support Ticket records
|
Gets new emails from support inbox and updates / creates Support Ticket records
|
||||||
"""
|
"""
|
||||||
SupportMailbox().get_messages()
|
SupportMailbox().get_messages()
|
||||||
|
|
||||||
|
def auto_close_tickets():
|
||||||
|
"""
|
||||||
|
Auto Closes Waiting for Customer Support Ticket after 15 days
|
||||||
|
"""
|
||||||
|
webnotes.conn.sql("update `tabSupport Ticket` set status = 'Closed' where status = 'Waiting for Customer' and date_sub(curdate(),interval 15 Day) > modified")
|
||||||
|
|||||||
Reference in New Issue
Block a user