You can Simply use this xml snippet for this to disable auto option
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<!-- Inherit the existing template for NameAndSignature -->
<t t-inherit="web.NameAndSignature" t-inherit-mode="extension">
<xpath expr="//div[@t-if='state.showSignatureArea']" position="attributes">
<attribute name="t-if">true</attribute>
</xpath>
<xpath expr="//canvas[@t-if='state.showSignatureArea']" position="attributes">
<attribute name="t-if">true</attribute>
</xpath>
<!-- If wanted to hide Auto button -->
<xpath expr="//a[@t-on-click.prevent='onClickSignAuto']" position="replace"/>
</t>
</templates>
and add this xml file web.assets_frontend. along with this js file in static
/** @odoo-module **/
import { NameAndSignature } from "@web/core/signature/name_and_signature";
NameAndSignature.prototype.onInputSignName = function (ev) {
// Always force name to a string
this.props.signature.name = ev.target.value || "";
// DO NOT change showSignatureArea state here, so area stays as you want
// DO NOT auto redraw signature
};
NameAndSignature.prototype.getCleanedName = function () {
const text = this.props.signature.name || "";
if (this.props.signatureType === "initial" && text.length > 0) {
return (
text
.split(" ")
.map(w => w[0])
.join(".") + "."
);
}
return text;
};
Any update?
We think the same, this is not legal in spain.
Did you find a solution?
@Sergio: Sorry, I didn't find any solution until now.