-
Notifications
You must be signed in to change notification settings - Fork 0
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
[16.0][IMP] delivery_postlogistics: Print return label in status Ready #2
base: 16.0
Are you sure you want to change the base?
Conversation
8f7ec47
to
8b70b5d
Compare
@@ -156,3 +156,15 @@ def verify_credentials(self): | |||
}, | |||
} | |||
return message | |||
|
|||
def _compute_can_generate_return(self): | |||
res =super(DeliveryCarrier, self)._compute_can_generate_return() |
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.
res =super(DeliveryCarrier, self)._compute_can_generate_return() | |
res = super(DeliveryCarrier, self)._compute_can_generate_return() |
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 @nilshamerlinck , I'm done
abdf66f
to
dc74f33
Compare
dc74f33
to
52fdf22
Compare
_inherit = "stock.return.picking" | ||
|
||
def _create_returns(self): | ||
res = super(ReturnPicking, self)._create_returns() |
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.
res = super(ReturnPicking, self)._create_returns() | |
new_picking, pick_type_id = super(ReturnPicking, self)._create_returns() |
|
||
def _create_returns(self): | ||
res = super(ReturnPicking, self)._create_returns() | ||
record = self.env['stock.picking'].browse(res[0]) |
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.
record = self.env['stock.picking'].browse(res[0]) | |
picking = self.env['stock.picking'].browse(new_picking) |
if record: | ||
record.carrier_id = self.picking_id.carrier_id and self.picking_id.carrier_id.id or False |
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.
if record: | |
record.carrier_id = self.picking_id.carrier_id and self.picking_id.carrier_id.id or False | |
picking.write({"carrier_id": self.picking_id.carrier_id.id}) |
record = self.env['stock.picking'].browse(res[0]) | ||
if record: | ||
record.carrier_id = self.picking_id.carrier_id and self.picking_id.carrier_id.id or False | ||
return res |
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.
return res | |
return new_picking, pick_type_id |
class ReturnPicking(models.TransientModel): | ||
_inherit = "stock.return.picking" | ||
|
||
def _create_returns(self): |
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 will impact all returns
can you add a condition on self.picking_id.delivery_type == "postlogistics"
52fdf22
to
2070e89
Compare
Hi @nilshamerlinck , I updated |
delivery_postlogistics/__init__.py
Outdated
@@ -1,2 +1,3 @@ | |||
from . import models | |||
from . import postlogistics | |||
from . import wizard |
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.
please pre-commit
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 empty?
2070e89
to
3b9214f
Compare
Sorry @nilshamerlinck , could you review again? |
3b9214f
to
8e09b12
Compare
No description provided.