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
[FIX] When pickings are recreated from shipping excepting, order "View Delivery Orders" button disappears #265
Conversation
kenvac
commented
Feb 23, 2016
- Fix [8.0][sale_procurement_group_by_line] Recreate pickings doesn't show View Delivery Orders button #264
- Fix : Can't create delivery from shipping exception
@@ -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: |
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.
Why a try? Use
groups.get(line...
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.
You are right @pedrobaeza . This can be removed. I'll make the change and also need to check why CI is failing.
6d1cf38
to
13aec39
Compare
@pedrobaeza I've made those changes. Thanks for pointing it out. |
👍 |
13aec39
to
3b626db
Compare
@@ -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) |
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.
This line is too long:
sale_procurement_group_by_line/model/sale.py:79:80: E501 line too long (90 > 79 characters)
3e2942c
to
ff150f6
Compare
@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') |
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.
This looks like a void statement to me. group_id is not used in the loop, and overwritten right after.
@kenvac, can you check Stefan's comment? |
* Fix OCA#264 * Fix : Can't create delivery from shipping exception
ff150f6
to
110a5c0
Compare
I've made the change suggested above. |
Thanks for the change! |