Skip to content

Commit 6cd8435

Browse files
committed
Merge PR OCA#679 into 16.0
Signed-off-by pedrobaeza
2 parents 98a33a3 + 9feb331 commit 6cd8435

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

vault_share/static/src/backend/fields/vault_field.esm.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,22 @@ import vault from "vault";
1111

1212
// Extend the widget to share
1313
patch(VaultField.prototype, "vault_share", {
14+
get shareButton() {
15+
return this.props.value;
16+
},
1417
/**
1518
* Share the value for an external user
1619
*
1720
* @private
1821
*/
19-
async _onShareValue() {
22+
async _onShareValue(ev) {
23+
ev.stopPropagation();
2024
const iv = await utils.generate_iv_base64();
2125
const pin = sh_utils.generate_pin(sh_utils.PinSize);
2226
const salt = utils.generate_bytes(utils.SaltLength).buffer;
2327
const key = await utils.derive_key(pin, salt, utils.Derive.iterations);
2428
const public_key = await vault.get_public_key();
25-
const value = await this._decrypt(this.value);
29+
const value = await this._decrypt(this.props.value);
2630

2731
this.action.doAction({
2832
type: "ir.actions.act_window",

0 commit comments

Comments
 (0)