Compare commits

...

2 Commits
main ... 19.0

11 changed files with 29 additions and 4 deletions

22
.gitignore vendored Normal file
View 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

View File

@ -17,9 +17,6 @@
'views/sign_item_views.xml',
],
'assets': {
'web.assets_frontend': [
'sign_sequence_field/static/src/xml/sign_item_sequence.xml',
],
'web.assets_backend': [
'sign_sequence_field/static/src/xml/sign_item_sequence.xml',
'sign_sequence_field/static/src/js/sign_item_custom_popover_patch.js',

Binary file not shown.

View File

@ -93,7 +93,7 @@ class SignController(Sign):
except Exception:
return request.not_found()
@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):
# Intercept items to prevent saving the URL as value
if items:

View File

@ -5,3 +5,9 @@ class SignItemType(models.Model):
_inherit = "sign.item.type"
item_type = fields.Selection(selection_add=[('sequence', "Sequence")], ondelete={'sequence': 'cascade'})
def _compute_dimensions(self):
super(SignItemType, self.filtered(lambda r: r.item_type != 'sequence'))._compute_dimensions()
for record in self.filtered(lambda r: r.item_type == 'sequence'):
record.default_width = 0.15
record.default_height = 0.015