frappe / frappe

Low code web framework for real world applications, in Python and Javascript
https://frappeframework.com
MIT License
7.02k stars 3.35k forks source link

Listview formatters overwrite subject HTML #15798

Closed Rall3n closed 6 months ago

Rall3n commented 2 years ago

Description of the issue

When setting custom formatters for ListView fields (frappe.listview_settings[...].formatters) to format a subject column in a list, the default HTML for the subject column (including checkbox and like controls) are being overwritten by the result of the custom formatter.

Context information (for bug reports)

Output of bench version

erpnext 13.18.0
frappe 13.18.0

Steps to reproduce the issue

  1. Add a formatter to a ListView :
    frappe.listview_settings['DOCTYPE'] = {
    /* ... */
    formatters: {
      fieldname(value, subject_field, doc) {
        return somewhat_format(value, subject_field, doc);
      }
    }
    }
  2. Set field targeted by custom formatter as title_field for the DocTypes ListView
  3. Results

Observed result

Controls for checkbox and like as well es bold format for subject column are not visible. Custom format is being used.

Expected result

Controls and bold format should be visible as well as the custom format.

Stacktrace / full error message

No stacktrace available.

Additional information

The issue seems to happen because of these lines of code.

Nihantra-Patel commented 6 months ago

We no longer provide support for version 13 or older.

Kindly upgrade to version 14 or 15.

Version EOL Branch
Version 12 End of 2022 version-12
Version 13 End of 2023 version-13
Version 14 End of 2024 (planned) version-14
Version 15 End of 2026 (planned) version-15
Bleeding edge N/A develop

For more information, please refer to the guidelines.

Thank You!