opt backup app

This commit is contained in:
Ivan Office
2024-10-09 21:49:12 +08:00
parent 8b2b329dc2
commit f80e942286
12 changed files with 187 additions and 7 deletions

View File

@@ -1,14 +1,23 @@
# -*- coding: utf-8 -*-
# 'author': "Yenthe Van Ginneken",
# 'website': "http://www.odoo.yenthevg.com",
# 'author': "guohuadeng@hotmail.com",
# 'website': "https://www.odooai.cn",
{
'name': "Database auto backup,数据库自动备份",
'name': "Database auto backup and Download,数据库自动备份",
'version': '16.24.10.09',
'summary': 'Automated backups, optimized from auto_backup of Yenthe Van Ginneken',
'summary': 'Automated and odoo database backups. easy download and manage database file. optimized from auto_backup of oca Yenthe Van Ginneken',
'description': """
1. Easy schedule database backup
2. Set remote backup and cron schedule
3. Manual backup database in one click
4. Easy download backup file or remove file for System user
11. Multi-language Support. Multi-Company Support.
12. Support Odoo 18,17,16,15,14,13,12, Enterprise and Community and odoo.sh Edition.
13. Full Open Source.
The Database Auto-Backup module enables the user to make configurations for the automatic backup of the database.
Backups can be taken on the local system or on a remote server, through SFTP.
You only have to specify the hostname, port, backup location and databasename (all will be pre-filled by default with correct data.

View File

@@ -15,6 +15,8 @@ class AppAutoBackup(http.Controller):
@http.route("/dbbackup/download/<path:file_path>", type="http", auth="user")
def download_backupfile(self, file_path, **kw):
_logger.warning('download_backupfile: %s', file_path)
if not self.env.user.has_group('base.group_system'):
raise UserError(_('File not found for user.'))
if os.path.exists(file_path):
try:
with open(file_path, 'rb') as file:

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 64 KiB

View File

@@ -1,3 +1,108 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
# -*- coding: utf-8 -*-
##############################################################################
# Copyright (C) 2009~2024 odooAi.cn
##############################################################################
-->
<html>
<!-- begin title-->
<section class="oe_container container o_cc o_cc2">
<h2 class="text-center bg-warning text-white pt24 pb24">Database auto backup. Easy schedule backup and Download </h2>
<h3 class="text-center">数据库自动备份及快速下载</h3>
</section>
<!-- end title-->
<section class="oe_container container">
<div class="oe_row oe_spaced" >
<div class="row">
<div class="oe_row">
<h3>Latest update: v16.24.10.09</h3>
<div class="row">
<img class="oe_demo oe_screenshot img img-fluid" style="max-height: 100%;" src="banner.png">
</div>
<div class="oe_span12 oe_spaced">
<div class="alert alert-info" style="padding:8px;font-weight: 300; font-size: 20px;">
<i class="fa fa-hand-o-right"></i><b> Key features: </b>
<ul class="list-unstyled">
<li>
<i class="fa fa-check-square-o text-primary"></i>
1. Easy schedule database backup
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
2. Set remote backup and cron schedule
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
3. Manual backup database in one click
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
4. Easy download backup file or remove file for System user
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
11. Multi-language Support. Multi-Company Support.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
12. Support Odoo 18,17,16,15,14,13,12, Enterprise and Community and odoo.sh Edition.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
13. Full Open Source.
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- quick demo-->
<section class="oe_container container">
<div class="oe_row oe_spaced">
<h2 class="bg-warning text-center pt8 pb8 mt16 mb16">1. Easy schedule database backup</h2>
<h4 class="oe_slogan">快速按日程自动备份,方便的直接下载 </h4>
<div class="oe_demo oe_screenshot img img-fluid">
<img src="demo1.jpg"/>
</div>
</div>
</section>
<section class="oe_container container">
<div class="oe_row oe_spaced">
<h2 class="bg-warning text-center pt8 pb8 mt16 mb16">2. Set remote backup and cron schedule</h2>
<h4 class="oe_slogan">支持远程备份 </h4>
<div class="oe_demo oe_screenshot img img-fluid">
<img src="demo2.jpg"/>
</div>
</div>
</section>
<section class="oe_container container">
<div class="oe_row oe_spaced">
<h2 class="bg-warning text-center pt8 pb8 mt16 mb16">3. Manual backup database in one click</h2>
<h4 class="oe_slogan">一键手动备份 </h4>
<div class="oe_demo oe_screenshot img img-fluid">
<img src="demo3.jpg"/>
</div>
</div>
</section>
<section class="oe_container container">
<div class="oe_row oe_spaced">
<h2 class="bg-warning text-center pt8 pb8 mt16 mb16">4. Easy download backup file or remove file for System user</h2>
<h4 class="oe_slogan">系统用户可以直接下载所有数据库备份文件,进行备份管理</h4>
<div class="oe_demo oe_screenshot img img-fluid">
<img src="demo4.jpg"/>
</div>
</div>
</section>
<!-- end quick demo-->
<section class="oe_container container">
<div class="oe_row oe_spaced">
<div class="row">
@@ -94,3 +199,69 @@
</div>
</div>
</section>
<!-- begin free-->
<!-- end free-->
<!-- begin howto-->
<section class="oe_container container s_text_block o_colored_level pt16 pb16">
<h2 class="text-center bg-info text-white pt16 pb16">- How to setup and use -</h2>
<h3>This app need no extra module. The price already included</h3>
</section>
<section class="oe_container container">
<div class="oe_row oe_spaced">
<h4 class="pt16">
1. Buy and Install
</h4>
<h4 class="pt16">
2. Read the app description for user guide
</h4>
<h4 class="pt16">
3. Enjoy and easy use
</h4>
<div class="row">
<div class="oe_demo oe_screenshot img img-fluid">
<img src="banner.png">
</div>
</div>
<h4 class="pt16">4. More information in our FAQ</h4>
<div class="row">
https://www.odooai.cn/faq
</div>
</div>
</section>
<!-- end howto-->
<!-- begin upsell-->
<!-- end upsell-->
<!-- begin support-->
<section class="container oe_dark">
<div class="oe_row oe_spaced text-center">
<div class="row">
<h2 class="oe_slogan">Technical Help & Support</h2>
</div>
<div class="col-md-12 pad0">
<div class="oe_mt16">
<p><h4 class="pt16">
For any type of technical help & support requests, Feel free to contact us</h4></p>
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
class="btn btn-warning btn-lg" rel="nofollow" href="mailto:odoo@china.com"><span
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
<i class="fa fa-envelope"></i> odoo@china.com</a>
<p><h4 class="pt16">
Via QQ: 300883 (App user would not get QQ or any other IM support. Only for odoo project customize.)</h4></p>
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
class="btn btn-warning btn-lg" rel="nofollow" href="mailto:300883@qq.com"><span
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
<i class="fa fa-envelope"></i> 300883@qq.com</a>
</div>
<div class="oe_mt16">
<h4 class="pt16">Visit our website for more support.</h4>
<h4 class="pt16">https://www.odooai.cn</h4>
</div>
</div>
</div>
</section>
<!-- end support-->
</html>

View File

@@ -39,7 +39,7 @@
{
'name': "odooAi Common Util and Tools,欧度智能基础核心优化",
'version': '16.24.08.26',
'version': '16.24.10.09',
'author': 'odooai.cn',
'category': 'Extra tools',
'website': 'https://www.odooai.cn',

View File

@@ -3,8 +3,6 @@
import os.path
from odoo import api, fields, models, modules, tools, SUPERUSER_ID, _
from odoo.tests import common
ADMIN_USER_ID = common.ADMIN_USER_ID
def app_quick_import(env, content_path, sep=None, context={}):
if not sep: