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] purchase: update reference onchange of vendor_bill_purchase_id #32500

Closed
wants to merge 1 commit into from

Conversation

len-foss
Copy link
Contributor

@len-foss len-foss commented Apr 8, 2019

Commit 1be873d removed the modification of the reference field
from the _onchange_origin.
The reasoning was that since this is an onchange on invoice_line_ids, it was
applied too often, which annoyed users in the case they overwrote that field.

However when using the "Autocomplete" field (vendor_bill_purchase_id),
then the user expects values to by modified.
Before, it worked by setting the origin field, which trickled down
to the reference.
Since that commit removed this, we re-add it explicitly in that case.

opw 1962364

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

Commit 1be873d removed the modification of the reference field
from the _onchange_origin.
The reasoning was that since this is an onchange on invoice_line_ids, it was
applied too often, which annoyed users in the case they overwrote that field.

However when using the "Autocomplete" field (vendor_bill_purchase_id),
then the user expects values to by modified.
Before, it worked by setting the origin field, which trickled down
to the reference.
Since that commit removed this, we re-add it explicitly in that case.

opw 1962364
@len-foss len-foss requested a review from nim-odoo April 8, 2019 13:27
@len-foss
Copy link
Contributor Author

len-foss commented Apr 8, 2019

Obviously commit 1be873d can be seen as lacking foresight, as only one way to create vendor bills was really tested.
Since the autocomplete is a technical field used to create vendor bills, it makes sense to add the reference modification in the onchange.
However it leaves other potential flows open for the need of similar fixes (although this has been added in v12 so things might not be so bad).
AFAICT, unfortunately we need to assume that, or we revert that initial commit entirely.

@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label Apr 8, 2019
@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Apr 8, 2019
Copy link
Contributor

@nim-odoo nim-odoo left a comment

Choose a reason for hiding this comment

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

Hopefully it is the right fix now :)

@len-foss
Copy link
Contributor Author

len-foss commented Apr 9, 2019

robodoo r+

@robodoo robodoo closed this in ea1fc12 Apr 9, 2019
@robodoo
Copy link
Contributor

robodoo commented Apr 9, 2019

Merged, thanks!

@len-foss len-foss deleted the 12.0-opw1962364-purr-len branch April 9, 2019 08:37
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