-
-
Notifications
You must be signed in to change notification settings - Fork 746
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
[12.0][MIG] purchase_requisition_auto_rfq #822
Conversation
This addon adds a button to generate RFQ for the purchase requisition using the product.supplierinfo in order to only have the lines corresponding to the products sold by each supplier.
Here I take advantage of the new API and the assertions from nose.tools to refactor the tests and make them more readable. They are still green and should be otherwise unchanged.
The method auto_rfq_from_suppliers returned a list of ids of created RFQs. This list was used by the tests only. In production a method called by a button should just return True in case of success. Now the method returns True, and tests are adapted to figure out the created rfqs from requisition.purchase_ids instead of using the return value.
This way assert_equal gives a very nice failure singling out the different keys and values in the dictionary. This is to prepare a test on product quantities, still getting good failures if for example only the quantities for one line are different.
In order to get visibility on https://www.odoo.com/apps the OCA board has decided to add the OCA as author of all the addons maintained as part of the association.
Only a couple of line lengths "problems" remain in the Travis build report. They're quite hard to shorten without hurting the code readability, so I leave it to the reviewers to decide... 😄 |
purchase_requisition_auto_rfq/tests/test_purchase_requisition.py
Outdated
Show resolved
Hide resolved
purchase_requisition_auto_rfq/tests/test_purchase_requisition.py
Outdated
Show resolved
Hide resolved
purchase_requisition_auto_rfq/tests/test_purchase_requisition.py
Outdated
Show resolved
Hide resolved
purchase_requisition_auto_rfq/tests/test_purchase_requisition.py
Outdated
Show resolved
Hide resolved
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.
Hi,
Thanks for this awesome migration.
Functionnal test done
LGTM
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 tested with odoo 12 (OCB) and it worked.
@HviorForgeFlow done |
/ocabot merge nobump |
What a great day to merge this nice PR. Let's do it! |
Congratulations, your PR was merged at 5310681. Thanks a lot for contributing to OCA. ❤️ |
Phew! I can finally get on with my life 😜 🍻 |
Migrated module! 😅