Closed yajo closed 9 months ago
Hello @carlosdauden ,
We are trying to improve UX.
Your point of view is really welcome!
Thanks
I pushed a fix to account_credit_control
that should fix the builds.
All relabeling suggestions applied.
Can someone merge please?
Hey, thanks for contributing! Proceeding to merge this for you. Prepared branch 16.0-ocabot-merge-pr-362-by-rafaelbn-bump-major, awaiting test results.
Congratulations, your PR was merged at 9ca038dc060de029aff72430c0757830fd08ed45. Thanks a lot for contributing to OCA. ❤️
In Odoo 16, upstream has already a
credit_limit
field inres.partner
. That field is coupled with a checkbox nameduse_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
andaccount.group_account_readonly
, within the Invoicing tab inres.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:
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.credit_limit
(already explained), I picked upcompany_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.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.
@moduon MT-4827