Commit 41a7678
committed
[FIX] clipboard: paste as value with empty format string
Our paste as value keeps the format from the origin cell, removing
only the formula. But if the origin cell had an empty format string,
it would copy this empty string instead of the evaluated cell format.
Note: we get empty string format as result of, for example, auto-fill
an `=TODAY()` formula. It can be argued that we should have `undefined`
core format rather than an empty string, but every other place in the
codebase handles all falsy format values the same way. The clipboard
was the only place where we would make the distinction between `""`
and `undefined` with `??`.
closes #7291
Task: 5156459
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>1 parent 4bf3363 commit 41a7678
File tree
2 files changed
+17
-1
lines changed- src/clipboard_handlers
- tests/clipboard
2 files changed
+17
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
| 240 | + | |
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1283 | 1283 | | |
1284 | 1284 | | |
1285 | 1285 | | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
1286 | 1302 | | |
1287 | 1303 | | |
1288 | 1304 | | |
| |||
0 commit comments