-
-
Notifications
You must be signed in to change notification settings - Fork 673
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
[18.0][MIG] stock_picking_tier_validation: Migration to version 18.0 #1875
base: 18.0
Are you sure you want to change the base?
[18.0][MIG] stock_picking_tier_validation: Migration to version 18.0 #1875
Conversation
35ff4c4
to
43c317b
Compare
/ocabot migration stock_picking_tier_validation |
Sorry @Ricardo-MC you are not allowed to mark the addon tobe migrated. To do so you must either have push permissions on the repository, or be a declared maintainer of all modified addons. If you wish to adopt an addon and become it's maintainer, open a pull request to add your GitHub login to the |
/ocabot migration stock_picking_tier_validation |
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 and working. Just a technical comment to make the test as realistic as possible. What do you think?
cls.tier_def_obj.create( | ||
{ | ||
"model_id": cls.tester_model.id, | ||
"review_type": "individual", | ||
"reviewer_id": cls.test_user_1.id, | ||
"definition_domain": "[('test_field', '>', 1.0)]", | ||
} | ||
) | ||
|
||
cls.test_record = cls.test_model.create({"test_field": 2.5}) | ||
|
||
@classmethod | ||
def tearDownClass(cls): | ||
teardown_test_model(cls.env, [TierValidationTester]) | ||
super().tearDownClass() |
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 you can add a real test for the stock.picking
model instead of creating a fake model, similar to:
https://github.com/OCA/sale-workflow/blob/17.0/sale_tier_validation/tests/test_tier_validation.py
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.
Agreed! The tests here are clearly copied from base_tier_validation, which makes no sense, and it would be good to have them replaced by a proper validation flow as is the case in for instance https://github.com/OCA/stock-logistics-workflow/blob/17.0/stock_scrap_tier_validation/tests/test_tier_validation.py#L50-L66.
No description provided.