[V6] remove carriage return on field of text type
Bug #872251 reported by
Vincent Renaville@camptocamp
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Odoo GTK Client (MOVED TO GITHUB) | Status tracked in Trunk | |||||
6.0 |
Fix Released
|
Medium
|
OpenERP Publisher's Warranty Team | |||
Trunk |
Fix Released
|
Medium
|
OpenERP sa GTK client R&D |
Bug Description
Hello,
When you want to a carriage return in a field of text type, the carriage return was automatically removed from the text field when you saved it.
For my customer it's really annoying because my customer use it to make invoice layout on RML report.
The GTK Client mustn't do automatic modification on text field.
Thanks for your help,
Vincent
Thanks for your help,
Vincent
Related branches
lp:~openerp-dev/openobject-client/6.0-opw-18150-skh
- Priyesh (OpenERP) (community): Approve
- Vo Minh Thu: Pending requested
-
Diff: 12 lines (+0/-2)1 file modifiedbin/widget/model/field.py (+0/-2)
Changed in openobject-client: | |
assignee: | nobody → OpenERP Publisher's Warranty Team (openerp-opw) |
tags: | added: maintenance |
To post a comment you must log in.
Hi,
This mostly looks like a wishlist to me... Being able to type spaces or newlines at the end of input fields is a nice-to-have that conflicts with the often-requested feature of de-duplicating data caused by unnecessary trailing spaces.
There is no feature in OpenERP that requires adding spaces or newlines at the end of input data, so the only cases where this matters are, as you said, tricks you use to alter the layout of some document.
That being said, I think the fix for bug 559788 that caused this change was not correct, it should have been fixed by displaying the real database value to allow the user to edit/fix it. We should not strip trailing whitespace from fields.text, not when setting the value, nor when reading it. It may be useful to do it for fields.char because that helps avoid mistakes and duplicates, but fields of type "fields.text" are not used for checking duplicates usually, so it does not help.
Still, I'm not sure this qualifies as an OPW case, especially when there are so many workarounds for doing the same thing (i.e. adding a very small or invisible non-space character at the end of the field, etc.).
Maybe we could do this:
- for 6.0: revert the patch for bug 559788, as it's not good, and leave it like that
- for trunk: revert the patch and find a better way to solve bug 559788, e.g. avoid stripping field.text values on display