-
-
Notifications
You must be signed in to change notification settings - Fork 204
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
[17.0][MIG] partner_risk_insurance: Migration to 17.0 #420
[17.0][MIG] partner_risk_insurance: Migration to 17.0 #420
Conversation
[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/
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.
Minor changes
<page | ||
string="Credit Insurance" | ||
name="credit_insurance" | ||
invisible="not show_credit_limit or (not is_company and parent_id != False)" |
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.
invisible="not show_credit_limit or (not is_company and parent_id != False)" | |
invisible="not show_credit_limit or (not is_company and parent_id)" |
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.
Done!
215156d
to
05969e6
Compare
/ocabot migration partner_risk_insurance |
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at 3aef3f4. Thanks a lot for contributing to OCA. ❤️ |
Migration to 17.0