[FIX] base: prevent bin_size/binary visual defect
Changing the address type of a contact in the "Contact & Addresses" tab
could in some instance lead to a dead image (just visually, saving it
would not change it) because the image is set to something like
"data:image/png;base64,5.23 Kb" because of a combination of kanba/form
x2many view, onchange, the differences of field present.
In 9.0 this did not happen because the image was not a field in the form
view corresponding to a contact of the kanban contacts view.
In saa-15 thanks to bf26445 the image_small is different than image in
the kanban view and this got us out of the issue.
In saas-16 it is solved even further because new views only load missing
fields.
This commit just get out of the issue by preventing an update of the
records field (with bin_size which caused the issue of the image) when
opening the modal form view of a contact's contact.
Ideally we should solve this more deeply but this is dangerous code to
change (eg. removing the bin_size would solve it but this was done for a
reason and could affect performances) and the effect is just visual in a
very particular set of factors (if we save the form after the image is
dead, the previous image reappeared).
opw-765952
closes #19491
This commit is contained in:
@@ -219,6 +219,11 @@
|
||||
<field name="state_id"/>
|
||||
<field name="image"/>
|
||||
<field name="lang"/>
|
||||
<!-- fields in form x2many view to diminish requests -->
|
||||
<field name="comment"/>
|
||||
<field name="customer"/>
|
||||
<field name="display_name"/>
|
||||
<field name="supplier"/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<t t-set="color" t-value="kanban_color(record.color.raw_value)"/>
|
||||
|
||||
Reference in New Issue
Block a user