[IMP] base_jsonify: cache json parser
parent
d30ea05fcf
commit
1e9a7e6d00
|
@ -5,6 +5,7 @@
|
|||
from collections import OrderedDict
|
||||
|
||||
from odoo import fields, models
|
||||
from odoo.tools import ormcache
|
||||
|
||||
|
||||
def partition(l, accessor):
|
||||
|
@ -88,6 +89,11 @@ class IrExport(models.Model):
|
|||
help="If set, will apply the global resolver to the result",
|
||||
)
|
||||
|
||||
@ormcache(
|
||||
"self.language_agnostic",
|
||||
"self.global_resolver_id.id",
|
||||
"tuple(self.export_fields.mapped('write_date'))",
|
||||
)
|
||||
def get_json_parser(self):
|
||||
"""Creates a parser from ir.exports record and return it.
|
||||
|
||||
|
|
Loading…
Reference in New Issue