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

[11.0][purchase_exception] small fixes #5

Conversation

JordiBForgeFlow
Copy link

Some small fixes that I detected during my testing.

@codecov
Copy link

codecov bot commented Nov 23, 2017

Codecov Report

Merging #5 into 11.0-add-purchase_exception will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@                    Coverage Diff                     @@
##           11.0-add-purchase_exception     #5   +/-   ##
==========================================================
  Coverage                          100%   100%           
==========================================================
  Files                                2      2           
  Lines                               46     50    +4     
==========================================================
+ Hits                                46     50    +4
Impacted Files Coverage Δ
purchase_exception/models/purchase.py 100% <100%> (ø) ⬆️
...ase_exception/wizard/purchase_exception_confirm.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8bc22fc...4cfb9ce. Read the comment docs.

@@ -15,5 +15,7 @@ class PurchaseExceptionConfirm(models.TransientModel):
def action_confirm(self):
self.ensure_one()
if self.ignore:
self.related_model_id.button_draft()
Copy link
Member

Choose a reason for hiding this comment

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

Why you execute button_draft before the confirm ?

Copy link
Author

Choose a reason for hiding this comment

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

Because button_confirm() only works from status 'draft', and you still want the logic https://github.com/odoo/odoo/blob/11.0/addons/purchase/models/purchase.py#L346 to be executed.

Copy link
Member

Choose a reason for hiding this comment

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

OK

@mourad-ehm mourad-ehm merged commit d1f8c5e into akretion:11.0-add-purchase_exception Nov 23, 2017
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.

2 participants