-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
[17.0][MIG] stock_product_pack: Migration to 17.0 #157
Conversation
67d8da1
to
5198f7b
Compare
Functional: LGTM |
@@ -13,10 +13,10 @@ class ProductProduct(models.Model): | |||
def _compute_quantities_dict( | |||
self, lot_id, owner_id, package_id, from_date=False, to_date=False | |||
): | |||
res = super()._compute_quantities_dict( | |||
packs = self.filtered("pack_ok") |
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.
I think we could improve this, because self.filtered will browse all items, then the self - packs will browse again all items to make the computation. I think you can do the split inside this method to avoid to browse 2 times the elements.
Why do you think about it?
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.
The prefetch is shared, so not very big problem. There's just a new set operation.
5198f7b
to
c2ae6e4
Compare
c2ae6e4
to
8ac882b
Compare
8ac882b
to
0f1a25f
Compare
0f1a25f
to
ffcbfed
Compare
@OCA/tools-mainteiners Merge please! Thz |
@OCA-git-bot Merge please! Thx |
/ocabot migration stock_product_pack There isn't any review yet. |
@@ -27,6 +27,7 @@ def _compute_quantities_dict( | |||
for subproduct in subproducts: | |||
subproduct_stock = subproduct.product_id | |||
sub_qty = subproduct.quantity | |||
# import pdb;pdb.set_trace() |
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.
Could you remove this ?
created this PR to include last changes request so that it could get merged: |
Currently translated at 100.0% (1 of 1 strings) Translation: product-pack-12.0/product-pack-12.0-stock_product_pack Translate-URL: https://translation.odoo-community.org/projects/product-pack-12-0/product-pack-12-0-stock_product_pack/pt/
Currently translated at 100.0% (1 of 1 strings) Translation: product-pack-12.0/product-pack-12.0-stock_product_pack Translate-URL: https://translation.odoo-community.org/projects/product-pack-12-0/product-pack-12-0-stock_product_pack/fr/
…ines. It seems to me that it would be if a user has the maximum stock permission, can edit the lines of packs, as well as a maximum sales permission.
…s if the product is storable.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: product-pack-13.0/product-pack-13.0-stock_product_pack Translate-URL: https://translation.odoo-community.org/projects/product-pack-13-0/product-pack-13-0-stock_product_pack/
In v13 Odoo sets the stock at zero for products that are not services. This commit will keep the stock of the services if they are packs, to remain the functionality of the lasts versions.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: product-pack-16.0/product-pack-16.0-stock_product_pack Translate-URL: https://translation.odoo-community.org/projects/product-pack-16-0/product-pack-16-0-stock_product_pack/
Currently translated at 100.0% (5 of 5 strings) Translation: product-pack-16.0/product-pack-16.0-stock_product_pack Translate-URL: https://translation.odoo-community.org/projects/product-pack-16-0/product-pack-16-0-stock_product_pack/es/
Currently translated at 100.0% (5 of 5 strings) Translation: product-pack-16.0/product-pack-16.0-stock_product_pack Translate-URL: https://translation.odoo-community.org/projects/product-pack-16-0/product-pack-16-0-stock_product_pack/it/
Currently translated at 100.0% (5 of 5 strings) Translation: product-pack-16.0/product-pack-16.0-stock_product_pack Translate-URL: https://translation.odoo-community.org/projects/product-pack-16-0/product-pack-16-0-stock_product_pack/it/
ffcbfed
to
75905dc
Compare
@FrancoMaxime @natuan9 |
No description provided.