Files
odoo_source/addons/mail/views/ir_model_views.xml
T
MerlinGuillaume c27f1f77d7 [FIX] mail: disable the tracking of binary fields
Tracked binary fields do not produce any message in the chatter

Steps to reproduce:
1. Install Sales and Studio
2. Open any quotation
3. Trigger Studio and add a signature field to the form
4. With debug mode enabled, edit the field (by clicking on MORE when the
   field is selected) and set the Enable Ordered Tracking to 1
5. Close Studio
6. Edit the signature and save
7. No message appears in the chatter to track the value

Solution:
Remove the `tracking` field from binary fields to prevent the user from
trying to track it

Problem:
We shouldn't track binary data in the chatter and we cannot use the
filenames

opw-3055108
task-3255810

closes odoo/odoo#118278

X-original-commit: 4e309ce5eae282fd28e77bf46d3fdf6bb91bd92b
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2023-04-12 10:38:00 +02:00

44 lines
2.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="model_form_view" model="ir.ui.view">
<field name="model">ir.model</field>
<field name="inherit_id" ref="base.view_model_form"/>
<field name="arch" type="xml">
<field name="transient" position="after">
<field name="is_mail_thread" attrs="{'readonly': [('state','!=', 'manual')]}" groups="base.group_no_one"/>
<field name="is_mail_activity" attrs="{'readonly': [('state','!=', 'manual')]}" groups="base.group_no_one"/>
<field name="is_mail_blacklist" attrs="{'readonly': [('state','!=', 'manual')]}" groups="base.group_no_one"/>
</field>
<xpath expr="//field[@name='field_id']//field[@name='copied']" position="after">
<field name="state" invisible="1"/>
<field name="tracking" attrs="{'readonly': [('state','!=', 'manual')]}"/>
</xpath>
</field>
</record>
<record id="model_search_view" model="ir.ui.view">
<field name="model">ir.model</field>
<field name="inherit_id" ref="base.view_model_search"/>
<field name="arch" type="xml">
<field name="model" position="after">
<filter string="Mail Thread" name="is_mail_thread" domain="[('is_mail_thread', '=', True)]"/>
<filter string="Mail Activity" name="is_mail_activity" domain="[('is_mail_activity', '=', True)]"/>
<filter string="Mail Blacklist" name="is_mail_blacklist" domain="[('is_mail_blacklist', '=', True)]"/>
</field>
</field>
</record>
<record id="field_form_view" model="ir.ui.view">
<field name="model">ir.model.fields</field>
<field name="inherit_id" ref="base.view_model_fields_form"/>
<field name="arch" type="xml">
<field name="copied" position="after">
<field name="state" invisible="1"/>
<field name="tracking" attrs="{'invisible': [('ttype', '=', 'binary')], 'readonly': [('state','!=', 'manual')]}"/>
</field>
</field>
</record>
</odoo>