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

loaders.load_csv: allow relative paths w/ ODOO_DATA_PATH #36

Merged
merged 1 commit into from
Mar 19, 2018

Conversation

simahawk
Copy link
Member

No description provided.

:param model: Odoo model name or model klass from env
:param path: absolute or relative path to CSV file.
If a relative path is given you must provide a value for
`ODOO_DATA_PATH` in your environment
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"or set the --odoo-data-path option"

anthem/cli.py Outdated
@@ -53,9 +57,21 @@ def main():
'configuration file and -d for the database name. Those must be at '
'the end of the arguments'
)
parser.add_argument(
'odoo-data-path',
nargs=argparse.REMAINDER,
Copy link
Contributor

@guewen guewen Mar 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REMAINDER is to take all the "unknown" remaining args, which will be passed down to odoo, only odoo-args should use it. This argument should probably only have action='store_true' action='store' (the default) and no nargs

@guewen
Copy link
Contributor

guewen commented Mar 19, 2018

Travis says:

usage: anthem [-h] [-i] [-q] target ... odoo-data-path
anthem: error: too few arguments

@simahawk
Copy link
Member Author

@guewen damn, somehow I lost the -- before arg name :( Should be ok now

@guewen guewen merged commit b60609c into camptocamp:master Mar 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants