Skip to content

[IMP] password_security: use ir.config_parameter#1

Closed
alexis-via wants to merge 1 commit into
DynAppsNV:17.0-mig-password_securityfrom
akretion:17.0-mig-password_security
Closed

[IMP] password_security: use ir.config_parameter#1
alexis-via wants to merge 1 commit into
DynAppsNV:17.0-mig-password_securityfrom
akretion:17.0-mig-password_security

Conversation

@alexis-via

Copy link
Copy Markdown

Replace fields on res.company by ir.config_parameter.
Remove dead test for v16 migration script.

There is one problem with this implementation: in odoo, when you set an integer ir.config_parameter to 0, the ir.config_parameter is deleted... so Odoo will use the default value. If the default value is 0 like auth_password_policy.minlength in the module auth_password_policy of the official addons, it's OK. But, in the module password_security, the default value is NOT 0.

I propose the following:

  • we set the default value to 0 in the ir.config_parameter definied in password_security
  • in post-migration script, we create the ir.config_parameter with the value we want as default value

If you agree with my proposal, I'll implement it in this PR.

@alexis-via

Copy link
Copy Markdown
Author

This PR aims at updating the v17 OCA migration PR OCA#610

Replace fields on res.company by ir.config_parameter
Remove dead test for v16 migration script
@alexis-via alexis-via force-pushed the 17.0-mig-password_security branch from dc7b86d to f9cf363 Compare November 21, 2024 22:27
@alexis-via

Copy link
Copy Markdown
Author

I implemented what I proposed in my comment.
As this PR didn't receive any attention from DynAppsNV, I'll propose it directly to OCA

@alexis-via alexis-via closed this Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant