Files
odoo_source/addons/web_editor/models/models.py
T
Denis Ledoux d5b7f7001c [IMP] base: restrict fields_get attributes for web client
Instead of fetching all field attributes sent with the field list
to the web client,
restrict the attributes to the ones actually required by the web client

This allows, for instance,
to gain 44,75KB on each call on `get_views` for `account.move`,
from 208.78KB to 164.03KB,
with only `account_accountant` installed.

closes odoo/odoo#99660

Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-09-08 13:50:45 +02:00

15 lines
385 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, models
class Base(models.AbstractModel):
_inherit = 'base'
@api.model
def _get_view_field_attributes(self):
keys = super()._get_view_field_attributes()
keys.append('sanitize')
keys.append('sanitize_tags')
return keys