Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
commit
58932a5812
@ -0,0 +1,7 @@
|
|||||||
|
def execute():
|
||||||
|
import webnotes
|
||||||
|
webnotes.conn.sql("""delete from `tabSearch Criteria` \
|
||||||
|
where name = 'customer_address_contact'""")
|
||||||
|
|
||||||
|
from webnotes.modules import reload_doc
|
||||||
|
reload_doc('selling', 'report', 'customer_addresses_and_contacts')
|
@ -619,4 +619,8 @@ patch_list = [
|
|||||||
'patch_module': 'patches.october_2012',
|
'patch_module': 'patches.october_2012',
|
||||||
'patch_file': 'fix_wrong_vouchers',
|
'patch_file': 'fix_wrong_vouchers',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'patch_module': 'patches.october_2012',
|
||||||
|
'patch_file': 'remove_old_customer_contact_address',
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
@ -170,8 +170,11 @@ erpnext.module_page.make_list = function(module, wrapper) {
|
|||||||
parent: $parent2,
|
parent: $parent2,
|
||||||
method: 'utilities.get_report_list',
|
method: 'utilities.get_report_list',
|
||||||
render_row: function(row, data) {
|
render_row: function(row, data) {
|
||||||
data.report_type = data.is_query_report ? "query-report" : "Report2"
|
data.report_type = data.is_query_report
|
||||||
$(row).html(repl('<a href="#!%(report_type)s/%(ref_doctype)s/%(name)s" \
|
? "query-report"
|
||||||
|
: repl("Report2/%(ref_doctype)s", data)
|
||||||
|
|
||||||
|
$(row).html(repl('<a href="#!%(report_type)s/%(name)s" \
|
||||||
data-doctype="%(ref_doctype)s">\
|
data-doctype="%(ref_doctype)s">\
|
||||||
%(name)s</a>', data))
|
%(name)s</a>', data))
|
||||||
},
|
},
|
||||||
|
0
selling/report/__init__.py
Normal file
0
selling/report/__init__.py
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# Report, Customer Addresses and Contacts
|
||||||
|
[
|
||||||
|
|
||||||
|
# These values are common in all dictionaries
|
||||||
|
{
|
||||||
|
u'creation': '2012-10-04 17:36:36',
|
||||||
|
u'docstatus': 0,
|
||||||
|
u'modified': '2012-10-04 18:24:07',
|
||||||
|
u'modified_by': u'Administrator',
|
||||||
|
u'owner': u'Administrator'
|
||||||
|
},
|
||||||
|
|
||||||
|
# These values are common for all Report
|
||||||
|
{
|
||||||
|
u'doctype': u'Report',
|
||||||
|
'is_standard': u'Yes',
|
||||||
|
u'name': u'__common__',
|
||||||
|
'query': u'SELECT\n\t`tabCustomer`.name as customer_id,\n\t`tabCustomer`.customer_name,\n\t`tabCustomer`.customer_group,\n\t`tabAddress`.address_line1,\n\t`tabAddress`.address_line2,\n\t`tabAddress`.city,\n\t`tabAddress`.state,\n\t`tabAddress`.pincode,\n\t`tabAddress`.country,\n\t`tabAddress`.is_primary_address, \n\t`tabContact`.first_name,\n\t`tabContact`.last_name,\n\t`tabContact`.phone,\n\t`tabContact`.mobile_no,\n\t`tabContact`.email_id,\n\t`tabContact`.is_primary_contact\nFROM\n\t`tabCustomer`\n\tleft join `tabAddress` on (\n\t\t`tabAddress`.customer=`tabCustomer`.name\n\t)\n\tleft join `tabContact` on (\n\t\t`tabContact`.customer=`tabCustomer`.name\n\t)\nWHERE\n\t`tabCustomer`.docstatus<2\nORDER BY\n\t`tabCustomer`.name asc',
|
||||||
|
'ref_doctype': u'Customer'
|
||||||
|
},
|
||||||
|
|
||||||
|
# Report, Customer Addresses and Contacts
|
||||||
|
{
|
||||||
|
u'doctype': u'Report',
|
||||||
|
u'name': u'Customer Addresses and Contacts'
|
||||||
|
}
|
||||||
|
]
|
@ -1 +0,0 @@
|
|||||||
from __future__ import unicode_literals
|
|
@ -1,23 +0,0 @@
|
|||||||
from __future__ import unicode_literals
|
|
||||||
col_defs = [
|
|
||||||
{'label': 'Id', 'type': 'Link', 'width': '', 'options': 'Customer'},
|
|
||||||
{'label': 'Customer Name'},
|
|
||||||
{'label': 'Address Line 1', 'width': '200px'},
|
|
||||||
{'label': 'Address Line 2', 'width': '200px'},
|
|
||||||
{'label': 'City'},
|
|
||||||
{'label': 'State'},
|
|
||||||
{'label': 'Pincode', 'width': '80px'},
|
|
||||||
{'label': 'Country', 'width': '100px'},
|
|
||||||
{'label': 'Contact First Name'},
|
|
||||||
{'label': 'Contact Last Name'},
|
|
||||||
{'label': 'Contact Phone', 'width': '100px'},
|
|
||||||
{'label': 'Contact Mobile', 'width': '100px'},
|
|
||||||
{'label': 'Contact Email'},
|
|
||||||
]
|
|
||||||
webnotes.msgprint(colnames)
|
|
||||||
for col in col_defs:
|
|
||||||
colnames.append(col['label'])
|
|
||||||
coltypes.append(col.get('type') or 'Data')
|
|
||||||
colwidths.append(col.get('width') or '150px')
|
|
||||||
coloptions.append(col.get('options') or '')
|
|
||||||
col_idx[col['label']] = len(colnames) - 1
|
|
@ -1,28 +0,0 @@
|
|||||||
SELECT
|
|
||||||
`tabCustomer`.name,
|
|
||||||
`tabCustomer`.customer_name,
|
|
||||||
`tabAddress`.address_line1,
|
|
||||||
`tabAddress`.address_line2,
|
|
||||||
`tabAddress`.city,
|
|
||||||
`tabAddress`.state,
|
|
||||||
`tabAddress`.pincode,
|
|
||||||
`tabAddress`.country,
|
|
||||||
`tabContact`.first_name,
|
|
||||||
`tabContact`.last_name,
|
|
||||||
`tabContact`.phone,
|
|
||||||
`tabContact`.mobile_no,
|
|
||||||
`tabContact`.email_id
|
|
||||||
FROM
|
|
||||||
`tabCustomer`
|
|
||||||
left join `tabAddress` on (
|
|
||||||
`tabAddress`.customer=`tabCustomer`.name and
|
|
||||||
ifnull(`tabAddress`.is_primary_address, 0)=1
|
|
||||||
)
|
|
||||||
left join `tabContact` on (
|
|
||||||
`tabContact`.customer=`tabCustomer`.name and
|
|
||||||
ifnull(`tabContact`.is_primary_contact, 0)=1
|
|
||||||
)
|
|
||||||
WHERE
|
|
||||||
`tabCustomer`.docstatus<2
|
|
||||||
ORDER BY
|
|
||||||
`tabCustomer`.customer_name asc
|
|
@ -1,31 +0,0 @@
|
|||||||
# Search Criteria, customer_address_contact
|
|
||||||
[
|
|
||||||
|
|
||||||
# These values are common in all dictionaries
|
|
||||||
{
|
|
||||||
'creation': '2012-04-17 11:29:10',
|
|
||||||
'docstatus': 0,
|
|
||||||
'modified': '2012-05-23 18:17:40',
|
|
||||||
'modified_by': u'Administrator',
|
|
||||||
'owner': u'Administrator'
|
|
||||||
},
|
|
||||||
|
|
||||||
# These values are common for all Search Criteria
|
|
||||||
{
|
|
||||||
'columns': u'Customer\x01ID,Customer\x01Customer Name',
|
|
||||||
'criteria_name': u'Customer Address Contact',
|
|
||||||
'doc_type': u'Customer',
|
|
||||||
'doctype': 'Search Criteria',
|
|
||||||
'filters': u"{'Customer\x01Saved':1,'Customer\x01Submitted':1}",
|
|
||||||
'module': u'Selling',
|
|
||||||
'name': '__common__',
|
|
||||||
'page_len': 50,
|
|
||||||
'standard': u'Yes'
|
|
||||||
},
|
|
||||||
|
|
||||||
# Search Criteria, customer_address_contact
|
|
||||||
{
|
|
||||||
'doctype': 'Search Criteria',
|
|
||||||
'name': u'customer_address_contact'
|
|
||||||
}
|
|
||||||
]
|
|
Loading…
Reference in New Issue
Block a user