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

[REF] delivery: put_in_pack cleaning #30324

Closed
wants to merge 1 commit into from

Conversation

arbaes
Copy link
Contributor

@arbaes arbaes commented Jan 17, 2019

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

@C3POdoo C3POdoo added the RD research & development, internal work label Jan 17, 2019
@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Jan 17, 2019
@robodoo robodoo removed the CI 🤖 Robodoo has seen passing statuses label Jan 18, 2019
@arbaes arbaes force-pushed the master-putinpack-arb branch 2 times, most recently from 87050e8 to 8ec94d0 Compare January 21, 2019 08:47
@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Jan 21, 2019
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Jan 22, 2019
@robodoo robodoo removed the CI 🤖 Robodoo has seen passing statuses label Jan 22, 2019
@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Jan 22, 2019
@@ -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"/>
Copy link
Contributor

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

@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Jan 24, 2019
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Jan 25, 2019
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Jan 28, 2019
else:
return res

def _choose_package(self):
Copy link
Contributor

@amoyaux amoyaux Jan 28, 2019

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

@robodoo robodoo removed the CI 🤖 Robodoo has seen passing statuses label Jan 28, 2019
@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Feb 28, 2019
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
Copy link
Contributor

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):
Copy link
Contributor

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

@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Mar 1, 2019
@amoyaux
Copy link
Contributor

amoyaux commented Mar 4, 2019

robodoo r+

@robodoo robodoo added the r+ 👌 label Mar 4, 2019
@robodoo
Copy link
Contributor

robodoo commented Mar 4, 2019

Because this PR has multiple commits, I need to know how to merge it:

  • merge to merge directly, using the PR as merge commit message
  • rebase-merge to rebase and merge, using the PR as merge commit message
  • rebase-ff to rebase and fast-forward

@amoyaux
Copy link
Contributor

amoyaux commented Mar 5, 2019

robodoo retry

@robodoo robodoo removed the CI 🤖 Robodoo has seen passing statuses label Mar 5, 2019
@robodoo
Copy link
Contributor

robodoo commented Mar 5, 2019

Merge method set to rebase and fast-forward

@robodoo robodoo removed the r+ 👌 label Mar 5, 2019
@amoyaux
Copy link
Contributor

amoyaux commented Mar 5, 2019

robodoo r+

@robodoo robodoo added the r+ 👌 label Mar 5, 2019
@robodoo
Copy link
Contributor

robodoo commented Mar 5, 2019

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
@amoyaux
Copy link
Contributor

amoyaux commented Mar 5, 2019

robodoo r+

@robodoo robodoo added r+ 👌 CI 🤖 Robodoo has seen passing statuses labels Mar 5, 2019
robodoo pushed a commit that referenced this pull request Mar 5, 2019
…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>
@robodoo
Copy link
Contributor

robodoo commented Mar 5, 2019

Merged, thanks!

@robodoo robodoo closed this Mar 5, 2019
@fw-bot fw-bot deleted the master-putinpack-arb branch October 20, 2019 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI 🤖 Robodoo has seen passing statuses RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants