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

[15.0] [MIG] sale_order_price_recalculation #2139

Merged

Conversation

JasminSForgeFlow
Copy link
Contributor

Standard Migration

@ForgeFlow

pedrobaeza and others added 28 commits July 20, 2022 09:34
…n demand sale order line prices

==================================================
Recalculation of sale order lines prices on demand
==================================================

This module adds a button on sale orders below pricelist that recalculates the
prices of the order lines that contain a product in them.

It is launched manually as a button to get the user decide if he/she wants to
recalculate prices when pricelist is changed.

Usage
=====

Inside a sale order, you can click in any moment a button called
"(Recalculate prices)", that is next to the pricelist selection, to launch
a recalculation of all the prices of the lines, losing previous custom prices.

Known issues / Roadmap
======================

* In a sale order with lot of lines, the recalculation may slow down, because
  sale general data (amount untaxed, amount taxed...) are recalculated for
  each line.
* add choice to recompute price only
  This commit add the capability to reset sale order line
  without renaming sale order lines
* upgrade translation
* Split functionnalities reset prices/reset desciptions
* Move button under sale order lines
On certain set of installed modules, standard demo pricelist can be altered for giving
something different than the list price, making these tests to fail. We avoid it
creating our own pricelist with the fixed data that we want.
This way, all tracking events can take place.

Closes OCA#848
Currently translated at 100.0% (3 of 3 strings)

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_order_price_recalculation
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_order_price_recalculation/de/
Currently translated at 100.0% (3 of 3 strings)

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_order_price_recalculation
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_order_price_recalculation/zh_CN/
Currently translated at 100.0% (3 of 3 strings)

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_order_price_recalculation
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_order_price_recalculation/pt_BR/
Currently translated at 100.0% (3 of 3 strings)

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_order_price_recalculation
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_order_price_recalculation/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: sale-workflow-13.0/sale-workflow-13.0-sale_order_price_recalculation
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-13-0/sale-workflow-13-0-sale_order_price_recalculation/
Currently translated at 100.0% (3 of 3 strings)

Translation: sale-workflow-13.0/sale-workflow-13.0-sale_order_price_recalculation
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-13-0/sale-workflow-13-0-sale_order_price_recalculation/es/
With current inheritance, the buttons are only visible if you have the
security group "Lock Confirmed Sales" in your user.

As we need to be seen in all cases, we modify the inheritance.

TT37124
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: sale-workflow-13.0/sale-workflow-13.0-sale_order_price_recalculation
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-13-0/sale-workflow-13-0-sale_order_price_recalculation/
Copy link
Contributor

@AaronHForgeFlow AaronHForgeFlow left a comment

Choose a reason for hiding this comment

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

Inside a sale order, you can click on “Recalculate prices” to launch a recalculation of all the prices of the lines, losing previous custom prices.

I can't see that button

@JasminSForgeFlow
Copy link
Contributor Author

Inside a sale order, you can click on “Recalculate prices” to launch a recalculation of all the prices of the lines, losing previous custom prices.

I can't see that button

Button will be visible in draft and sent state only

You can check it here http://oca-sale-workflow-15-0-pr2139-487d907a8d49.runboat.odoo-community.org/web#cids=1&menu_id=271&action=420&model=sale.order&view_type=form&id=27

Thanks

@AaronHForgeFlow
Copy link
Contributor

But in previous versions, it was also available in sales order state. Why that change?

@JasminSForgeFlow JasminSForgeFlow changed the title [15.0] [ MIG] sale_order_price_recalculation [15.0] [MIG] sale_order_price_recalculation Jul 20, 2022
@JasminSForgeFlow
Copy link
Contributor Author

But in previous versions, it was also available in sales order state. Why that change?

It was like this in v13
https://github.com/OCA/sale-workflow/blob/13.0/sale_order_price_recalculation/views/sale_order_view.xml

Thanks

Copy link
Contributor

@AaronHForgeFlow AaronHForgeFlow left a comment

Choose a reason for hiding this comment

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

Functional review

@AaronHForgeFlow
Copy link
Contributor

AaronHForgeFlow commented Jul 20, 2022

@JasminSForgeFlow when reviewing the PR in version 14, I thought I was able to do the recalculation after confirmation. But I was not. Sorry for the confusion.

@sonhd91
Copy link
Contributor

sonhd91 commented Jul 22, 2022

This PR work fine and test case passed too

Copy link
Contributor

@DavidJForgeFlow DavidJForgeFlow left a comment

Choose a reason for hiding this comment

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

LGTM!

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@JordiBForgeFlow
Copy link
Sponsor Member

/ocabot migration sale_order_price_recalculation
/ocabot merge nobump

@OCA-git-bot OCA-git-bot added this to the 15.0 milestone Sep 2, 2022
@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 15.0-ocabot-merge-pr-2139-by-JordiBForgeFlow-bump-nobump, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Sep 2, 2022
Signed-off-by JordiBForgeFlow
@OCA-git-bot
Copy link
Contributor

It looks like something changed on 15.0 in the meantime.
Let me try again (no action is required from you).
Prepared branch 15.0-ocabot-merge-pr-2139-by-JordiBForgeFlow-bump-nobump, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Sep 2, 2022
Signed-off-by JordiBForgeFlow
@OCA-git-bot
Copy link
Contributor

It looks like something changed on 15.0 in the meantime.
Let me try again (no action is required from you).
Prepared branch 15.0-ocabot-merge-pr-2139-by-JordiBForgeFlow-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit fd271c2 into OCA:15.0 Sep 2, 2022
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 41900ea. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet