Browse Source

Merge pull request #690 from Tecnativa/9.0-avoid_resave_sign

[FIX][WIP] Avoid to save sign every time form is saved
pull/374/merge
Pedro M. Baeza 6 years ago
committed by GitHub
parent
commit
b29cdf1ea8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 758
      web_widget_digitized_signature/static/lib/jSignature/jSignatureCustom.js
  2. 4
      web_widget_digitized_signature/static/src/js/digital_sign.js

758
web_widget_digitized_signature/static/lib/jSignature/jSignatureCustom.js
File diff suppressed because it is too large
View File

4
web_widget_digitized_signature/static/src/js/digital_sign.js

@ -81,6 +81,9 @@ odoo.define('web_widget_digitized_signature.web_digital_sign', function(require)
self.do_warn(_t("Image"), _t("Could not display the selected image."));
});
} else if (this.view.get("actual_mode") === 'edit') {
if (! self.$el.find(".signature").jSignature("isModified")) {
return;
}
this.$el.find('> img').remove();
if (this.get('value')) {
var field_name = this.options.preview_image
@ -119,4 +122,3 @@ odoo.define('web_widget_digitized_signature.web_digital_sign', function(require)
});
});
Loading…
Cancel
Save