Skip to content

Commit

Permalink
[IMP] tools.get_file to support single extension
Browse files Browse the repository at this point in the history
  • Loading branch information
xaviedoanhduy committed Nov 27, 2024
1 parent 38e7a02 commit 1030e09
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions odoo_module_migrate/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ def get_files(module_path, extensions):
if not module_dir.is_dir():
raise Exception(f"'{module_path}' is not a valid directory.")

if isinstance(extensions, str):
extensions = (extensions,)

for ext in extensions:
file_paths.extend(module_dir.rglob(f"*{ext}"))

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink

0 comments on commit 1030e09

Please sign in to comment.