[FIX] sale: change type of signature from Binary to Image
- ensure a valid image was given or prevent to save it otherwise, instead of allowing any file, which would then crash at display - restrict to a reasonable size PR: #38292 closes #38026 closes odoo/odoo#39098 X-original-commit: 92eafdf7e283e5474b1da2c88cfbdebbee17b48e Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
@@ -208,7 +208,7 @@ class SaleOrder(models.Model):
|
||||
change_default=True, default=_get_default_team, check_company=True, # Unrequired company
|
||||
domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]")
|
||||
|
||||
signature = fields.Binary('Signature', help='Signature received through the portal.', copy=False, attachment=True)
|
||||
signature = fields.Image('Signature', help='Signature received through the portal.', copy=False, attachment=True, max_width=1024, max_height=1024)
|
||||
signed_by = fields.Char('Signed By', help='Name of the person that signed the SO.', copy=False)
|
||||
signed_on = fields.Datetime('Signed On', help='Date of the signature.', copy=False)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user