Fork of Odoo (formerly OpenERP). [This project is not publically mantained just born for internal usage with some little patches] go to official repository on github.com/odoo/odoo
Currently the method read uses by default the parameter load='classic_read')
self.read(fields, load='classic_read')
So, it computes name_get for all m2o fields for all records in self.
If you want to avoid computing the name_get to save time and process
You can use an empty string in load parameter:
e.g. self.read(..., load='')
The method self.search_read call to search and read methods
but search_read method is not possible to assign load='' argument
(or other arguments of the method read)
e.g. self.search_read(..., load='')
So, you need to use 2 lines of code:
records = self.search(...)
records.read(..., load='')
This commit changes search_read method to receive all keyword arguments of the method read
So, you can use self.search_read(..., load='') and the read parameter will be propagated
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Currently the method
read
uses by default the parameterload='classic_read')
self.read(fields, load='classic_read')
So, it computes
name_get
for all m2o fields for all records inself
.If you want to avoid computing the
name_get
to save time and process You can use an empty string in load parameter:self.read(..., load='')
The method
self.search_read
call tosearch
andread
methods butsearch_read
method is not possible to assignload=''
argument (or other arguments of the methodread
)self.search_read(..., load='')
So, you need to use 2 lines of code: records = self.search(...) records.read(..., load='')
This commit changes
search_read
method to receive all keyword arguments of the methodread
So, you can useself.search_read(..., load='')
and theread
parameter will be propagatedDescription of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr