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>
15 lines
385 B
Python
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
|