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

[16.0] account_payment_purchase: replace api.onchange by computed field on purchase.order #1167

Merged

Conversation

alexis-via
Copy link
Contributor

replace api.onchange by computed field on purchase.order
Add company_id in the domain of the fields of purchase.order
Add check_company=True on the 2 fields of purchase.order

@alexis-via alexis-via force-pushed the 16-account_payment_purchase-update_code branch from 0ab4679 to 6c36bc2 Compare November 5, 2023 22:27
@luc-demeyer
Copy link
Contributor

Code review & testing ok.

I am wondering why precompute=True is set on the computed fields.
I tested by changing to precompute=False and the PR works in both cases.
@pedrobaeza
do you think we need precompute=True in this case ?
When reading the doc in the ORM one would think it's required but it seems not to be the case.

@pedrobaeza
Copy link
Member

It's because some fields are already precompute, and the dependency chain should be completely that way for avoiding double computing.

@alexis-via alexis-via force-pushed the 16-account_payment_purchase-update_code branch from 6c36bc2 to ecf12fc Compare November 6, 2023 21:41
…urchase.order

Add check_company=True on the 2 fields of purchase.order
@alexis-via alexis-via force-pushed the 16-account_payment_purchase-update_code branch from ecf12fc to 4c3e829 Compare November 6, 2023 21:43
@alexis-via
Copy link
Contributor Author

I also converted (0, 0, {}) to Command.create([})
Ready to merge

@pedrobaeza pedrobaeza added this to the 16.0 milestone Nov 7, 2023
@alexis-via
Copy link
Contributor Author

/ocabot merge major

@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). 🤖

@pedrobaeza
Copy link
Member

/ocabot merge major

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-1167-by-pedrobaeza-bump-major, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 16c1bdd into OCA:16.0 Nov 10, 2023
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at fc1346a. 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.

5 participants