-
-
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
[MIG] account_financial_risk: Migration to 18.0 #407
base: 18.0
Are you sure you want to change the base?
[MIG] account_financial_risk: Migration to 18.0 #407
Conversation
* [9.0][IMP] partner_financial_risk: Improve performance * [9.0][IMP] partner_financial_risk: Improve tests and partner hierarchy * [9.0][IMP] partner_stock_risk: Test
- Refunds adds partner risk instead of reduce. - If date_maturity changes to previous today date "never" compute partner risk.
* [9.0][IMP] partner_financial_risk: Improve multicompany cron * [9.0][IMP] partner_financial_risk: Exec with sudo (cherry picked from commit 6590bbf)
Currently translated at 71.2% (52 of 73 strings) Translation: credit-control-12.0/credit-control-12.0-account_financial_risk Translate-URL: https://translation.odoo-community.org/projects/credit-control-12-0/credit-control-12-0-account_financial_risk/fr/
Currently translated at 79.5% (58 of 73 strings) Translation: credit-control-12.0/credit-control-12.0-account_financial_risk Translate-URL: https://translation.odoo-community.org/projects/credit-control-12-0/credit-control-12-0-account_financial_risk/it/
Currently translated at 100.0% (73 of 73 strings) Translation: credit-control-12.0/credit-control-12.0-account_financial_risk Translate-URL: https://translation.odoo-community.org/projects/credit-control-12-0/credit-control-12-0-account_financial_risk/es/
Currently translated at 13.7% (10 of 73 strings) Translation: credit-control-12.0/credit-control-12.0-account_financial_risk Translate-URL: https://translation.odoo-community.org/projects/credit-control-12-0/credit-control-12-0-account_financial_risk/es_CL/
Currently translated at 76.7% (56 of 73 strings) Translation: credit-control-12.0/credit-control-12.0-account_financial_risk Translate-URL: https://translation.odoo-community.org/projects/credit-control-12-0/credit-control-12-0-account_financial_risk/pt_BR/
Currently translated at 100.0% (73 of 73 strings) Translation: credit-control-12.0/credit-control-12.0-account_financial_risk Translate-URL: https://translation.odoo-community.org/projects/credit-control-12-0/credit-control-12-0-account_financial_risk/pt/
…ption. Improve views and translations.
…le_financial_risk: - Optimize code and change stored computed fields to not store to improve multi-company support - Improve multi-currency support - Convert risk amount fields to clickable link that shows traceability of amount origin - New pivot views to risk amount traceability - Simplify class style applied on risk fields - Migration script to remove old stored computed fields - Improve tests to cover new functionallity - Update translation files account_financial_risk: - Don't block refund invoice validation when partner has risk exception - Allow search partners by risk exception field - Remove obsolete cron sale_financial_risk - Create related store commercial_partner_id field in sale order line to simplify computation - Rename amt_to_invoice field to risk_amount in sale order line - Hook and migration scripts to reduce new fields computing time TT23765
This commit adds an specific group for overpassing partner credit limit exceptions In some situations, not only account managers shoud be allowed to overpass exception, depending on the company policies. Merging this code will not affect current instances, as long as account managers will be added to the new group.
Currently translated at 100.0% (91 of 91 strings) Translation: credit-control-16.0/credit-control-16.0-account_financial_risk Translate-URL: https://translation.odoo-community.org/projects/credit-control-16-0/credit-control-16-0-account_financial_risk/es/
Currently translated at 53.8% (49 of 91 strings) Translation: credit-control-16.0/credit-control-16.0-account_financial_risk Translate-URL: https://translation.odoo-community.org/projects/credit-control-16-0/credit-control-16-0-account_financial_risk/it/
…that depend on a non-stored field
Currently translated at 53.8% (49 of 91 strings) Translation: credit-control-16.0/credit-control-16.0-account_financial_risk Translate-URL: https://translation.odoo-community.org/projects/credit-control-16-0/credit-control-16-0-account_financial_risk/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: credit-control-16.0/credit-control-16.0-account_financial_risk Translate-URL: https://translation.odoo-community.org/projects/credit-control-16-0/credit-control-16-0-account_financial_risk/
…lexibility TT26717 TT31209
… buttons [IMP] account_financial_risk: Improve comments to make it more understandable TT32194
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: credit-control-16.0/credit-control-16.0-account_financial_risk Translate-URL: https://translation.odoo-community.org/projects/credit-control-16-0/credit-control-16-0-account_financial_risk/
Currently translated at 100.0% (94 of 94 strings) Translation: credit-control-16.0/credit-control-16.0-account_financial_risk Translate-URL: https://translation.odoo-community.org/projects/credit-control-16-0/credit-control-16-0-account_financial_risk/es/
- Include context keys for avoiding mail operations overhead.
…ecks to be not need to compute risk exception
Co-authored-by: sbiosca-s73 <[email protected]>
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: credit-control-17.0/credit-control-17.0-account_financial_risk Translate-URL: https://translation.odoo-community.org/projects/credit-control-17-0/credit-control-17-0-account_financial_risk/
Currently translated at 52.1% (49 of 94 strings) Translation: credit-control-16.0/credit-control-16.0-account_financial_risk Translate-URL: https://translation.odoo-community.org/projects/credit-control-16-0/credit-control-16-0-account_financial_risk/it/
Currently translated at 100.0% (92 of 92 strings) Translation: credit-control-17.0/credit-control-17.0-account_financial_risk Translate-URL: https://translation.odoo-community.org/projects/credit-control-17-0/credit-control-17-0-account_financial_risk/sv/
Only superadmins have access to this model, so let's do the operation with sudo for getting the ID, which is the only intention of that code. TT50264
…ount_financial_risk_user
Currently translated at 100.0% (92 of 92 strings) Translation: credit-control-17.0/credit-control-17.0-account_financial_risk Translate-URL: https://translation.odoo-community.org/projects/credit-control-17-0/credit-control-17-0-account_financial_risk/it/
7a97d08
to
a71d543
Compare
a71d543
to
22d8d9b
Compare
@carlosdauden, Can you help me with the migration review? |
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.
Functionally tested, LGTM.
Just a single comment regarding companies in account.account
, @carlosdauden, what do you think?
Note: Please squash the two latest commits.
+ [ | ||
("move_id.move_type", "in", ["out_invoice", "out_refund"]), | ||
("account_type", "=", "asset_receivable"), | ||
("parent_state", "in", ["draft", "proforma", "proforma2"]), |
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.
I think these states are obsolete and must be updated.
("parent_state", "in", ["draft", "proforma", "proforma2"]), | |
("parent_state", "=", "draft"), |
@api.model | ||
def _max_risk_date_due(self): | ||
return fields.Date.to_string( | ||
fields.Date.today() |
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.
Please use context_today
to avoid issues with UTC. In LATAM, where UTC is often negative, this is more common.
fields.Date.today() | |
fields.Date.context_today(self) |
account.company_id, | ||
self.env.company, |
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.
I understand that account.account
can now be shared across multiple companies, and the company_id
field is now a many2many
, according to this commit. So, I’m not sure if it’s the best approach to take the company from the environment.
No description provided.