frappe icon indicating copy to clipboard operation
frappe copied to clipboard

Copy paste from Excel to grid do not consider field datatype before setting values

Open treasuryesc opened this issue 1 year ago • 1 comments

Description of the issue

Copy paste from Excel to grid do not consider field datatype before setting values, so values are not presented correctly

Context information (for bug reports)

When you copy from a Excel sheet and paste values into a grid, currently the code makes a simple set_value to the field, but if values are formatted, for instance, currency with comma as decimal separator or dates in dd/mm/yyyy format, those values are not correctly take into each field of the grid.

Output of bench version

v14.40.2 

Steps to reproduce the issue

  1. Open any grid with fields of datatype date and currency
  2. Copy values from Excel sheet, using dates formatted as dd/mm/yyyy and values with comma as decimal separator
  3. Paste into the grid

paste-grid

Observed result

Values aren't set in the grid as shown in the attached image

Expected result

Values should be set in the grid fields the same way the data came from Excel

Stacktrace / full error message

N/A

Additional information

OS version / distribution, Frappe install method, etc.

treasuryesc avatar Jan 15 '24 20:01 treasuryesc

@phot0n could you please check my PR ?

treasuryesc avatar Feb 16 '24 09:02 treasuryesc

:tada: This issue has been resolved in version 14.71.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

frappe-pr-bot avatar Apr 09 '24 15:04 frappe-pr-bot

:tada: This issue has been resolved in version 15.21.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

frappe-pr-bot avatar Apr 09 '24 15:04 frappe-pr-bot