-
-
Notifications
You must be signed in to change notification settings - Fork 366
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
[16.0][FIX] stock_picking_delivery_link: Test compatibility with purchase #781
[16.0][FIX] stock_picking_delivery_link: Test compatibility with purchase #781
Conversation
Avoid test errors if the purchase module is installed TT46563
fc04ecc
to
3cce9bb
Compare
@victoralmau I don't like putting some code that depends on module that is not in dependencies... |
Ok, I understand, any suggestions to avoid tests failing if purchase is installed? |
I have checked and it looks good to me, what do you think @pedrobaeza ? |
@victoralmau Don't check purchase module. Fill in simply the seller_ids field as this is implemented in product. |
Even if we do that we will still have to confirm the purchase and the tests will fail. Please try the following use case:
|
Any other proposal to solve the tests of this module? This blocks #755 |
Any other better proposals to solve this problem? This blocks several migrations. |
Can we procedure to merge? So we can unblock several migrations. Thanks! |
Can we move forward to merge? @pedrobaeza @rousseldenis |
@pedrobaeza What do you think? |
@@ -26,6 +26,16 @@ def setUpClass(cls): | |||
"product_id": test_carrier_product.id, | |||
} | |||
) | |||
# We need to know if purchase module is installed | |||
cls.purchase_installed = False |
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.
Maybe it is cleaner to use
cls.purchase_installed = False | |
cls.purchase_installed = cls.env.ref("base.module_purchase").state == "installed" |
@rousseldenis I have been 2 hours trying to get another solution in #755, but I see no other solution than this one. The problem is that the tests Can you propose an alternative or to not block this? |
Hi, @rousseldenis have you checked what @pedrobaeza commented before? |
Hi, any news? we need to unlock several migrations |
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.
Let's merge this as the less bad solution. Later, other options can be proposed:
/ocabot merge patch
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at 3e3f888. Thanks a lot for contributing to OCA. ❤️ |
Related to #755 (https://github.com/OCA/delivery-carrier/actions/runs/8269746616/job/22625732737)
Avoid test errors if the purchase module is installed
Please @pedrobaeza and @carolinafernandez-tecnativa can you review it?
@Tecnativa TT46563