diff --git a/addons/payment/wizards/payment_link_wizard_views.xml b/addons/payment/wizards/payment_link_wizard_views.xml index 3c66f596c76..6581172607d 100644 --- a/addons/payment/wizards/payment_link_wizard_views.xml +++ b/addons/payment/wizards/payment_link_wizard_views.xml @@ -22,14 +22,18 @@ attrs="{'invisible':[('has_multiple_providers', '=', False)]}"/> - - - This partner has no email, which may cause issues with some payment providers. Setting an email for this partner is advised. diff --git a/addons/web/static/src/views/fields/copy_clipboard/copy_button.xml b/addons/web/static/src/views/fields/copy_clipboard/copy_button.xml index 4251187e41d..dcf05f77db0 100644 --- a/addons/web/static/src/views/fields/copy_clipboard/copy_button.xml +++ b/addons/web/static/src/views/fields/copy_clipboard/copy_button.xml @@ -5,7 +5,7 @@ diff --git a/addons/web/static/src/views/fields/copy_clipboard/copy_clipboard_field.js b/addons/web/static/src/views/fields/copy_clipboard/copy_clipboard_field.js index e5781cbca86..9c39cacb373 100644 --- a/addons/web/static/src/views/fields/copy_clipboard/copy_clipboard_field.js +++ b/addons/web/static/src/views/fields/copy_clipboard/copy_clipboard_field.js @@ -13,23 +13,32 @@ const { Component } = owl; class CopyClipboardField extends Component { setup() { - this.copyText = this.env._t("Copy"); + this.copyText = this.props.label || this.env._t("Copy"); this.successText = this.env._t("Copied"); } get copyButtonClassName() { - return `o_btn_${this.props.type}_copy`; + return `o_btn_${this.props.type}_copy btn-sm`; + } + get fieldProps() { + const fieldProps = {...this.props}; + delete fieldProps.label; + return fieldProps; } } CopyClipboardField.template = "web.CopyClipboardField"; CopyClipboardField.props = { ...standardFieldProps, + label: { type: String, optional: true }, +}; +CopyClipboardField.extractProps = ({ attrs }) => { + return { + label: attrs.options.label, + }; }; export class CopyClipboardButtonField extends CopyClipboardField { get copyButtonClassName() { - const classNames = [super.copyButtonClassName]; - classNames.push("rounded-2"); - return classNames.join(" "); + return `o_btn_${this.props.type}_copy rounded-2`; } } CopyClipboardButtonField.template = "web.CopyClipboardButtonField"; diff --git a/addons/web/static/src/views/fields/copy_clipboard/copy_clipboard_field.xml b/addons/web/static/src/views/fields/copy_clipboard/copy_clipboard_field.xml index d3640d07ee6..3fa316f86b3 100644 --- a/addons/web/static/src/views/fields/copy_clipboard/copy_clipboard_field.xml +++ b/addons/web/static/src/views/fields/copy_clipboard/copy_clipboard_field.xml @@ -3,7 +3,7 @@ - +
This partner has no email, which may cause issues with some payment providers. Setting an email for this partner is advised.