Skip to content
Snippets Groups Projects
Commit caf6183c authored by divy-odoo's avatar divy-odoo Committed by xO-Tx
Browse files

[FIX] website_form: prevent input field type change


The translation of input "default values" is allowed only when
`type="text"`. However, email field values are translatable because of
strange behaviour:

- Go to website (Edit mode) > Add a form block.
- Select the existing email field > Change label position > The input
is transformed into a `type="text"`.

Each time a "non-custom" field is re-rendered, The `_getActiveField()`
method is obtaining field related data from the database, including its
type, which changes it back to the original value ("char").

The goal of this commit is to fix this behaviour using `_getFieldType()`
to set the right field type instead of the default one.

task-3247520

closes odoo/odoo#119293

Signed-off-by: default avatarOutagant Mehdi (mou) <mou@odoo.com>
parent 195f603c
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment