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
[REF] delivery: put_in_pack cleaning #30324
Conversation
81b6996
to
e636280
Compare
e636280
to
ce0512e
Compare
87050e8
to
8ec94d0
Compare
8ec94d0
to
f8d8461
Compare
f8d8461
to
bc50035
Compare
bc50035
to
6a6100f
Compare
@@ -7,7 +7,7 @@ | |||
<form string="Package"> | |||
<group> | |||
<field name="delivery_packaging_id" domain="[('package_carrier_type', '=', context.get('current_package_carrier_type', False))]" | |||
context="{'form_view_ref':'delivery.product_packaging_delivery_form'}"/> | |||
context="{'form_view_ref':'delivery.product_packaging_delivery_form'}" required="True"/> |
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.
@arbaes not sure about it
2e0b69c
to
c14c71a
Compare
c14c71a
to
bcbf277
Compare
else: | ||
return res | ||
|
||
def _choose_package(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.
@arbaes I would rather name it _set_delivery_packaging or something like that
bcbf277
to
db583c8
Compare
self.env.context, | ||
current_package_carrier_type=self.carrier_id.delivery_type, | ||
default_picking_id=self.id, | ||
default_move_line_ids=move_line_ids.ids |
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.
remove context_move_line_ids
else: | ||
return res | ||
|
||
def _set_delivery_packaging(self, move_line_ids): |
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.
move_line_ids not needed as arg anymore
f8a3fba
to
2e09fc5
Compare
robodoo r+ |
Because this PR has multiple commits, I need to know how to merge it:
|
2e09fc5
to
d904990
Compare
robodoo retry |
Merge method set to rebase and fast-forward |
robodoo r+ |
I'm sorry, @amoyaux. Retry makes no sense when the PR is not in error. |
…in_pack` The package creation was done even before the call of the 'choose.delivery.package' wizard, so the 'Discard' button of the wizard was useless. This commit fix this behaviour by creating the package only when the "put_in_pack" action is called from the wizard. The default weight is thus no more based on the default package but on the picking related to the package. The method 'manage_package', 'default_stock_quant_package_id', 'self._default_delivery_packaging_id' were removed since they are no more relevant. The method 'check_destinations' was refactored to '_pre_put_in_pack_hook' to avoid confusion related to its misleading name TaskID: 1924875
d904990
to
c67425a
Compare
robodoo r+ |
…in_pack` The package creation was done even before the call of the 'choose.delivery.package' wizard, so the 'Discard' button of the wizard was useless. This commit fix this behaviour by creating the package only when the "put_in_pack" action is called from the wizard. The default weight is thus no more based on the default package but on the picking related to the package. The method 'manage_package', 'default_stock_quant_package_id', 'self._default_delivery_packaging_id' were removed since they are no more relevant. The method 'check_destinations' was refactored to '_pre_put_in_pack_hook' to avoid confusion related to its misleading name TaskID: 1924875 closes #30324 Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Merged, thanks! |
This PR fix the issues with the default shipping weight and the creation of a packaging regardless of the 'discard button'. Obsolete code was removed in the process.
TaskID: 1924875