[fix] sales_partner.js, fixes #7553

This commit is contained in:
Rushabh Mehta 2017-01-21 16:57:24 +05:30
parent 2a660fb695
commit 397e508fc0
3 changed files with 6 additions and 3 deletions

View File

@ -118,6 +118,7 @@ def make_timesheet_records():
employees = get_timesheet_based_salary_slip_employee() employees = get_timesheet_based_salary_slip_employee()
for e in employees: for e in employees:
ts = make_timesheet(e.employee, simulate = True, billable = 1, activity_type=get_random("Activity Type")) ts = make_timesheet(e.employee, simulate = True, billable = 1, activity_type=get_random("Activity Type"))
frappe.db.commit()
rand = random.random() rand = random.random()
if rand >= 0.3: if rand >= 0.3:
@ -137,7 +138,8 @@ def make_sales_invoice_for_timesheet(name):
sales_invoice = make_sales_invoice(name) sales_invoice = make_sales_invoice(name)
sales_invoice.customer = get_random("Customer") sales_invoice.customer = get_random("Customer")
sales_invoice.append('items', { sales_invoice.append('items', {
'item_code': get_random("Item", {"has_variants": 0, "is_stock_item": 0, "is_fixed_asset": 0}), 'item_code': get_random("Item", {"has_variants": 0, "is_stock_item": 0,
"is_fixed_asset": 0}),
'qty': 1, 'qty': 1,
'rate': 1000 'rate': 1000
}) })

View File

@ -5,7 +5,7 @@ frappe.ui.form.on('Sales Partner', {
refresh: function(frm) { refresh: function(frm) {
frappe.dynamic_link = {doc: frm.doc, fieldname: 'name', doctype: 'Sales Person'} frappe.dynamic_link = {doc: frm.doc, fieldname: 'name', doctype: 'Sales Person'}
if(doc.__islocal){ if(frm.doc.__islocal){
hide_field(['address_html', 'contact_html']); hide_field(['address_html', 'contact_html']);
erpnext.utils.clear_address_and_contact(frm); erpnext.utils.clear_address_and_contact(frm);
} }

View File

@ -86,7 +86,8 @@
<h3>Comments</h3> <h3>Comments</h3>
<div class="no-comment"> <div class="no-comment">
{% for comment in comments %} {% for comment in comments %}
<p class="text-muted">{{comment.sender_full_name}} : {{comment.subject}} on {{comment.communication_date.strftime('%Y-%m-%d')}}</p> <p class="text-muted">{{comment.sender_full_name}}:
{{comment.subject}} on {{comment.creation.strftime('%Y-%m-%d')}}</p>
{% endfor %} {% endfor %}
</div> </div>
<div class="comment-form-wrapper"> <div class="comment-form-wrapper">