-
-
Notifications
You must be signed in to change notification settings - Fork 202
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
[18.0][MIG] partner_risk_insurance: Migration to 18.0 #421
Open
ArnauCForgeFlow
wants to merge
45
commits into
OCA:18.0
Choose a base branch
from
ForgeFlow:18.0-mig-partner_risk_insurance
base: 18.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[18.0][MIG] partner_risk_insurance: Migration to 18.0 #421
ArnauCForgeFlow
wants to merge
45
commits into
OCA:18.0
from
ForgeFlow:18.0-mig-partner_risk_insurance
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[11.0][MIG] partner_risk_insurance: Migration to v11.0 [11.0][IMP] partner_risk_insurance: Fix ES translation [UPD] README.rst Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: credit-control-11.0/credit-control-11.0-partner_risk_insurance Translate-URL: https://translation.odoo-community.org/projects/credit-control-11-0/credit-control-11-0-partner_risk_insurance/ [UPD] README.rst [UPD] Update partner_risk_insurance.pot Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: credit-control-11.0/credit-control-11.0-partner_risk_insurance Translate-URL: https://translation.odoo-community.org/projects/credit-control-11-0/credit-control-11-0-partner_risk_insurance/
Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: credit-control-12.0/credit-control-12.0-partner_risk_insurance Translate-URL: https://translation.odoo-community.org/projects/credit-control-12-0/credit-control-12-0-partner_risk_insurance/
pre-commit update Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: credit-control-13.0/credit-control-13.0-partner_risk_insurance Translate-URL: https://translation.odoo-community.org/projects/credit-control-13-0/credit-control-13-0-partner_risk_insurance/
[13.0][IMP] Add a view priority partner_risk_insurance 13.0.1.1.0
…d insurance_credit_limit on partners partner_risk_insurance 13.0.1.1.1
Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: credit-control-14.0/credit-control-14.0-partner_risk_insurance Translate-URL: https://translation.odoo-community.org/projects/credit-control-14-0/credit-control-14-0-partner_risk_insurance/
Currently translated at 100.0% (27 of 27 strings) Translation: credit-control-14.0/credit-control-14.0-partner_risk_insurance Translate-URL: https://translation.odoo-community.org/projects/credit-control-14-0/credit-control-14-0-partner_risk_insurance/it/
TT34699 partner_risk_insurance 14.0.1.1.0
[UPD] Update partner_risk_insurance.pot [UPD] README.rst
partner_risk_insurance 15.0.1.0.1
Currently translated at 100.0% (27 of 27 strings) Translation: credit-control-15.0/credit-control-15.0-partner_risk_insurance Translate-URL: https://translation.odoo-community.org/projects/credit-control-15-0/credit-control-15-0-partner_risk_insurance/it/
…eter tracking That parameter is added in mail module partner_risk_insurance 15.0.1.0.2 [UPD] README.rst Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: credit-control-15.0/credit-control-15.0-partner_risk_insurance Translate-URL: https://translation.odoo-community.org/projects/credit-control-15-0/credit-control-15-0-partner_risk_insurance/
- Include context keys for avoiding mail operations overhead. [BOT] post-merge updates
[UPD] Update partner_risk_insurance.pot [BOT] post-merge updates
Currently translated at 100.0% (47 of 47 strings) Translation: credit-control-16.0/credit-control-16.0-partner_risk_insurance Translate-URL: https://translation.odoo-community.org/projects/credit-control-16-0/credit-control-16-0-partner_risk_insurance/es/
Currently translated at 100.0% (27 of 27 strings) Translation: credit-control-16.0/credit-control-16.0-partner_risk_insurance Translate-URL: https://translation.odoo-community.org/projects/credit-control-16-0/credit-control-16-0-partner_risk_insurance/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: credit-control-16.0/credit-control-16.0-partner_risk_insurance Translate-URL: https://translation.odoo-community.org/projects/credit-control-16-0/credit-control-16-0-partner_risk_insurance/
In Odoo 16, upstream has already a `credit_limit` field in `res.partner`. That field is coupled with a checkbox named `use_partner_credit_limit`, which means "this partner doesn't use the default credit limit; it has a specific credit limit". Those fields were only available to users of groups `account.group_account_invoice` and `account.group_account_readonly`, within the *Invoicing* tab in `res.partner` form. Still there's an extra hidden `show_credit_limit` field which toggles this feature completely. It depends on wether the current company has credit limits enabled. This module was migrated from previous versions that had none of these features. The result is that, probably by that inertia, UX ended up becoming inconsistent. Improvements done: - Fields are relabeled. Their names confused everybody in our UX investigation. They now reflect better their usage. - The company default credit limit is ignored when the user sets a different credit limit. Before, it was being included in the sum to get the total credit limit for the partner, but that was contrary to the purpose of that field in upstream Odoo. When you check `use_partner_credit_limit` in upstream Odoo, you don't add an extra credit limit; instead, you *replace* the default limit by a custom one. That's what we do here now. - Tests are rewritten because they were exercising that wrong assumption that I just explained. - It made no sense to ask the user for total, company and insured credit limits. One of those fields could be computed. Since upstream Odoo already has a writable property field `credit_limit` (already explained), I picked up `company_credit_limit` to be the computed one. - `company_credit_limit` is no longer stored (and therefore not tracked) because it's a company-dependant field. In multi-company partners, the logger became inconsistent otherwise. - `use_partner_credit_limit` gets an onchange to trigger its inverse method beforehand, and make UX consistent before hitting save. - When setting a insurance credit limit higher than the total credit limit, the total is automatically increased, and the company is automatically set to 0. - All features are hidden if the company didn't enable credit limits. This is consistent with upstream Odoo. - Permissions are adjusted to match those of upstream Odoo regarding these fields. - Tests are executed with those new permissions. Still, a good extra enhancement would be to move all this stuff to the *Invoicing* tab. But that can be done later after some more investigation. Although this module had a lot of maintainers, it seems like it still needs more love, so we also volunteer to help with it. @moduon MT-4827 Co-authored-by: Rafael Blasco <[email protected]> Co-authored-by: <[email protected]> Co-authored-by: <[email protected]>
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: credit-control-16.0/credit-control-16.0-partner_risk_insurance Translate-URL: https://translation.odoo-community.org/projects/credit-control-16-0/credit-control-16-0-partner_risk_insurance/
Currently translated at 100.0% (66 of 66 strings) Translation: credit-control-16.0/credit-control-16.0-partner_risk_insurance Translate-URL: https://translation.odoo-community.org/projects/credit-control-16-0/credit-control-16-0-partner_risk_insurance/it/
ThiagoMForgeFlow
approved these changes
Jan 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Migration to 18.0