Skip to Content
Menu
This question has been flagged
2 Replies
1937 Views

Hello!

Is it somehow possible in the quotes customer-view (in the customer-portal) to disable the option "auto" in the signature module?

In my opinion, the process should start directly with the option "draft". I don't think that a signature with auto mode is legally binding.

I don't think it's user friendly if the customer has to click on "draft" first to place his real signature.

I really would love to use the signature module if it is possible to disable this auto-option.

Thanks for your support
Daniel


PS: I would have posted a screenshot but am not yet allowed to post images.


Avatar
Discard

Any update?

We think the same, this is not legal in spain.

Did you find a solution?

Author

@Sergio: Sorry, I didn't find any solution until now.

Best Answer

I've found a better solution which works generally and not just for the portal:


odoo.define('your_module.name_and_signature_extension', function (require) {
"use strict";

var NameAndSignature = require('web.name_and_signature').NameAndSignature;

NameAndSignature.include({
init: function (parent, options) {
// Ensure options is an object to avoid errors
options = options || {};
// Set default mode to 'draw' if not provided
options.mode = options.mode || 'draw';
// Call the original init function with the modified options
this._super(parent, options);
},
});

});

put this snippet in a seperate modul at static/src/js 

and load file in web.assets_frontend section in manifest

"assets": {
​"web.assets_frontend": [
​"/your_module/static/src/js/name_and_signature.js",
​],
}


with this code the default_mode is set to 'draw'


Avatar
Discard
Best Answer

I found a solution:

Edit this file

portal/static/src/js/portal_signature.js

change in line 161:

'mode': this.$el.data('mode'),

by

'mode': 'draw',

and add this later to the same file:

var style = jQuery('');
jQuery('html > head').append(style);
Avatar
Discard
Related Posts Replies Views Activity
0
Jan 25
422
1
Oct 24
822
1
Aug 23
1219
0
Jun 23
1339
2
Dec 23
3125