[IMP] website_payment, *: new snippet make a donation
*= website, website_sale, web_editor This commit add a new snippet donation for the website builder. PR-63133 task-2398403 Part-of: odoo/odoo#63133
This commit is contained in:
committed by
Jeremy Kersten
parent
ec005bae0e
commit
5ffce116a6
@@ -340,6 +340,14 @@ class Website(Home):
|
||||
t['numOfElFetch'] = attribs.get('data-number-of-elements-fetch')
|
||||
return templates
|
||||
|
||||
@http.route('/website/get_current_currency', type='json', auth="public", website=True)
|
||||
def get_current_currency(self, **kwargs):
|
||||
return {
|
||||
'id': request.website.company_id.currency_id.id,
|
||||
'symbol': request.website.company_id.currency_id.symbol,
|
||||
'position': request.website.company_id.currency_id.position,
|
||||
}
|
||||
|
||||
# ------------------------------------------------------
|
||||
# Edit
|
||||
# ------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="82px" height="60px" viewBox="0 0 82 60" enable-background="new 0 0 82 60" xml:space="preserve">
|
||||
<g>
|
||||
<rect fill="none" width="82" height="60"/>
|
||||
<g>
|
||||
<g transform="translate(6 17)">
|
||||
<polygon fill="#C7C7C7" points="27.15,-0.5 27.15,1.5 4.15,1.5 4.15,-0.5"/>
|
||||
<path fill="#595959" d="M27.15,5.5v1h-23v-1H27.15z M32.15,3.5v1h-28v-1H32.15z"/>
|
||||
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="-348.9588" y1="237.3286" x2="-348.9588" y2="236.3286" gradientTransform="matrix(25.5 0 0 -3.5 8915.5996 843.4)">
|
||||
<stop offset="0" style="stop-color:#00CECC"/>
|
||||
<stop offset="1" style="stop-color:#00A09D"/>
|
||||
</linearGradient>
|
||||
<path fill="none" stroke="url(#SVGID_1_)" stroke-width="0.5" d="M11.9,12.75v3.5H4.4v-3.5H11.9z M20.9,12.75v3.5h-7.5v-3.5H20.9
|
||||
z M29.9,12.75v3.5h-7.5v-3.5H29.9z"/>
|
||||
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="-341.9382" y1="259.7233" x2="-340.9382" y2="259.6367" gradientTransform="matrix(17 0 0 -5 5817.1001 1322.4)">
|
||||
<stop offset="0" style="stop-color:#00A09D"/>
|
||||
<stop offset="1" style="stop-color:#00E2FF"/>
|
||||
</linearGradient>
|
||||
<rect x="4.15" y="21.5" fill="url(#SVGID_2_)" width="17" height="5"/>
|
||||
</g>
|
||||
<g transform="translate(50 16)">
|
||||
<polyline fill="none" stroke="#C7C7C7" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" points="
|
||||
19.51,13.722 19.51,25.581 0.79,25.581 0.79,13.722"/>
|
||||
<rect x="-1.55" y="7.792" fill="none" stroke="#C7C7C7" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" width="23.4" height="5.929"/>
|
||||
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="-31.95" y1="301.7421" x2="-31.95" y2="300.7921" gradientTransform="matrix(1 0 0 -20.912 42.1 6316.312)">
|
||||
<stop offset="0" style="stop-color:#00CECC"/>
|
||||
<stop offset="1" style="stop-color:#00A09D"/>
|
||||
</linearGradient>
|
||||
<line fill="none" stroke="url(#SVGID_3_)" stroke-linecap="square" stroke-linejoin="round" x1="10.15" y1="25.625" x2="10.15" y2="6.804"/>
|
||||
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="-387.3105" y1="273.8488" x2="-387.3105" y2="272.8988" gradientTransform="matrix(18.2 0 0 -6.588 7059.2002 1804.8259)">
|
||||
<stop offset="0" style="stop-color:#00CECC"/>
|
||||
<stop offset="1" style="stop-color:#00A09D"/>
|
||||
</linearGradient>
|
||||
<path fill="none" stroke="url(#SVGID_4_)" stroke-linecap="round" stroke-linejoin="round" d="M4.885,0.875
|
||||
c4.095,0,5.265,5.929,5.265,5.929H4.885C3.27,6.804,1.96,5.477,1.96,3.84C1.96,2.202,3.27,0.875,4.885,0.875z M15.415,0.875
|
||||
c1.616,0,2.925,1.328,2.925,2.965c0,1.638-1.309,2.965-2.925,2.965l0,0H10.15C10.15,6.804,11.32,0.875,15.415,0.875z"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.9 KiB |
@@ -0,0 +1,18 @@
|
||||
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="82px" height="60px" viewBox="0 0 82 60" enable-background="new 0 0 82 60" xml:space="preserve">
|
||||
<g>
|
||||
<rect fill="none" width="82" height="60"/>
|
||||
<g>
|
||||
<g transform="translate(6 17)">
|
||||
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="-341.4267" y1="261.9717" x2="-338.8032" y2="261.7448" gradientTransform="matrix(17 0 0 -5 5817.1001 1322.4)">
|
||||
<stop offset="0" style="stop-color:#00A09D"/>
|
||||
<stop offset="1" style="stop-color:#00C0D9"/>
|
||||
</linearGradient>
|
||||
<rect x="12.846" y="6.55" fill="url(#SVGID_1_)" width="44.6" height="13.118"/>
|
||||
<path fill="#FFFFFF" d="M52.25,12.25v1.5H28.188v-1.5H52.25z"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<path fill="#FFFFFF" d="M29.36,27.145c-0.865-0.817-3.05-0.317-3.05,1.043v0.005c0-1.36-2.185-1.859-3.05-1.043
|
||||
c-0.866,0.818-0.842,2.208,0,3.05l3.05,3.05v-0.005l3.05-3.05C30.203,29.353,30.226,27.963,29.36,27.145z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -2057,3 +2057,18 @@ $o-theme-font-configs: (
|
||||
background-image: $-gradient;
|
||||
}
|
||||
};
|
||||
|
||||
@mixin o-input-number-no-arrows() {
|
||||
// Remove arrows/spinners from input type number
|
||||
// => Chrome, Safari, Edge, Opera
|
||||
input::-webkit-outer-spin-button,
|
||||
input::-webkit-inner-spin-button {
|
||||
-webkit-appearance: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
// => Firefox
|
||||
input[type=number] {
|
||||
-moz-appearance: textfield;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -123,6 +123,7 @@
|
||||
<t id="mail_group_hook"/>
|
||||
<t id="twitter_favorite_tweets_hook"/>
|
||||
<t t-snippet="website.s_embed_code" t-thumbnail="/website/static/src/img/snippets_thumbs/s_embed_code.svg"/>
|
||||
<t id="snippet_donation_hook"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -152,6 +153,7 @@
|
||||
<keywords>cite</keywords>
|
||||
</t>
|
||||
<t id="event_speaker_bio_hook"/>
|
||||
<t id="snippet_donation_button_hook"/>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
@@ -167,9 +169,11 @@
|
||||
<t id="newsletter_popup_snippet" t-install="mass_mailing" string="Newsletter Popup" t-thumbnail="/website/static/src/img/snippets_thumbs/newsletter_subscribe_popup.svg"/>
|
||||
<t t-install="website_mail_group" string="Discussion Group" t-thumbnail="/website/static/src/img/snippets_thumbs/s_group.svg"/>
|
||||
<t t-install="website_twitter" string="Twitter Scroller" t-thumbnail="/website/static/src/img/snippets_thumbs/s_twitter_scroll.svg"/>
|
||||
<t t-install="website_payment" string="Donation" t-thumbnail="/website/static/src/img/snippets_thumbs/s_donation.svg"/>
|
||||
</xpath>
|
||||
<xpath expr="//div[@id='snippet_content']//t[@t-snippet][last()]" position="after">
|
||||
<t id="newsletter_snippet" t-install="mass_mailing" string="Newsletter" t-thumbnail="/website/static/src/img/snippets_thumbs/s_newsletter_subscribe_form.svg"/>
|
||||
<t t-install="website_payment" string="Donation Button" t-thumbnail="/website/static/src/img/snippets_thumbs/s_donation_button.svg"/>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
@@ -525,7 +529,7 @@
|
||||
t-att-data-selector="so_snippet_addition_selector"
|
||||
data-drop-in=":not(p).oe_structure:not(.oe_structure_solo), :not(.o_mega_menu):not(p)[data-oe-type=html], :not(p).oe_structure.oe_structure_solo:not(:has(> section, > div))"/>
|
||||
|
||||
<t t-set="so_content_addition_selector" t-translation="off">blockquote, .s_card:not(.s_timeline_card), .s_alert, .o_facebook_page, .s_share, .s_rating, .s_hr, .s_google_map, .s_map, .s_countdown, .s_chart, .s_text_highlight, .s_progress_bar, .s_badge, .s_embed_code</t>
|
||||
<t t-set="so_content_addition_selector" t-translation="off">blockquote, .s_card:not(.s_timeline_card), .s_alert, .o_facebook_page, .s_share, .s_rating, .s_hr, .s_google_map, .s_map, .s_countdown, .s_chart, .s_text_highlight, .s_progress_bar, .s_badge, .s_embed_code, .s_donation</t>
|
||||
<div id="so_content_addition"
|
||||
t-att-data-selector="so_content_addition_selector"
|
||||
t-attf-data-drop-near="p, h1, h2, h3, ul, ol, .row > div > img, #{so_content_addition_selector}"
|
||||
|
||||
Reference in New Issue
Block a user