Browse Source

fix(minor): update routes

develop
Rushabh Mehta 4 years ago
parent
commit
542bc01718
  1. 6
      erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py
  2. 8
      erpnext/assets/doctype/asset/asset.py
  3. 2
      erpnext/buying/doctype/supplier_quotation/supplier_quotation.py
  4. 2
      erpnext/config/education.py
  5. 6
      erpnext/config/projects.py
  6. 2
      erpnext/education/doctype/assessment_result_tool/assessment_result_tool.js
  7. 2
      erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.js
  8. 2
      erpnext/education/doctype/program_enrollment/program_enrollment.py
  9. 4
      erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.js
  10. 2
      erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.js
  11. 2
      erpnext/healthcare/doctype/inpatient_record/inpatient_record.py
  12. 4
      erpnext/healthcare/doctype/patient_appointment/patient_appointment.py
  13. 10
      erpnext/healthcare/utils.py
  14. 2
      erpnext/hr/doctype/employee_transfer/employee_transfer.py
  15. 2
      erpnext/hr/doctype/leave_allocation/leave_allocation.py
  16. 2
      erpnext/hr/doctype/leave_application/leave_application.py
  17. 2
      erpnext/hr/doctype/shift_request/shift_request.py
  18. 2
      erpnext/hr/utils.py
  19. 2
      erpnext/manufacturing/doctype/bom/bom.js
  20. 4
      erpnext/manufacturing/doctype/bom/bom_item_preview.html
  21. 4
      erpnext/manufacturing/doctype/production_plan/production_plan.py
  22. 4
      erpnext/manufacturing/report/bom_stock_report/bom_stock_report.js
  23. 2
      erpnext/payroll/doctype/payroll_period/payroll_period.py
  24. 2
      erpnext/projects/doctype/task/task_list.js
  25. 4
      erpnext/public/js/call_popup/call_popup.js
  26. 2
      erpnext/public/js/communication.js
  27. 6
      erpnext/public/js/education/assessment_result_tool.html
  28. 4
      erpnext/selling/doctype/sales_order/sales_order.js
  29. 20
      erpnext/selling/page/point_of_sale/pos_controller.js
  30. 1
      erpnext/setup/page/welcome_to_erpnext/welcome_to_erpnext.html
  31. 2
      erpnext/stock/dashboard/item_dashboard.js
  32. 2
      erpnext/stock/doctype/batch/batch.js
  33. 4
      erpnext/stock/doctype/item/item.js
  34. 2
      erpnext/stock/doctype/item/item.py
  35. 2
      erpnext/stock/doctype/item_price/item_price.js
  36. 2
      erpnext/support/doctype/issue/issue.js
  37. 2
      erpnext/support/doctype/issue/issue.py
  38. 4
      erpnext/utilities/bot.py

6
erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py

@ -64,11 +64,11 @@ class OpeningInvoiceCreationTool(Document):
prepare_invoice_summary(doctype, invoices)
return invoices_summary, max_count
def validate_company(self):
if not self.company:
frappe.throw(_("Please select the Company"))
def set_missing_values(self, row):
row.qty = row.qty or 1.0
row.temporary_opening_account = row.temporary_opening_account or get_temporary_opening_account(self.company)
@ -209,7 +209,7 @@ def start_import(invoices):
frappe.db.commit()
if errors:
frappe.msgprint(_("You had {} errors while creating opening invoices. Check {} for more details")
.format(errors, "<a href='#List/Error Log' class='variant-click'>Error Log</a>"), indicator="red", title=_("Error Occured"))
.format(errors, "<a href='/app/List/Error Log' class='variant-click'>Error Log</a>"), indicator="red", title=_("Error Occured"))
return names
def publish(index, total, doctype):

8
erpnext/assets/doctype/asset/asset.py

@ -471,7 +471,7 @@ class Asset(AccountsController):
asset_bought_with_invoice = (purchase_document == self.purchase_invoice)
fixed_asset_account = self.get_fixed_asset_account()
cwip_enabled = is_cwip_accounting_enabled(self.asset_category)
cwip_account = self.get_cwip_account(cwip_enabled=cwip_enabled)
@ -503,10 +503,10 @@ class Asset(AccountsController):
purchase_document = self.purchase_invoice if asset_bought_with_invoice else self.purchase_receipt
return purchase_document
def get_fixed_asset_account(self):
return get_asset_category_account('fixed_asset_account', None, self.name, None, self.asset_category, self.company)
def get_cwip_account(self, cwip_enabled=False):
cwip_account = None
try:
@ -659,7 +659,7 @@ def transfer_asset(args):
frappe.db.commit()
frappe.msgprint(_("Asset Movement record {0} created").format("<a href='#Form/Asset Movement/{0}'>{0}</a>").format(movement_entry.name))
frappe.msgprint(_("Asset Movement record {0} created").format("<a href='/app/Form/Asset Movement/{0}'>{0}</a>").format(movement_entry.name))
@frappe.whitelist()
def get_item_details(item_code, asset_category):

2
erpnext/buying/doctype/supplier_quotation/supplier_quotation.py

@ -71,7 +71,7 @@ class SupplierQuotation(BuyingController):
doc_sup = doc_sup[0] if doc_sup else None
if not doc_sup:
frappe.throw(_("Supplier {0} not found in {1}").format(self.supplier,
"<a href='desk#Form/Request for Quotation/{0}'> Request for Quotation {0} </a>".format(doc.name)))
"<a href='desk/app/Form/Request for Quotation/{0}'> Request for Quotation {0} </a>".format(doc.name)))
quote_status = _('Received')
for item in doc.items:

2
erpnext/config/education.py

@ -173,7 +173,7 @@ def get_data():
{
"type": "doctype",
"name": "Course Schedule",
"route": "#List/Course Schedule/Calendar"
"route": "/app/List/Course Schedule/Calendar"
},
{
"type": "doctype",

6
erpnext/config/projects.py

@ -16,13 +16,13 @@ def get_data():
{
"type": "doctype",
"name": "Task",
"route": "#List/Task",
"route": "/app/List/Task",
"description": _("Project activity / task."),
"onboard": 1,
},
{
"type": "report",
"route": "#List/Task/Gantt",
"route": "/app/List/Task/Gantt",
"doctype": "Task",
"name": "Gantt Chart",
"description": _("Gantt chart of all tasks."),
@ -97,5 +97,5 @@ def get_data():
},
]
},
]

2
erpnext/education/doctype/assessment_result_tool/assessment_result_tool.js

@ -128,7 +128,7 @@ frappe.ui.form.on('Assessment Result Tool', {
result_table.find(`span[data-student=${assessment_result.student}].total-score-grade`).html(assessment_result.grade);
let link_span = result_table.find(`span[data-student=${assessment_result.student}].total-result-link`);
$(link_span).css("display", "block");
$(link_span).find("a").attr("href", "#Form/Assessment Result/"+assessment_result.name);
$(link_span).find("a").attr("href", "/desk/Form/Assessment Result/"+assessment_result.name);
}
});
}

2
erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.js

@ -25,7 +25,7 @@ frappe.ui.form.on('Course Scheduling Tool', {
<thead><tr><th>${__("Course")}</th><th>${__("Date")}</th></tr></thead>
<tbody>
${course_schedules.map(
c => `<tr><td><a href="#Form/Course Schedule/${c.name}">${c.name}</a></td>
c => `<tr><td><a href="/desk/Form/Course Schedule/${c.name}">${c.name}</a></td>
<td>${c.schedule_date}</td></tr>`
).join('')}
</tbody>

2
erpnext/education/doctype/program_enrollment/program_enrollment.py

@ -87,7 +87,7 @@ class ProgramEnrollment(Document):
fees.submit()
fee_list.append(fees.name)
if fee_list:
fee_list = ["""<a href="#Form/Fees/%s" target="_blank">%s</a>""" % \
fee_list = ["""<a href="/app/Form/Fees/%s" target="_blank">%s</a>""" % \
(fee, fee) for fee in fee_list]
msgprint(_("Fee Records Created - {0}").format(comma_and(fee_list)))

4
erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.js

@ -23,10 +23,10 @@ frappe.ui.form.on("Tally Migration", {
frappe.msgprint({
message: __("An error has occurred during {0}. Check {1} for more details",
[
repl("<a href='#Form/Tally Migration/%(tally_document)s' class='variant-click'>%(tally_document)s</a>", {
repl("<a href='/desk/Form/Tally Migration/%(tally_document)s' class='variant-click'>%(tally_document)s</a>", {
tally_document: frm.docname
}),
"<a href='#List/Error Log' class='variant-click'>Error Log</a>"
"<a href='/desk/List/Error Log' class='variant-click'>Error Log</a>"
]
),
title: __("Tally Migration Error"),

2
erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.js

@ -86,7 +86,7 @@ frappe.ui.form.on('Clinical Procedure', {
if (r.message) {
frappe.show_alert({
message: __('Stock Entry {0} created',
['<a class="bold" href="#Form/Stock Entry/'+ r.message + '">' + r.message + '</a>']),
['<a class="bold" href="/desk/Form/Stock Entry/'+ r.message + '">' + r.message + '</a>']),
indicator: 'green'
});
}

2
erpnext/healthcare/doctype/inpatient_record/inpatient_record.py

@ -50,7 +50,7 @@ class InpatientRecord(Document):
if ip_record:
msg = _(("Already {0} Patient {1} with Inpatient Record ").format(ip_record[0].status, self.patient) \
+ """ <b><a href="#Form/Inpatient Record/{0}">{0}</a></b>""".format(ip_record[0].name))
+ """ <b><a href="/app/Form/Inpatient Record/{0}">{0}</a></b>""".format(ip_record[0].name))
frappe.throw(msg)
def admit(self, service_unit, check_in, expected_discharge=None):

4
erpnext/healthcare/doctype/patient_appointment/patient_appointment.py

@ -63,7 +63,7 @@ class PatientAppointment(Document):
if overlaps:
overlapping_details = _('Appointment overlaps with ')
overlapping_details += "<b><a href='#Form/Patient Appointment/{0}'>{0}</a></b><br>".format(overlaps[0][0])
overlapping_details += "<b><a href='/app/Form/Patient Appointment/{0}'>{0}</a></b><br>".format(overlaps[0][0])
overlapping_details += _('{0} has appointment scheduled with {1} at {2} having {3} minute(s) duration.').format(
overlaps[0][1], overlaps[0][2], overlaps[0][3], overlaps[0][4])
frappe.throw(overlapping_details, title=_('Appointments Overlapping'))
@ -75,7 +75,7 @@ class PatientAppointment(Document):
if frappe.db.get_single_value('Healthcare Settings', 'automate_appointment_invoicing'):
if not frappe.db.get_value('Patient', self.patient, 'customer'):
msg = _("Please set a Customer linked to the Patient")
msg += " <b><a href='#Form/Patient/{0}'>{0}</a></b>".format(self.patient)
msg += " <b><a href='/app/Form/Patient/{0}'>{0}</a></b>".format(self.patient)
frappe.throw(msg, title=_('Customer Not Found'))
def update_prescription_details(self):

10
erpnext/healthcare/utils.py

@ -32,7 +32,7 @@ def get_healthcare_services_to_invoice(patient, company):
def validate_customer_created(patient):
if not frappe.db.get_value('Patient', patient.name, 'customer'):
msg = _("Please set a Customer linked to the Patient")
msg += " <b><a href='#Form/Patient/{0}'>{0}</a></b>".format(patient.name)
msg += " <b><a href='/app/Form/Patient/{0}'>{0}</a></b>".format(patient.name)
frappe.throw(msg, title=_('Customer Not Found'))
@ -169,7 +169,7 @@ def get_clinical_procedures_to_invoice(patient, company):
service_item = get_healthcare_service_item('clinical_procedure_consumable_item')
if not service_item:
msg = _('Please Configure Clinical Procedure Consumable Item in ')
msg += '''<b><a href='#Form/Healthcare Settings'>Healthcare Settings</a></b>'''
msg += '''<b><a href='/app/Form/Healthcare Settings'>Healthcare Settings</a></b>'''
frappe.throw(msg, title=_('Missing Configuration'))
clinical_procedures_to_invoice.append({
@ -324,7 +324,7 @@ def throw_config_service_item(is_inpatient):
service_item_label = _('Inpatient Visit Charge Item')
msg = _(('Please Configure {0} in ').format(service_item_label) \
+ '''<b><a href='#Form/Healthcare Settings'>Healthcare Settings</a></b>''')
+ '''<b><a href='/app/Form/Healthcare Settings'>Healthcare Settings</a></b>''')
frappe.throw(msg, title=_('Missing Configuration'))
@ -334,7 +334,7 @@ def throw_config_practitioner_charge(is_inpatient, practitioner):
charge_name = _('Inpatient Visit Charge')
msg = _(('Please Configure {0} for Healthcare Practitioner').format(charge_name) \
+ ''' <b><a href='#Form/Healthcare Practitioner/{0}'>{0}</a></b>'''.format(practitioner))
+ ''' <b><a href='/app/Form/Healthcare Practitioner/{0}'>{0}</a></b>'''.format(practitioner))
frappe.throw(msg, title=_('Missing Configuration'))
@ -654,6 +654,6 @@ def render_doc_as_html(doctype, docname, exclude_fields = []):
><div class='col-md-12 col-sm-12'>" \
+ section_html + html +'</div></div>'
if doc_html:
doc_html = "<div class='small'><div class='col-md-12 text-right'><a class='btn btn-default btn-xs' href='#Form/%s/%s'></a></div>" %(doctype, docname) + doc_html + '</div>'
doc_html = "<div class='small'><div class='col-md-12 text-right'><a class='btn btn-default btn-xs' href='/app/Form/%s/%s'></a></div>" %(doctype, docname) + doc_html + '</div>'
return {'html': doc_html}

2
erpnext/hr/doctype/employee_transfer/employee_transfer.py

@ -50,7 +50,7 @@ class EmployeeTransfer(Document):
employee = frappe.get_doc("Employee", self.employee)
if self.create_new_employee_id:
if self.new_employee_id:
frappe.throw(_("Please delete the Employee <a href='#Form/Employee/{0}'>{0}</a>\
frappe.throw(_("Please delete the Employee <a href='/app/Form/Employee/{0}'>{0}</a>\
to cancel this document").format(self.new_employee_id))
#mark the employee as active
employee.status = "Active"

2
erpnext/hr/doctype/leave_allocation/leave_allocation.py

@ -82,7 +82,7 @@ class LeaveAllocation(Document):
frappe.msgprint(_("{0} already allocated for Employee {1} for period {2} to {3}")
.format(self.leave_type, self.employee, formatdate(self.from_date), formatdate(self.to_date)))
frappe.throw(_('Reference') + ': <a href="#Form/Leave Allocation/{0}">{0}</a>'
frappe.throw(_('Reference') + ': <a href="/app/Form/Leave Allocation/{0}">{0}</a>'
.format(leave_allocation[0][0]), OverlapError)
def validate_back_dated_allocation(self):

2
erpnext/hr/doctype/leave_application/leave_application.py

@ -246,7 +246,7 @@ class LeaveApplication(Document):
def throw_overlap_error(self, d):
msg = _("Employee {0} has already applied for {1} between {2} and {3} : ").format(self.employee,
d['leave_type'], formatdate(d['from_date']), formatdate(d['to_date'])) \
+ """ <b><a href="#Form/Leave Application/{0}">{0}</a></b>""".format(d["name"])
+ """ <b><a href="/app/Form/Leave Application/{0}">{0}</a></b>""".format(d["name"])
frappe.throw(msg, OverlapError)
def get_total_leaves_on_half_day(self):

2
erpnext/hr/doctype/shift_request/shift_request.py

@ -87,5 +87,5 @@ class ShiftRequest(Document):
def throw_overlap_error(self, d):
msg = _("Employee {0} has already applied for {1} between {2} and {3} : ").format(self.employee,
d['shift_type'], formatdate(d['from_date']), formatdate(d['to_date'])) \
+ """ <b><a href="#Form/Shift Request/{0}">{0}</a></b>""".format(d["name"])
+ """ <b><a href="/app/Form/Shift Request/{0}">{0}</a></b>""".format(d["name"])
frappe.throw(msg, OverlapError)

2
erpnext/hr/utils.py

@ -211,7 +211,7 @@ def get_doc_condition(doctype):
def throw_overlap_error(doc, exists_for, overlap_doc, from_date, to_date):
msg = _("A {0} exists between {1} and {2} (").format(doc.doctype,
formatdate(from_date), formatdate(to_date)) \
+ """ <b><a href="#Form/{0}/{1}">{1}</a></b>""".format(doc.doctype, overlap_doc) \
+ """ <b><a href="/app/Form/{0}/{1}">{1}</a></b>""".format(doc.doctype, overlap_doc) \
+ _(") for {0}").format(exists_for)
frappe.throw(msg)

2
erpnext/manufacturing/doctype/bom/bom.js

@ -134,7 +134,7 @@ frappe.ui.form.on("BOM", {
frm.set_intro(__('This is a Template BOM and will be used to make the work order for {0} of the item {1}',
[
`<a class="variants-intro">variants</a>`,
`<a href="#Form/Item/${frm.doc.item}">${frm.doc.item}</a>`,
`<a href="/desk/Form/Item/${frm.doc.item}">${frm.doc.item}</a>`,
]), true);
frm.$wrapper.find(".variants-intro").on("click", () => {

4
erpnext/manufacturing/doctype/bom/bom_item_preview.html

@ -12,11 +12,11 @@
<hr style="margin: 15px -15px;">
<p>
{% if data.value %}
<a style="margin-right: 7px; margin-bottom: 7px" class="btn btn-default btn-xs" href="#Form/BOM/{{ data.value }}">
<a style="margin-right: 7px; margin-bottom: 7px" class="btn btn-default btn-xs" href="/app/Form/BOM/{{ data.value }}">
{{ __("Open BOM {0}", [data.value.bold()]) }}</a>
{% endif %}
{% if data.item_code %}
<a class="btn btn-default btn-xs" href="#Form/Item/{{ data.item_code }}">
<a class="btn btn-default btn-xs" href="/app/Form/Item/{{ data.item_code }}">
{{ __("Open Item {0}", [data.item_code.bold()]) }}</a>
{% endif %}
</p>

4
erpnext/manufacturing/doctype/production_plan/production_plan.py

@ -319,7 +319,7 @@ class ProductionPlan(Document):
frappe.flags.mute_messages = False
if wo_list:
wo_list = ["""<a href="#Form/Work Order/%s" target="_blank">%s</a>""" % \
wo_list = ["""<a href="/app/Form/Work Order/%s" target="_blank">%s</a>""" % \
(p, p) for p in wo_list]
msgprint(_("{0} created").format(comma_and(wo_list)))
else :
@ -423,7 +423,7 @@ class ProductionPlan(Document):
frappe.flags.mute_messages = False
if material_request_list:
material_request_list = ["""<a href="#Form/Material Request/{0}">{1}</a>""".format(m.name, m.name) \
material_request_list = ["""<a href="/app/Form/Material Request/{0}">{1}</a>""".format(m.name, m.name) \
for m in material_request_list]
msgprint(_("{0} created").format(comma_and(material_request_list)))
else :

4
erpnext/manufacturing/report/bom_stock_report/bom_stock_report.js

@ -27,9 +27,9 @@ frappe.query_reports["BOM Stock Report"] = {
value = default_formatter(value, row, column, data);
if (column.id == "Item"){
if (data["Enough Parts to Build"] > 0){
value = `<a style='color:green' href="#Form/Item/${data['Item']}" data-doctype="Item">${data['Item']}</a>`
value = `<a style='color:green' href="/desk/Form/Item/${data['Item']}" data-doctype="Item">${data['Item']}</a>`
} else {
value = `<a style='color:red' href="#Form/Item/${data['Item']}" data-doctype="Item">${data['Item']}</a>`
value = `<a style='color:red' href="/desk/Form/Item/${data['Item']}" data-doctype="Item">${data['Item']}</a>`
}
}
return value

2
erpnext/payroll/doctype/payroll_period/payroll_period.py

@ -41,7 +41,7 @@ class PayrollPeriod(Document):
if overlap_doc:
msg = _("A {0} exists between {1} and {2} (").format(self.doctype,
formatdate(self.start_date), formatdate(self.end_date)) \
+ """ <b><a href="#Form/{0}/{1}">{1}</a></b>""".format(self.doctype, overlap_doc[0].name) \
+ """ <b><a href="/app/Form/{0}/{1}">{1}</a></b>""".format(self.doctype, overlap_doc[0].name) \
+ _(") for {0}").format(self.company)
frappe.throw(msg)

2
erpnext/projects/doctype/task/task_list.js

@ -26,7 +26,7 @@ frappe.listview_settings['Task'] = {
},
gantt_custom_popup_html: function(ganttobj, task) {
var html = `<h5><a style="text-decoration:underline"\
href="#Form/Task/${ganttobj.id}""> ${ganttobj.name} </a></h5>`;
href="/desk/Form/Task/${ganttobj.id}""> ${ganttobj.name} </a></h5>`;
if(task.project) html += `<p>Project: ${task.project}</p>`;
html += `<p>Progress: ${ganttobj.progress}</p>`;

4
erpnext/public/js/call_popup/call_popup.js

@ -85,7 +85,7 @@ class CallPopup {
<br>
<a
class="text-small text-muted"
href="#Form/Call Log/${this.call_log.name}">
href="/desk/Form/Call Log/${this.call_log.name}">
${__('View call log')}
</a>
`,
@ -167,7 +167,7 @@ class CallPopup {
const issue_field = this.dialog.get_field("last_issue");
issue_field.set_value(issue.subject);
issue_field.$wrapper.append(`
<a class="text-medium" href="#List/Issue?customer=${issue.customer}">
<a class="text-medium" href="/desk/List/Issue?customer=${issue.customer}">
${__('View all issues from {0}', [issue.customer])}
</a>
`);

2
erpnext/public/js/communication.js

@ -84,7 +84,7 @@ frappe.ui.form.on("Communication", {
frm.reload_doc();
frappe.show_alert({
message: __("Opportunity {0} created",
['<a href="#Form/Opportunity/'+r.message+'">' + r.message + '</a>']),
['<a href="/desk/Form/Opportunity/'+r.message+'">' + r.message + '</a>']),
indicator: 'green'
});
}

6
erpnext/public/js/education/assessment_result_tool.html

@ -19,7 +19,7 @@
</thead>
<tbody>
{% for s in students %}
<tr
<tr
{% if(s.assessment_details && s.docstatus && s.docstatus == 1) { %} class="text-muted" {% } %}
data-student="{{s.student}}">
@ -29,7 +29,7 @@
<td>
<span data-student="{{s.student}}" data-criteria="{{c.assessment_criteria}}" class="student-result-grade badge" >
{% if(s.assessment_details) { %}
{{s.assessment_details[c.assessment_criteria][1]}}
{{s.assessment_details[c.assessment_criteria][1]}}
{% } %}
</span>
<input type="number" class="student-result-data" style="width:70%; float:right;"
@ -61,7 +61,7 @@
{% } %}
</span>
<span data-student="{{s.student}}" class="total-result-link" style="width: 10%; display:{% if(!s.assessment_details) { %}None{% } %}; float:right;">
<a class="btn-open no-decoration" title="Open Link" href="#Form/Assessment Result/{% if(s.assessment_details) { %}{{s.name}}{% } %}">
<a class="btn-open no-decoration" title="Open Link" href="/app/Form/Assessment Result/{% if(s.assessment_details) { %}{{s.name}}{% } %}">
<i class="octicon octicon-arrow-right"></i>
</a>
</span>

4
erpnext/selling/doctype/sales_order/sales_order.js

@ -328,7 +328,7 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
frappe.msgprint({
message: __('Work Orders Created: {0}',
[r.message.map(function(d) {
return repl('<a href="#Form/Work Order/%(name)s">%(name)s</a>', {name:d})
return repl('<a href="/desk/Form/Work Order/%(name)s">%(name)s</a>', {name:d})
}).join(', ')]),
indicator: 'green'
})
@ -437,7 +437,7 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
callback: function(r) {
if(r.message) {
frappe.msgprint(__('Material Request {0} submitted.',
['<a href="#Form/Material Request/'+r.message.name+'">' + r.message.name+ '</a>']));
['<a href="/desk/Form/Material Request/'+r.message.name+'">' + r.message.name+ '</a>']));
}
d.hide();
me.frm.reload_doc();

20
erpnext/selling/page/point_of_sale/pos_controller.js

@ -45,7 +45,7 @@ erpnext.PointOfSale.Controller = class {
{
fieldname: "opening_amount", fieldtype: "Currency",
in_list_view: 1, label: "Opening Amount",
options: "company:company_currency",
options: "company:company_currency",
change: function () {
dialog.fields_dict.balance_details.df.data.some(d => {
if (d.idx == this.doc.idx) {
@ -134,7 +134,7 @@ erpnext.PointOfSale.Controller = class {
set_opening_entry_status() {
this.page.set_title_sub(
`<span class="indicator orange">
<a class="text-muted" href="#Form/POS%20Opening%20Entry/${this.pos_opening}">
<a class="text-muted" href="/desk/Form/POS%20Opening%20Entry/${this.pos_opening}">
Opened at ${moment(this.pos_opening_time).format("Do MMMM, h:mma")}
</a>
</span>`);
@ -199,7 +199,7 @@ erpnext.PointOfSale.Controller = class {
if (this.frm.doc.items.length == 0) {
frappe.show_alert({
message:__("You must add atleast one item to save it as draft."),
message:__("You must add atleast one item to save it as draft."),
indicator:'red'
});
frappe.utils.play_sound("error");
@ -208,7 +208,7 @@ erpnext.PointOfSale.Controller = class {
this.frm.save(undefined, undefined, undefined, () => {
frappe.show_alert({
message:__("There was an error saving the document."),
message:__("There was an error saving the document."),
indicator:'red'
});
frappe.utils.play_sound("error");
@ -256,7 +256,7 @@ erpnext.PointOfSale.Controller = class {
cart_item_clicked: (item_code, batch_no, uom) => {
const item_row = this.frm.doc.items.find(
i => i.item_code === item_code
i => i.item_code === item_code
&& i.uom === uom
&& (!batch_no || (batch_no && i.batch_no === batch_no))
);
@ -429,7 +429,7 @@ erpnext.PointOfSale.Controller = class {
})
}
toggle_recent_order_list(show) {
this.toggle_components(!show);
@ -539,7 +539,7 @@ erpnext.PointOfSale.Controller = class {
const qty_needed = field === 'qty' ? value * item_row.conversion_factor : item_row.qty * value;
await this.check_stock_availability(item_row, qty_needed, this.frm.doc.set_warehouse);
}
if (this.is_current_item_being_edited(item_row) || item_selected_from_selector) {
await frappe.model.set_value(item_row.doctype, item_row.name, field, value);
this.update_cart_html(item_row);
@ -577,7 +577,7 @@ erpnext.PointOfSale.Controller = class {
this.check_serial_batch_selection_needed(item_row) && this.edit_item_details_of(item_row);
this.update_cart_html(item_row);
}
}
} catch (error) {
console.log(error);
} finally {
@ -588,7 +588,7 @@ erpnext.PointOfSale.Controller = class {
get_item_from_frm(item_code, batch_no, uom) {
const has_batch_no = batch_no;
return this.frm.doc.items.find(
i => i.item_code === item_code
i => i.item_code === item_code
&& (!has_batch_no || (has_batch_no && i.batch_no === batch_no))
&& (i.uom === uom)
);
@ -617,7 +617,7 @@ erpnext.PointOfSale.Controller = class {
const no_serial_selected = !item_row.serial_no;
const no_batch_selected = !item_row.batch_no;
if ((serialized && no_serial_selected) || (batched && no_batch_selected) ||
if ((serialized && no_serial_selected) || (batched && no_batch_selected) ||
(serialized && batched && (no_batch_selected || no_serial_selected))) {
return true;
}

1
erpnext/setup/page/welcome_to_erpnext/welcome_to_erpnext.html

@ -21,7 +21,6 @@
<h3>{%= __("Next Steps") %}</h3>
<ul class="list-unstyled">
<li><a class="text-muted" href="#">{%= __("Go to the Desktop and start using ERPNext") %}</a></li>
<li><a class="text-muted" href="#modules/Learn">{%= __("View a list of all the help videos") %}</a></li>
<li><a class="text-muted" href="https://erpnext.com/docs/user" target="_blank">{%= __("Read the ERPNext Manual") %}</a></li>
<li><a class="text-muted" href="https://discuss.erpnext.com" target="_blank">{%= __("Community Forum") %}</a></li>
</ul>

2
erpnext/stock/dashboard/item_dashboard.js

@ -198,7 +198,7 @@ erpnext.stock.move_item = function(item, source, target, actual_qty, rate, callb
freeze: true,
callback: function(r) {
frappe.show_alert(__('Stock Entry {0} created',
['<a href="#Form/Stock Entry/'+r.message.name+'">' + r.message.name+ '</a>']));
['<a href="/desk/Form/Stock Entry/'+r.message.name+'">' + r.message.name+ '</a>']));
dialog.hide();
callback(r);
},

2
erpnext/stock/doctype/batch/batch.js

@ -102,7 +102,7 @@ frappe.ui.form.on('Batch', {
},
callback: (r) => {
frappe.show_alert(__('Stock Entry {0} created',
['<a href="#Form/Stock Entry/'+r.message.name+'">' + r.message.name+ '</a>']));
['<a href="/desk/Form/Stock Entry/'+r.message.name+'">' + r.message.name+ '</a>']));
frm.refresh();
},
});

4
erpnext/stock/doctype/item/item.js

@ -85,7 +85,7 @@ frappe.ui.form.on("Item", {
}
if (frm.doc.variant_of) {
frm.set_intro(__('This Item is a Variant of {0} (Template).',
[`<a href="#Form/Item/${frm.doc.variant_of}">${frm.doc.variant_of}</a>`]), true);
[`<a href="/desk/Form/Item/${frm.doc.variant_of}">${frm.doc.variant_of}</a>`]), true);
}
if (frappe.defaults.get_default("item_naming_by")!="Naming Series" || frm.doc.variant_of) {
@ -649,7 +649,7 @@ $.extend(erpnext.item, {
if (r.message) {
var variant = r.message;
frappe.msgprint_dialog = frappe.msgprint(__("Item Variant {0} already exists with same attributes",
[repl('<a href="#Form/Item/%(item_encoded)s" class="strong variant-click">%(item)s</a>', {
[repl('<a href="/desk/Form/Item/%(item_encoded)s" class="strong variant-click">%(item)s</a>', {
item_encoded: encodeURIComponent(variant),
item: variant
})]

2
erpnext/stock/doctype/item/item.py

@ -860,7 +860,7 @@ class Item(WebsiteGenerator):
rows = ''
for docname, attr_list in not_included.items():
link = "<a href='#Form/Item/{0}'>{0}</a>".format(frappe.bold(_(docname)))
link = "<a href='/app/Form/Item/{0}'>{0}</a>".format(frappe.bold(_(docname)))
rows += table_row(link, body(attr_list))
error_description = _('The following deleted attributes exist in Variants but not in the Template. You can either delete the Variants or keep the attribute(s) in template.')

2
erpnext/stock/doctype/item_price/item_price.js

@ -14,6 +14,6 @@ frappe.ui.form.on("Item Price", {
frm.add_fetch("item_code", "stock_uom", "uom");
frm.set_df_property("bulk_import_help", "options",
'<a href="#data-import-tool/Item Price">' + __("Import in Bulk") + '</a>');
'<a href="/desk/data-import-tool/Item Price">' + __("Import in Bulk") + '</a>');
}
});

2
erpnext/support/doctype/issue/issue.js

@ -184,7 +184,7 @@ frappe.ui.form.on("Issue", {
let url = window.location.href
let arr = url.split("/");
let result = arr[0] + "//" + arr[2]
frappe.msgprint(`New issue created: <a href="${result}/desk#Form/Issue/${r.message}">${r.message}</a>`)
frappe.msgprint(`New issue created: <a href="${result}//desk/Form/Issue/${r.message}">${r.message}</a>`)
frm.reload_doc();
dialog.hide();
});

2
erpnext/support/doctype/issue/issue.py

@ -207,7 +207,7 @@ class Issue(Document):
"comment_type": "Info",
"reference_doctype": "Issue",
"reference_name": replicated_issue.name,
"content": " - Split the Issue from <a href='#Form/Issue/{0}'>{1}</a>".format(self.name, frappe.bold(self.name)),
"content": " - Split the Issue from <a href='/app/Form/Issue/{0}'>{1}</a>".format(self.name, frappe.bold(self.name)),
}).insert(ignore_permissions=True)
return replicated_issue.name

4
erpnext/utilities/bot.py

@ -26,12 +26,12 @@ class FindItemBot(BotParser):
for warehouse in warehouses:
qty = frappe.db.get_value("Bin", {'item_code': item[0], 'warehouse': warehouse.name}, 'actual_qty')
if qty:
out.append(_('{0} units of [{1}](#Form/Item/{1}) found in [{2}](#Form/Warehouse/{2})').format(qty,
out.append(_('{0} units of [{1}](/app/Form/Item/{1}) found in [{2}](/app/Form/Warehouse/{2})').format(qty,
item[0], warehouse.name))
found = True
if not found:
out.append(_('[{0}](#Form/Item/{0}) is out of stock').format(item[0]))
out.append(_('[{0}](/app/Form/Item/{0}) is out of stock').format(item[0]))
return "\n\n".join(out)

Loading…
Cancel
Save