refactor: Adjust image_process import path, update sign route type to jsonrpc, and add a .gitignore file.
This commit is contained in:
parent
78da1859f5
commit
f4b4dedb70
22
.gitignore
vendored
Normal file
22
.gitignore
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# Python
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
|
||||||
|
# Odoo
|
||||||
|
*.log
|
||||||
|
.env
|
||||||
|
.venv/
|
||||||
|
venv/
|
||||||
|
*.pot
|
||||||
|
*.po~
|
||||||
|
|
||||||
|
# VSCode
|
||||||
|
.vscode/
|
||||||
|
|
||||||
|
# PyCharm
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
# OS
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -6,14 +6,14 @@ from PIL import Image
|
|||||||
|
|
||||||
from odoo import http
|
from odoo import http
|
||||||
from odoo.http import request
|
from odoo.http import request
|
||||||
from odoo.tools import image_process
|
from odoo.tools.image import image_process
|
||||||
from odoo.addons.sign.controllers.main import Sign
|
from odoo.addons.sign.controllers.main import Sign
|
||||||
|
|
||||||
_logger = logging.getLogger(__name__)
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
class SignController(Sign):
|
class SignController(Sign):
|
||||||
|
|
||||||
@http.route(['/sign/sign/<int:request_id>/<token>'], type='json', auth='public')
|
@http.route(['/sign/sign/<int:request_id>/<token>'], type='jsonrpc', auth='public')
|
||||||
def sign_document(self, request_id, token, signature=None, items=None, **kwargs):
|
def sign_document(self, request_id, token, signature=None, items=None, **kwargs):
|
||||||
if items:
|
if items:
|
||||||
# Filter items that look like images (base64)
|
# Filter items that look like images (base64)
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user