Skip to content
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

[RFC] field prefix control #4

Open
rvalyi opened this issue Aug 16, 2022 · 1 comment
Open

[RFC] field prefix control #4

rvalyi opened this issue Aug 16, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@rvalyi
Copy link
Member

rvalyi commented Aug 16, 2022

coming soon:

if you do nothing prefix = f"{schema}{version}_" taken from SCHEMA and VERSION env vars
but from a standard xsdata config (generate one with xsdata init-config), you can change the FieldName safePrefix to anything you want. You can set it to "" for no prefix. Or you can set it to NO_PREFIX_NO_SAFE_NAME to have no prefix and no safe_name mapping.

@rvalyi rvalyi added the enhancement New feature or request label Aug 16, 2022
@rvalyi
Copy link
Member Author

rvalyi commented Aug 22, 2022

this is now implemented in the OdooFilters#field_name method ut should be documented.
However, I figured out we can still load our own configuration if we do it in the beginning of xsdata_odoo/hook.py
TODO: see if it's more practical than the ENV vars...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant