-
-
Notifications
You must be signed in to change notification settings - Fork 730
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
[11.0][MIG] stock_warehouse_orderpoint_stock_info_unreserved #377
Conversation
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 |
There was a problem hiding this comment.
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
f8ed2d4
to
a850532
Compare
super(TestStockWarehouseOrderpoint, self).setUp() | ||
class TestStockWarehouseOrderpoint(SavepointCase): | ||
@classmethod | ||
def setUpClass(cls): |
There was a problem hiding this comment.
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.
Dependency is merged. Please rebase. |
@mpanarin can you rebase? |
…10.0 [IMP] fast compute _product_available() method is computed only once by location [FIX] stock_available: Some affectations
a850532
to
ddbe8ed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested, LGTM 👍
…y unit for a product (OCA#377)
depends on