Files
odoo_source/addons/web
Joseph Caburnay da27a4d5f1 [IMP] web: show clipboard field even if it's empty
**Issue:**

When a copy clipboard field is empty, there is no way to edit it
because the Field component is not shown.

This issue can be reproduced using any type of copy clipboard field:
- CopyClipboardChar
- CopyClipboardText
- CopyClipboardURL

Check the following video for illustration:
https://youtu.be/CTzqJRtwqv0

**Solution:**

This PR proposes a fix of *always* showing the copy clipboard field
(together with the copy button) even if the content is empty.

For illustration, check: https://youtu.be/jMM7zn_mFCU

**Notable changes:**

- The modified tests were using a wrong class name. But since they were
asserting the "non-existence" of the copy button, they were working.
- We are casting null text field to empty string (just like char field)
so that we avoid crash (in dev mode) when passing a "boolean" as 'content'
props to the 'CopyButton' component. This is asserted in the augmented
test case where we also try to render an empty text field.

closes odoo/odoo#104248

Task-id: 2861388
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-11-04 14:00:27 +01:00
..
2022-10-06 14:56:52 +02:00