diff --git a/jikimo_test_assistant/__init__.py b/jikimo_test_assistant/__init__.py
new file mode 100644
index 00000000..b6de2276
--- /dev/null
+++ b/jikimo_test_assistant/__init__.py
@@ -0,0 +1,3 @@
+from . import models
+from . import controllers
+from . import wizards
diff --git a/jikimo_test_assistant/__manifest__.py b/jikimo_test_assistant/__manifest__.py
new file mode 100644
index 00000000..f9902300
--- /dev/null
+++ b/jikimo_test_assistant/__manifest__.py
@@ -0,0 +1,32 @@
+{
+ 'name': '机企猫 测试助手',
+ 'version': '16.0.1.0.0',
+ 'category': 'Technical',
+ 'summary': '测试数据初始化工具',
+ 'description': """
+ 用于初始化测试环境数据的工具模块
+ """,
+ 'author': 'Jikimo',
+ 'website': 'www.jikimo.com',
+ 'depends': [
+ 'base',
+ 'sale_management',
+ 'purchase',
+ 'mrp',
+ 'stock',
+ 'account'
+ ],
+ 'data': [
+ 'security/ir.model.access.csv',
+ 'wizards/jikimo_data_clean_wizard.xml',
+ ],
+ 'assets': {
+ 'web.assets_backend': [
+ 'jikimo_test_assistant/static/src/js/data_clean_confirm.js',
+ ],
+ },
+ 'installable': True,
+ 'application': False,
+ 'auto_install': False,
+ 'license': 'LGPL-3',
+}
\ No newline at end of file
diff --git a/jikimo_test_assistant/controllers/__init__.py b/jikimo_test_assistant/controllers/__init__.py
new file mode 100644
index 00000000..cd4d6a8b
--- /dev/null
+++ b/jikimo_test_assistant/controllers/__init__.py
@@ -0,0 +1,2 @@
+# -*- coding: utf-8 -*-
+from . import main
\ No newline at end of file
diff --git a/jikimo_test_assistant/controllers/main.py b/jikimo_test_assistant/controllers/main.py
new file mode 100644
index 00000000..b2ef6810
--- /dev/null
+++ b/jikimo_test_assistant/controllers/main.py
@@ -0,0 +1,86 @@
+from odoo import http
+import logging
+import os
+import json
+import sys
+
+_logger = logging.getLogger(__name__)
+
+class Main(http.Controller):
+ @http.route('/api/pdf2image', type='http', auth='public', methods=['POST'], csrf=False)
+ def convert_pdf_to_image(self, **kwargs):
+ """将PDF文件转换为图片文件
+
+ Returns:
+ dict: 包含转换后图片url的字典
+ """
+ res = {}
+ try:
+ # 检查poppler是否可用
+ # if sys.platform.startswith('win'):
+ # if not os.environ.get('POPPLER_PATH'):
+ # return {
+ # 'code': 400,
+ # 'msg': '请先配置POPPLER_PATH环境变量'
+ # }
+ # else:
+ # import shutil
+ # if not shutil.which('pdftoppm'):
+ # return {
+ # 'code': 400,
+ # 'msg': '请先安装poppler-utils'
+ # }
+
+ # 获取上传的PDF文件
+ pdf_file = kwargs.get('file')
+ if not pdf_file:
+ res = {'code': 400, 'msg': '未找到上传的PDF文件'}
+
+ # 检查文件类型
+ if not pdf_file.filename.lower().endswith('.pdf'):
+ res = {'code': 400, 'msg': '请上传PDF格式的文件'}
+
+ # 读取PDF文件内容
+ pdf_content = pdf_file.read()
+
+ # 使用pdf2image转换
+ from pdf2image import convert_from_bytes
+ import tempfile
+
+ # 转换PDF
+ with tempfile.TemporaryDirectory() as path:
+ images = convert_from_bytes(pdf_content)
+ image_urls = []
+
+ # 保存每一页为图片
+ for i, image in enumerate(images):
+ image_path = os.path.join(path, f'page_{i+1}.jpg')
+ image.save(image_path, 'JPEG')
+
+ # 将图片保存到ir.attachment
+ with open(image_path, 'rb') as img_file:
+ attachment = http.request.env['ir.attachment'].sudo().create({
+ 'name': f'page_{i+1}.jpg',
+ 'datas': img_file.read(),
+ 'type': 'binary',
+ 'access_token': kwargs.get('access_token') or '123'
+ })
+ image_urls.append({
+ 'page': i+1,
+ 'url': f'/web/content/{attachment.id}'
+ })
+
+ res = {
+ 'code': 200,
+ 'msg': '转换成功',
+ 'data': image_urls
+ }
+
+ except Exception as e:
+ _logger.error('PDF转换失败: %s', str(e))
+ res = {
+ 'code': 500,
+ 'msg': f'转换失败: {str(e)}'
+ }
+ return json.JSONEncoder().encode(res)
+
diff --git a/jikimo_test_assistant/models/__init__.py b/jikimo_test_assistant/models/__init__.py
new file mode 100644
index 00000000..8b137891
--- /dev/null
+++ b/jikimo_test_assistant/models/__init__.py
@@ -0,0 +1 @@
+
diff --git a/jikimo_test_assistant/security/ir.model.access.csv b/jikimo_test_assistant/security/ir.model.access.csv
new file mode 100644
index 00000000..2e334571
--- /dev/null
+++ b/jikimo_test_assistant/security/ir.model.access.csv
@@ -0,0 +1,2 @@
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+access_jikimo_data_clean_wizard,jikimo_test_assistant.jikimo_data_clean_wizard,model_jikimo_data_clean_wizard,base.group_system,1,1,1,1
\ No newline at end of file
diff --git a/jikimo_test_assistant/static/src/js/data_clean_confirm.js b/jikimo_test_assistant/static/src/js/data_clean_confirm.js
new file mode 100644
index 00000000..a4cd07ec
--- /dev/null
+++ b/jikimo_test_assistant/static/src/js/data_clean_confirm.js
@@ -0,0 +1,50 @@
+odoo.define('jikimo_test_assistant.action_clean_data_confirm', function (require) {
+ const core = require('web.core');
+ const ajax = require('web.ajax');
+ const Dialog = require('web.Dialog');
+ var rpc = require('web.rpc');
+ var _t = core._t;
+
+ async function action_clean_data_confirm(parent, {params}) {
+ let message = "确认清理数据?
"
+ message += "日期:"+ params.date + "以前
"
+ message += "模型:" + params.model_names.join(',')
+ const dialog = new Dialog(parent, {
+ title: "确认",
+ $content: $('