OCA / rma

Odoo for Return Merchandise Authorization (RMA)
GNU Affero General Public License v3.0
78 stars 206 forks source link

[13.0][IMP] rma_sale: Domains performance #326

Closed pedrobaeza closed 1 year ago

pedrobaeza commented 1 year ago

For avoiding a big list of IDs being transferred when no sales order is selected on the RMA, we have changed domains to make use of the possibility of pyjs (http://pyjs.org/) expressions allowed in the domains.

No ternary operators nor list sums are allowed in pyjs, but using a combination of allowed IDs with a controlled length of values + and/or operators to switch domains is enough for having the right performance and avoid to depend on other modules like web_domain_field.

@Tecnativa

OCA-git-bot commented 1 year ago

Hi @ernestotejeda, some modules you are maintaining are being modified, check this out!

rousseldenis commented 1 year ago

As the changes here do not support full domain (still some ids in domain), I continue to believe that usage of web_domain_field is better as domain will be fully evaluated by py.js.

See https://github.com/OCA/web/pull/2356/files#diff-a27a472baf2dfd949377b5633b3a92e11eef877e8da14c2d5a769fc76cf425f1R54

pedrobaeza commented 1 year ago

That ID list is very short, so it's good and very traceable.

/ocabot merge minor

OCA-git-bot commented 1 year ago

On my way to merge this fine PR! Prepared branch 13.0-ocabot-merge-pr-326-by-pedrobaeza-bump-minor, awaiting test results.

OCA-git-bot commented 1 year ago

Congratulations, your PR was merged at 6e7a84fd69084afb8a4219a9f05770511b9ab4d5. Thanks a lot for contributing to OCA. ❤️