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

[FIX] csv2xml: Error when the module with csv folder has __openerp__py file. #3

Merged
merged 2 commits into from
Jul 25, 2017

Conversation

yaniaular
Copy link

@yaniaular yaniaular commented Jun 20, 2017

Issue #2

When the odoo's module has a __openerp__.py file, occurs a error because the if for check if the __openerp__.py file exists is fine, but, the next if checks again the __manifest__.py file and not should, because the __openerp__.py file already have been checked

…py file.

When the odoo's module has a __openerp__.py file, occurs a error because the if for check if the __openerp__.py file exists is fine, but, the next if checks again the __manifest__.py file and not should, because the __openerp__.py file already have been checked
@yaniaular
Copy link
Author

@zaoral Do you agree with this change?

Copy link
Contributor

@zaoral zaoral left a comment

Choose a reason for hiding this comment

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

@yaniaular yaniaular force-pushed the 0.1-fix_issue_2-dev-yani branch 2 times, most recently from 6111f5b to 95f13b9 Compare June 21, 2017 00:09
@yaniaular
Copy link
Author

@moylop260 Please, do you can me help to merge this?

@@ -452,7 +452,7 @@ def fix_module_name(path):
manifest_file = os.path.join(path, '__manifest__.py')
if os.path.exists(openerp_file) and os.path.isfile(openerp_file):
pass
if os.path.exists(manifest_file) and os.path.isfile(manifest_file):
elif os.path.exists(manifest_file) and os.path.isfile(manifest_file):

Choose a reason for hiding this comment

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

@yaniaular

What do you think about this change:

if not (os.path.exists(openerp_file) and os.path.isfile(openerp_file)) and not (os.path.exists(manifest_file) and os.path.isfile(manifest_file)):
    msg = ('The given module is not a openerp module. Missing'
                 ' __openerp__.py or __manifest__.py file.')		                 ' __openerp__.py or __manifest__.py file.')
         raise argparse.ArgumentTypeError(msg)		         raise argparse.ArgumentTypeError(msg)
     return path		     return path

To avoid the pass?

@moylop260 moylop260 merged commit 55b7f44 into Vauxoo:master Jul 25, 2017
@moylop260 moylop260 deleted the 0.1-fix_issue_2-dev-yani branch July 25, 2017 17:59
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.

4 participants