devmodule odoo
This commit is contained in:
parent
01787a81ad
commit
bf1bffc6e6
@ -46,6 +46,7 @@ Ce script python va permettre d'automatiser l'installation des modules de base
|
||||
'board',
|
||||
'base_automation',
|
||||
'delivery',
|
||||
'l10n_fr'
|
||||
]
|
||||
|
||||
MODULES_TO_INSTALL = [
|
||||
@ -63,17 +64,82 @@ Ce script python va permettre d'automatiser l'installation des modules de base
|
||||
{'name': 'om_hr_payroll'},
|
||||
{'name': 'om_hr_payroll_account'}
|
||||
]},
|
||||
{'url': 'https://github.com/CybroOdoo/CybroAddons',
|
||||
#{'url': 'https://github.com/CybroOdoo/CybroAddons',
|
||||
#'apps': [
|
||||
# {'name': 'activity_reminder'},
|
||||
#]},
|
||||
{'url': 'https://github.com/OCA/server-tools',
|
||||
'apps': [
|
||||
{'name': 'base_view_inheritance_extension'}
|
||||
]},
|
||||
{'url': 'https://github.com/OCA/server-env',
|
||||
'apps': [
|
||||
{'name': 'activity_reminder'},
|
||||
{'name': 'server_environment'}
|
||||
]},
|
||||
{'url': 'https://github.com/OCA/edi',
|
||||
'apps': [
|
||||
{'name': 'account_einvoice_generate'},
|
||||
{'name': 'account_invoice_facturx'},
|
||||
{'name': 'base_facturx'}
|
||||
]},
|
||||
{'url': 'https://github.com/OCA/account-invoicing',
|
||||
'apps': [
|
||||
{'name': 'account_invoice_transmit_method'}
|
||||
]},
|
||||
{'url': 'https://github.com/OCA/account-reconcile',
|
||||
'apps': [
|
||||
{'name': 'account_statement_base'}
|
||||
]},
|
||||
{'url': 'https://github.com/OCA/reporting-engine',
|
||||
'apps': [
|
||||
{'name': 'report_xlsx'}
|
||||
]},
|
||||
{'url': 'https://github.com/OCA/mis-builder',
|
||||
'apps': [
|
||||
{'name': 'mis_builder'}
|
||||
]},
|
||||
{'url': 'https://github.com/OCA/bank-payment',
|
||||
'apps': [
|
||||
{'name': 'account_payment_mode'},
|
||||
{'name': 'account_payment_partner'}
|
||||
]},
|
||||
{'url': 'https://github.com/OCA/bank-statement-import',
|
||||
'apps': [
|
||||
{'name': 'account_statement_import_base'},
|
||||
{'name': 'account_statement_import_file'},
|
||||
{'name': 'account_statement_import_sheet_file'}
|
||||
]},
|
||||
{'url': 'https://github.com/OCA/community-data-files',
|
||||
'apps': [
|
||||
{'name': 'base_unece'},
|
||||
{'name': 'uom_unece'},
|
||||
{'name': 'account_tax_unece'},
|
||||
{'name': 'account_payment_unece'}
|
||||
]},
|
||||
{'url': 'https://github.com/OCA/server-ux',
|
||||
'apps': [
|
||||
{'name': 'date_range'}
|
||||
]},
|
||||
{'url': 'https://github.com/OCA/l10n-france',
|
||||
'apps': [
|
||||
{'name': 'l10n_fr_account_tax_unece'},
|
||||
{'name': 'l10n_fr_oca'},
|
||||
{'name': 'account_statement_impon Systems dashboards. Such style of reports presents KPI in rows and time periods in columns. Reports mainly fetch data from account moves, but can also combine data coming from arbitrary Odoo models. Reports can be exported to PDF, Excel and they can be added to Odoo drt_fr_cfonb'},
|
||||
{'name': 'l10n_fr_chorus_account'},
|
||||
{'name': 'l10n_fr_account_invoice_facturx'},
|
||||
{'name': 'l10n_fr_chorus_factur-x'},
|
||||
{'name': 'l10n_fr_fec_oca'},
|
||||
{'name': 'l10n_fr_mis_reports'},
|
||||
{'name': 'l10n_fr_siret'},
|
||||
{'name': 'l10n_fr_siret_lookup'}
|
||||
]},
|
||||
{'url': 'https://github.com/OCA/web',
|
||||
'apps': [
|
||||
{'name': 'web_responsive'}
|
||||
]},
|
||||
{'url': 'https://gitlab.com/garagenum/odoo/gn_discount',
|
||||
{'url': 'https://git.legaragenumerique.fr/odoo/gn_odoo',
|
||||
'apps': [
|
||||
{'name': None}
|
||||
{'name': 'gn_account_pcg_asso'}
|
||||
]}
|
||||
]
|
||||
|
||||
@ -111,7 +177,7 @@ Ce script python va permettre d'automatiser l'installation des modules de base
|
||||
if module_id:
|
||||
module = odoo.env['ir.module.module'].browse(module_id)[0]
|
||||
if module.state not in ['installed', 'to upgrade']:
|
||||
time.sleep(1)
|
||||
time.sleep(0.3)
|
||||
module.button_immediate_install()
|
||||
print(f"Module {odoo_app} has been installed.")
|
||||
else:
|
||||
@ -127,7 +193,7 @@ Ce script python va permettre d'automatiser l'installation des modules de base
|
||||
def dl_modules(group):
|
||||
repo_url = group['url'].rstrip('/')
|
||||
addons_path = "addons"
|
||||
|
||||
|
||||
sparse_checkout_lines = []
|
||||
for app in group['apps']:
|
||||
if app['name'] != None:
|
||||
@ -155,7 +221,7 @@ Ce script python va permettre d'automatiser l'installation des modules de base
|
||||
src_path = os.path.join(addons_path, 'tmp')
|
||||
merge_directories(src_path, addons_path)
|
||||
shutil.rmtree(src_path)
|
||||
|
||||
|
||||
print(f"Modules {', '.join(app['name'] if app['name'] else group['url'] for app in group['apps'])} has been downloaded")
|
||||
|
||||
def update_module_list(odoo):
|
||||
@ -175,16 +241,17 @@ Ce script python va permettre d'automatiser l'installation des modules de base
|
||||
time.sleep(1)
|
||||
for group in MODULES_TO_INSTALL:
|
||||
for app in group['apps']:
|
||||
app_name = app['name'] if app['name'] != None else group['url'].split('/')[-1]
|
||||
install_app(odoo, app_name)
|
||||
app_name = app['name'] if app['name'] != None else group['url'].split('/')[-1]
|
||||
install_app(odoo, app_name)
|
||||
|
||||
def main():
|
||||
configure_folders()
|
||||
odoo = connect_odoo()
|
||||
install_apps(odoo)
|
||||
#time.sleep(5)
|
||||
time.sleep(3)
|
||||
install_modules(odoo)
|
||||
print("Script execution finished!")
|
||||
|
||||
main()
|
||||
|
||||
```
|
||||
Loading…
x
Reference in New Issue
Block a user