Skip to content
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

Enforce budget on cost estimate validation #68

Merged
merged 22 commits into from
Nov 24, 2014

Conversation

lepistone
Copy link
Member

This work is intended to bring the enforcement of the budget to the cost estimate validation.

Because cost estimates are... estimates, it is too strict to enforce the budget on the creation (that was disabled already). Instead, we check when the estimate is validated into a logistic order.

@coveralls
Copy link

Coverage Status

Coverage increased (+8.8%) when pulling 96c16ee on lepistone:enforce-budget-on-costestimate-validation into 3f2e63d on OCA:8.0.

I discussed this with @yvaucher and @rdeheele. These tests are long
flows taken from logistic_requisition before logistic_budget was split
out, that check functionality of logistic_budget that is not there
anymore (we removed the old constraints). We did not notice the problem
because the only assertion was disabled to work around a bug in the
core, recently fixed.

For the new functionality I will not recover these tests, as they are
not really relevant here, and add new ones, more isolated.
That way I can read and write only attributes of the real logistic
source.
So that it is consistent with the same field on the logistic request.
Make a test stricter to drive this change.
@lepistone lepistone force-pushed the enforce-budget-on-costestimate-validation branch from 96c16ee to 26dddaa Compare November 21, 2014 08:56
@coveralls
Copy link

Coverage Status

Coverage increased (+8.75%) when pulling fcf8cef on lepistone:enforce-budget-on-costestimate-validation into 495fe1a on OCA:8.0.

If some module enables sale exceptions (like logistic_budget), the
integration tests of logistic_requisition will fail. Disable the check
in the tests, because it is irrelevant to the module.
@lepistone lepistone force-pushed the enforce-budget-on-costestimate-validation branch from fcf8cef to 3e124fc Compare November 21, 2014 10:48
@coveralls
Copy link

Coverage Status

Coverage decreased (-2.11%) when pulling 3e124fc on lepistone:enforce-budget-on-costestimate-validation into 495fe1a on OCA:8.0.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.97%) when pulling 1312fc5 on lepistone:enforce-budget-on-costestimate-validation into 495fe1a on OCA:8.0.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.97%) when pulling 93cf3ca on lepistone:enforce-budget-on-costestimate-validation into 495fe1a on OCA:8.0.

A line of a logistic request can have a budget and a pre-approval by a budget
holder and a finance officer.

The creation of a cost estimate can be done without approval of with a budget
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"of with" -> parse error.

@gurneyalex
Copy link
Member

nice test refactoring work. 👍 once the minor things in the README are fixed.

@lepistone
Copy link
Member Author

readme fixed

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.97%) when pulling da169b8 on lepistone:enforce-budget-on-costestimate-validation into 495fe1a on OCA:8.0.

@foutoucour
Copy link

👍

@@ -0,0 +1,11 @@
Logisitic budget
================
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Logisitic/Logistics/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@lepistone
Copy link
Member Author

Note: travis red build seems unrelated: pylint crashes with AssertionError: Message symbol 'print-statement' is already defined.

The last commit changes only the readme, the one before is green.

@guewen
Copy link
Member

guewen commented Nov 24, 2014

👍

guewen added a commit that referenced this pull request Nov 24, 2014
…validation

Enforce budget on cost estimate validation
@guewen guewen merged commit a5e704b into OCA:8.0 Nov 24, 2014
@lepistone lepistone deleted the enforce-budget-on-costestimate-validation branch November 25, 2014 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants