Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REF] stock: Add limit 1 to get_warehouse where is returned even the first one #11054

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
2 participants
@moylop260
Copy link
Contributor

commented Feb 23, 2016

  • Description of the issue/feature this PR addresses:
    This PR increase the performance to get_warehouse method.
    Other matter, IMHO this method should be in a fields.function with stored like as commercial_partner_id
    Because waste many resources in each invoke.
    But I added this PR with a small fix.
  • Current behavior before PR:
    Return all items from database and filter after by python.
  • Desired behavior after PR is merged:
    Return first item from database.
@moylop260

This comment has been minimized.

Copy link
Contributor Author

commented Mar 19, 2016

Hello @odony

What do you think about?

@tivisse

This comment has been minimized.

Copy link
Contributor

commented Jun 12, 2018

Hi !

Thanks for the feedback. It seems that it has already been done at https://github.com/odoo/odoo/blob/master/addons/stock/models/stock_location.py#L121

Have a nice day,

Yannick.

@tivisse tivisse closed this Jun 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.