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

[FIX] When pickings are recreated from shipping excepting, order "View Delivery Orders" button disappears #265

Merged

Conversation

kenvac
Copy link

@kenvac kenvac commented Feb 23, 2016

@@ -49,7 +49,15 @@ def action_ship_create(self, cr, uid, ids, context=None):
groups = {}

for line in order.order_line:
group_id = groups.get(line._get_procurement_group_key())
if order.state == 'shipping_except':
try:
Copy link
Member

Choose a reason for hiding this comment

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

Why a try? Use

groups.get(line...

Copy link
Author

Choose a reason for hiding this comment

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

You are right @pedrobaeza . This can be removed. I'll make the change and also need to check why CI is failing.

@kenvac kenvac force-pushed the 8.0-sale_procurement_group_by_line-fix branch from 6d1cf38 to 13aec39 Compare February 24, 2016 16:29
@kenvac
Copy link
Author

kenvac commented Feb 24, 2016

@pedrobaeza I've made those changes. Thanks for pointing it out.

@pedrobaeza
Copy link
Member

👍

@kenvac kenvac force-pushed the 8.0-sale_procurement_group_by_line-fix branch from 13aec39 to 3b626db Compare February 26, 2016 21:08
@@ -70,6 +76,7 @@ def action_ship_create(self, cr, uid, ids, context=None):
# trigger another move
proc_ids += [x.id for x in line.procurement_ids
if x.state in ('exception', 'cancel')]
procurement_obj.reset_to_confirmed(cr, uid, proc_ids, context=context)
Copy link
Member

Choose a reason for hiding this comment

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

This line is too long:

sale_procurement_group_by_line/model/sale.py:79:80: E501 line too long (90 > 79 characters)

@kenvac kenvac force-pushed the 8.0-sale_procurement_group_by_line-fix branch from 3e2942c to ff150f6 Compare March 11, 2016 11:52
@kenvac
Copy link
Author

kenvac commented Mar 11, 2016

@pedrobaeza pep8 convention enforced in code

@@ -49,7 +49,13 @@ def action_ship_create(self, cr, uid, ids, context=None):
groups = {}

for line in order.order_line:
if order.state == 'shipping_except':
group_id = getattr(line.procurement_group_id, 'id')
Copy link
Member

Choose a reason for hiding this comment

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

This looks like a void statement to me. group_id is not used in the loop, and overwritten right after.

@pedrobaeza
Copy link
Member

@kenvac, can you check Stefan's comment?

* Fix OCA#264
* Fix : Can't create delivery from shipping exception
@mistotebe mistotebe force-pushed the 8.0-sale_procurement_group_by_line-fix branch from ff150f6 to 110a5c0 Compare December 7, 2016 15:08
@mistotebe
Copy link

I've made the change suggested above.

@StefanRijnhart
Copy link
Member

Thanks for the change!

@StefanRijnhart StefanRijnhart merged commit b8f172c into OCA:8.0 Dec 9, 2016
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

4 participants