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

[11.0][MIG] stock_warehouse_orderpoint_stock_info_unreserved #377

Conversation

mpanarin
Copy link

@mpanarin mpanarin commented Feb 14, 2018

super()._compute_product_available_qty()
op_by_loc = defaultdict(lambda: self.env['stock.warehouse.orderpoint'])
for order in self:
op_by_loc[order.location_id] |= order
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pattern of extending the recordset is very slow compared to using a true set, then create a new recordset out of the final set. See OCA/connector-prestashop@5d617fd

@mpanarin mpanarin force-pushed the 11.0-mig-stock_warehouse_orderpoint_stock_info_unreserved branch from f8ed2d4 to a850532 Compare February 20, 2018 17:42
@max3903 max3903 requested review from agyamuta and bodedra February 27, 2018 18:29
@max3903 max3903 added this to the 11.0 milestone Feb 27, 2018
super(TestStockWarehouseOrderpoint, self).setUp()
class TestStockWarehouseOrderpoint(SavepointCase):
@classmethod
def setUpClass(cls):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a candid question: what's the point of renaming self to cls?

Edit: OK, it's a pep8 recommendation, see https://www.python.org/dev/peps/pep-0008/#function-and-method-arguments

Always use self for the first argument to instance methods.
Always use cls for the first argument to class methods.

@max3903 max3903 mentioned this pull request Mar 19, 2018
21 tasks
@LoisRForgeFlow
Copy link
Contributor

Dependency is merged. Please rebase.

@LoisRForgeFlow LoisRForgeFlow changed the title 11.0 mig stock warehouse orderpoint stock info unreserved [11.0][MIG] stock_warehouse_orderpoint_stock_info_unreserved Mar 19, 2018
@gurneyalex
Copy link
Member

@mpanarin can you rebase?

@mpanarin mpanarin force-pushed the 11.0-mig-stock_warehouse_orderpoint_stock_info_unreserved branch from a850532 to ddbe8ed Compare March 23, 2018 09:38
Copy link
Contributor

@LoisRForgeFlow LoisRForgeFlow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, LGTM 👍

@LoisRForgeFlow LoisRForgeFlow merged commit d68e0fb into OCA:11.0 Mar 26, 2018
@emagdalenaC2i emagdalenaC2i mentioned this pull request Dec 29, 2018
46 tasks
ps-tubtim pushed a commit to ecosoft-odoo/stock-logistics-warehouse that referenced this pull request Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants