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

[FIX] sale: add force_save on product_uom in views #30420

Closed
wants to merge 1 commit into from

Conversation

len-foss
Copy link
Contributor

Create a sale order. Confirm it. Add a new line. Change the UoM on this line.
The onchange is applied, modifying the unit price.
Save: the saved product UoM is the default one.

So for example if the user changes the UoM from day to hours,
he will sell one day for the price of one hour.

This is because the field product_uom is set to read_only if the state of the
sale order is confirmed ('sale') (as well as if the state is 'done' or 'cancel')
However it is still possible to change it when adding a new line.

opw 1923534

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

Create a sale order. Confirm it. Add a new line. Change the UoM on this line.
The onchange is applied, modifying the unit price.
Save: the saved product UoM is the default one.

So for example if the user changes the UoM from day to hours,
he will sell one day for the price of one hour.

This is because the field product_uom is set to read_only if the state of the
sale order is confirmed ('sale') (as well as if the state is 'done' or 'cancel')
However it is still possible to change it when adding a new line.

opw 1923534
@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label Jan 22, 2019
@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Jan 22, 2019
@len-foss
Copy link
Contributor Author

robodoo r+

robodoo pushed a commit that referenced this pull request Jan 22, 2019
Create a sale order. Confirm it. Add a new line. Change the UoM on this line.
The onchange is applied, modifying the unit price.
Save: the saved product UoM is the default one.

So for example if the user changes the UoM from day to hours,
he will sell one day for the price of one hour.

This is because the field product_uom is set to read_only if the state of the
sale order is confirmed ('sale') (as well as if the state is 'done' or 'cancel')
However it is still possible to change it when adding a new line.

opw 1923534

closes #30420
@robodoo
Copy link
Contributor

robodoo commented Jan 22, 2019

Merged, thanks!

@robodoo robodoo closed this Jan 22, 2019
@len-foss len-foss deleted the 11.0-opw1923534-uom-len branch January 22, 2019 09:18
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 OE the report is linked to a support ticket (opw-...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants