Skip to content

Commit

Permalink
[IMP] website_sale_address_email_readonly (#248)
Browse files Browse the repository at this point in the history
[IMP] website_sale_address_email_readonly (#248)
  • Loading branch information
kanda999 authored Sep 13, 2023
1 parent 8e08371 commit 0b0947e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions website_sale_address_email_readonly/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Website Sale Address Email Readonly
This module does the following:

- Makes the address form email field in eCommerce checkout read-only if the user has email address.
- Hide the address form email field in eCommerce checkout if shipping mode.

**Table of contents**

Expand Down
1 change: 1 addition & 0 deletions website_sale_address_email_readonly/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
This module does the following:

- Makes the address form email field in eCommerce checkout read-only if the user has email address.
- Hide the address form email field in eCommerce checkout if shipping mode.
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ <h1 class="title">Website Sale Address Email Readonly</h1>
<p>This module does the following:</p>
<ul class="simple">
<li>Makes the address form email field in eCommerce checkout read-only if the user has email address.</li>
<li>Hide the address form email field in eCommerce checkout if shipping mode.</li>
</ul>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@
'readonly' if 'email' in checkout and checkout['email'] else None
</attribute>
</xpath>
<xpath expr="//div[@id='div_email']" position="attributes">
<attribute name="t-att-style">
'display: none;' if mode[1] == 'shipping' else ''
</attribute>
</xpath>
</template>
</odoo>

0 comments on commit 0b0947e

Please sign in to comment.