Browse Source

corrections

dev-rcn
root 3 years ago
parent
commit
772736cc79
9 changed files with 159 additions and 33 deletions
  1. +3
    -1
      __manifest__.py
  2. +1
    -1
      controllers/kalachakra.py
  3. +21
    -1
      static/js/kalachakra.js
  4. +1
    -1
      views/account_portal_templates.xml
  5. +11
    -0
      views/auth_sign_up_login_templates.xml
  6. +16
    -16
      views/booking_website_registration.xml
  7. +1
    -0
      views/portal.xml
  8. +84
    -0
      views/portal_templates.xml
  9. +21
    -13
      views/website_participation.xml

+ 3
- 1
__manifest__.py View File

@ -59,7 +59,9 @@
'views/ir.attachment.xml',
'views/account_portal_templates.xml',
'views/website_snippets.xml',
'views/portal.xml'
'views/portal.xml',
'views/auth_sign_up_login_templates.xml',
'views/portal_templates.xml'
],


+ 1
- 1
controllers/kalachakra.py View File

@ -518,7 +518,7 @@ class kalachakra_event(WebsiteEventController,PaymentProcessing):
partner.street=''
partner.street2=''
partner.zip=''
partner.city=''
data['partner']=partner
data['country_id']=int(country_france.id)


+ 21
- 1
static/js/kalachakra.js View File

@ -58,6 +58,26 @@ odoo.define('kalachakra.main', function (require) {
{
alert('merci de saisir un montant')
}
else if ($("#name_id").val()=='')
{
alert('merci de saisir votre nom')
}
else if ($("#firstname_id").val()=='')
{
alert('merci de saisir votre prénom')
}
else if ($("#street1_id").val()=='')
{
alert('merci de saisir votre adresse')
}
else if ($("#city_id").val()=='')
{
alert('merci de saisir votre ville')
}
else if ($("#zip_id").val()=='')
{
alert('merci de saisir votre code postal')
}
else
{
$( "#form" ).submit();
@ -67,7 +87,7 @@ odoo.define('kalachakra.main', function (require) {
}
else
{
alert("You have entered an invalid email address!")
alert("adresse e-mail invalide")
}


+ 1
- 1
views/account_portal_templates.xml View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!-- modification de la page présentant la facture -->
<template id="portal_invoice_page" name="Invoice Portal Template" inherit_id="account.portal_invoice_page">
<xpath expr="//div[1][@class='small']" position="replace">
</xpath>


+ 11
- 0
views/auth_sign_up_login_templates.xml View File

@ -0,0 +1,11 @@
<odoo>
<!-- suppression du placeholder John Doe sur le champ nom -->
<template id="auth_signup_fields" name="auth_signup_fields" inherit_id="auth_signup.fields">
<xpath expr="//input[@name='name']" position="replace">
<input type="text" name="name" t-att-value="name" id="name" class="form-control form-control-sm"
required="required" t-att-readonly="'readonly' if only_passwords else None"
t-att-autofocus="'autofocus' if login and not only_passwords else None" />
</xpath>
</template>
</odoo>

+ 16
- 16
views/booking_website_registration.xml View File

@ -97,46 +97,46 @@
<section class="s_website_form pt16 pb16 o_colored_level">
<h6>Participant :</h6>
<div class="form-group s_website_form_field col-6 s_website_form_custom s_website_form_required " data-type="char" data-name="Field">
<div class="form-group s_website_form_field col-12 col-sm-6 col-md-6 s_website_form_custom s_website_form_required" data-type="char" data-name="Field">
<div class="row s_col_no_resize s_col_no_bgcolor">
<label class="col-form-label col-sm-auto s_website_form_label" style="width: 200px" for="9ois9pkv0wv">
<span class="s_website_form_label_content">Name</span>
<span class="s_website_form_mark"> *</span>
</label>
<div class="col-sm">
<div class="col-12 col-sm-6 col-md-6">
<input type="text" class="form-control s_website_form_input" name="name" t-att-value="partner.name" required="1" id="name" style="cursor: auto;"/>
</div>
</div>
</div>
<div class="form-group s_website_form_field col-6 s_website_form_custom s_website_form_required " data-type="char" data-name="Field">
<div class="form-group s_website_form_field col-12 col-sm-6 col-md-6 s_website_form_custom s_website_form_required" data-type="char" data-name="Field">
<div class="row s_col_no_resize s_col_no_bgcolor">
<label class="col-form-label col-sm-auto s_website_form_label" style="width: 200px" for="9ois9pkv0wv">
<span class="s_website_form_label_content">First name</span>
<span class="s_website_form_mark"> *</span>
</label>
<div class="col-sm">
<div class="col-12 col-sm-6 col-md-6">
<input type="text" class="form-control s_website_form_input" name="firstname" t-att-value="partner.firstname" required="1" id="firstname" style="cursor: auto;"/>
</div>
</div>
</div>
<div class="form-group s_website_form_field col-4 s_website_form_custom s_website_form_required" data-type="char" data-name="Field">
<div class="form-group s_website_form_field col-12 col-sm-4 col-md-4 s_website_form_custom s_website_form_required" data-type="char" data-name="Field">
<div class="row s_col_no_resize s_col_no_bgcolor">
<label class="col-form-label col-sm-auto s_website_form_label" style="width: 200px" for="9ois9pkv0wv">
<span class="s_website_form_label_content">Age</span>
<span class="s_website_form_mark"> *</span>
</label>
<div class="col-sm">
<div class="col-12 col-sm-4 col-md-4">
<input type="number" class="form-control s_website_form_input" name="age" required="1" id="age" style="cursor: auto;"/>
</div>
</div>
</div>
<div class="form-group s_website_form_field col-4 s_website_form_custom s_website_form_required" data-type="char" data-name="Field">
<div class="form-group s_website_form_field col-12 col-sm-4 col-md-4 s_website_form_custom s_website_form_required" data-type="char" data-name="Field">
<div class="row s_col_no_resize s_col_no_bgcolor">
<label class="col-form-label col-sm-auto s_website_form_label" style="width: 200px" for="9ois9pkv0wv">
<span class="s_website_form_label_content">Gender</span>
<span class="s_website_form_mark"> *</span>
</label>
<div class="col-sm">
<div class="col-12 col-sm-4 col-md-4">
<select id="gender" name="gender" class="form-control s_website_form_input">
<option name="male" value="male" label="Homme"></option>
<option name="femelle" value="femelle" label="Femme"></option>
@ -145,47 +145,47 @@
</div>
</div>
</div>
<div class="form-group s_website_form_field col-5 s_website_form_custom s_website_form_required" data-type="char" data-name="Field">
<div class="form-group s_website_form_field col-12 col-sm-5 col-md-5 s_website_form_custom s_website_form_required" data-type="char" data-name="Field">
<div class="row s_col_no_resize s_col_no_bgcolor">
<label class="col-form-label col-sm-auto s_website_form_label" style="width: 200px" for="9ois9pkv0wv">
<span class="s_website_form_label_content">City</span>
<span class="s_website_form_mark"> *</span>
</label>
<div class="col-sm">
<div class="col-12 col-sm-5 col-md-5">
<input type="text" id='city' class="form-control s_website_form_input" name="city" t-att-value="partner.city" style="cursor: auto;"/>
</div>
</div>
</div>
<div class="form-group s_website_form_field col-5 s_website_form_custom " data-type="char" data-name="Field">
<div class="form-group s_website_form_field col-12 col-sm-5 col-md-5 s_website_form_custom " data-type="char" data-name="Field">
<div class="row s_col_no_resize s_col_no_bgcolor">
<label class="col-form-label col-sm-auto s_website_form_label" style="width: 200px" for="9ois9pkv0wv">
<span class="s_website_form_label_content">Phone</span>
<span class="s_website_form_mark"></span>
</label>
<div class="col-sm">
<div class="col-12 col-sm-5 col-md-5">
<input type="text" id='phone' class="form-control s_website_form_input" name="phone" t-att-value="partner.phone" style="cursor: auto;"/>
</div>
</div>
</div>
<div class="form-group s_website_form_field col-5 s_website_form_custom" data-type="char" data-name="Field">
<div class="form-group s_website_form_field col-12 col-sm-5 col-md-5 s_website_form_custom" data-type="char" data-name="Field">
<div class="row s_col_no_resize s_col_no_bgcolor">
<label class="col-form-label col-sm-auto s_website_form_label" style="width: 200px" for="9ois9pkv0wv">
<span class="s_website_form_label_content">Mobile</span>
<span class="s_website_form_mark"></span>
</label>
<div class="col-sm">
<div class="col-12 col-sm-5 col-md-5">
<input type="text" class="form-control s_website_form_input" name="mobile" t-att-value="partner.mobile" id="mobile" style="cursor: auto;"/>
</div>
</div>
</div>
<div class="form-group s_website_form_field col-6 s_website_form_custom" data-type="char" data-name="Field">
<div class="form-group s_website_form_fieldcol-12 col-sm-6 col-md-6 s_website_form_custom" data-type="char" data-name="Field">
<div class="row s_col_no_resize s_col_no_bgcolor">
<label class="col-form-label col-sm-auto s_website_form_label" style="width: 200px" for="9ois9pkv0wv">
<span class="s_website_form_label_content">email</span>
<span class="s_website_form_mark"></span>
</label>
<div class="col-sm">
<div class="col-12 col-sm-12 col-md-6">
<input type="text" class="form-control s_website_form_input" name="email" t-att-value="partner.email" id="email" style="cursor: auto;"/>
</div>
</div>


+ 1
- 0
views/portal.xml View File

@ -1,4 +1,5 @@
<odoo>
<!-- suppression des devis et bon de commandes -->
<template id="portal_my_home" name="portal_my_home" inherit_id="portal.portal_my_home" customize_show="True" priority="30">
<xpath expr="//t[1][@t-call='portal.portal_docs_entry']" position="replace">


+ 84
- 0
views/portal_templates.xml View File

@ -0,0 +1,84 @@
<odoo>
<template id="portal_my_details" name="portal my details" inherit_id="portal.portal_my_details">
<xpath expr="//div[@class='row o_portal_details']" position="replace">
<div class="row o_portal_details">
<div class="col-lg-8">
<div class="row">
<t t-set="partner_can_edit_vat" t-value="partner.can_edit_vat()"/>
<div class="col-lg-12">
<div t-if="error_message" class="alert alert-danger" role="alert">
<t t-foreach="error_message" t-as="err"><t t-esc="err"/><br /></t>
</div>
</div>
<div t-attf-class="form-group #{error.get('name') and 'o_has_error' or ''} col-xl-6">
<label class="col-form-label" for="name">Name</label>
<input type="text" name="name" t-attf-class="form-control #{error.get('name') and 'is-invalid' or ''}" t-att-value="name or partner.name" />
</div>
<div t-attf-class="form-group #{error.get('email') and 'o_has_error' or ''} col-xl-6">
<label class="col-form-label" for="email">Email</label>
<input type="email" name="email" t-attf-class="form-control #{error.get('email') and 'is-invalid' or ''}" t-att-value="email or partner.email" />
</div>
<div class="clearfix" />
<div t-attf-class="form-group #{error.get('phone') and 'o_has_error' or ''} col-xl-6">
<label class="col-form-label" for="phone">Phone</label>
<input type="tel" name="phone" t-attf-class="form-control #{error.get('phone') and 'is-invalid' or ''}" t-att-value="phone or partner.phone" />
</div>
<div class="clearfix" />
<div t-attf-class="form-group #{error.get('street') and 'o_has_error' or ''} col-xl-6">
<label class="col-form-label" for="street">Street</label>
<input type="text" name="street" t-attf-class="form-control #{error.get('street') and 'is-invalid' or ''}" t-att-value="street or partner.street"/>
</div>
<div t-attf-class="form-group #{error.get('city') and 'o_has_error' or ''} col-xl-6">
<label class="col-form-label" for="city">City</label>
<input type="text" name="city" t-attf-class="form-control #{error.get('city') and 'is-invalid' or ''}" t-att-value="city or partner.city" />
</div>
<div t-attf-class="form-group #{error.get('zip') and 'o_has_error' or ''} col-xl-6">
<label class="col-form-label label-optional" for="zipcode">Zip / Postal Code</label>
<input type="text" name="zipcode" t-attf-class="form-control #{error.get('zip') and 'is-invalid' or ''}" t-att-value="zipcode or partner.zip" />
</div>
<div t-attf-class="form-group #{error.get('country_id') and 'o_has_error' or ''} col-xl-6">
<label class="col-form-label" for="country_id">Country</label>
<select name="country_id" t-attf-class="form-control #{error.get('country_id') and 'is-invalid' or ''}">
<option value="">Country...</option>
<t t-foreach="countries or []" t-as="country">
<option t-att-value="country.id" t-att-selected="country.id == int(country_id) if country_id else country.id == partner.country_id.id">
<t t-esc="country.name" />
</option>
</t>
</select>
</div>
<div t-attf-class="form-group #{error.get('state_id') and 'o_has_error' or ''} col-xl-6">
<label class="col-form-label label-optional" for="state_id">State / Province</label>
<select name="state_id" t-attf-class="form-control #{error.get('state_id') and 'is-invalid' or ''}">
<option value="">select...</option>
<t t-foreach="states or []" t-as="state">
<option t-att-value="state.id" style="display:none;" t-att-data-country_id="state.country_id.id" t-att-selected="state.id == partner.state_id.id">
<t t-esc="state.name" />
</option>
</t>
</select>
</div>
<input type="hidden" name="redirect" t-att-value="redirect"/>
</div>
<div class="clearfix">
<button type="submit" class="btn btn-primary float-right mb32 ">
Confirm
<span class="fa fa-long-arrow-right" />
</button>
</div>
</div>
</div>
</xpath>
</template>
<!-- on supprime mfa -->
<template id="totp_portal_hook" name="TOTP Portal hook" inherit_id="portal.portal_my_security">
<xpath expr="//section[2]" position="replace">
</xpath>
</template>
</odoo>

+ 21
- 13
views/website_participation.xml View File

@ -43,7 +43,7 @@ reduced participation for pensions in the Sarthe.</h6>
<div class="w-100"></div>
<div class="form-group col-lg-2" id="div_title">
<div class="form-group col-lg-2 s_website_form_custom s_website_form_required" id="div_title">
<label class="col-form-label font-weight-bold" for="title_id">Title<span class="s_website_form_mark"> *</span>
</label>
<select id="title_id" name="title_id" class="o_wpayment_fee_impact form-control ">
@ -53,43 +53,50 @@ reduced participation for pensions in the Sarthe.</h6>
</select>
</div>
<div id="div_firstname" class="form-group col-lg-4">
<div id="div_firstname" class="form-group col-lg-4 s_website_form_custom s_website_form_required">
<label class="col-form-label font-weight-bold" for="email">Firstname
<span class="s_website_form_mark"> *</span>
</label>
<input type="text" id="firstname_id" name="firstname" class="form-control " t-att-value="partner.name"/>
<input type="text" id="firstname_id" name="firstname" required="1" class="form-control " t-att-value="partner.firstname"/>
</div>
<div id="div_name" class="form-group col-lg-4">
<div id="div_name" class="form-group col-lg-4 s_website_form_custom s_website_form_required">
<label class="col-form-label font-weight-bold" for="email">Name
<span class="s_website_form_mark"> *</span>
</label>
<input type="text" id="name_id" name="name" class="form-control " t-att-value="partner.firstname"/>
<input type="text" id="name_id" name="name" class="form-control " required="1" t-att-value="partner.name"/>
</div>
<div id="div_street" class="form-group col-lg-4">
<div id="div_street" class="form-group col-lg-4 s_website_form_custom s_website_form_required">
<label class="col-form-label font-weight-bold" for="email">Street 1
<span class="s_website_form_mark"> *</span>
</label>
<input type="text" id="street_id" name="street" class="form-control " t-att-value="partner.street"/>
<input type="text" id="street1_id" name="street" class="form-control " required="1" t-att-value="partner.street"/>
</div>
<div id="div_street1" class="form-group col-lg-4">
<label class="col-form-label font-weight-bold" for="email">Street 2
</label>
<input type="text" id="street1_id" name="street1" class="form-control " t-att-value="partner.street2"/>
<input type="text" id="street2_id" name="street1" class="form-control " t-att-value="partner.street2"/>
</div>
<div id="div_zip" class="form-group col-lg-2">
<div id="div_street" class="form-group col-lg-4 s_website_form_custom s_website_form_required">
<label class="col-form-label font-weight-bold" for="email">City
<span class="s_website_form_mark"> *</span>
</label>
<input type="text" id="city_id" name="city" class="form-control " required="1" t-att-value="partner.city"/>
</div>
<div id="div_zip" class="form-group col-lg-2 s_website_form_custom s_website_form_required">
<label class="col-form-label font-weight-bold" for="zip">Zip
<span class="s_website_form_mark"> *</span>
</label>
<input type="text" id="zip_id" name="zip" class="form-control " t-att-value="partner.zip"/>
<input type="text" id="zip_id" name="zip" class="form-control" required="1" t-att-value="partner.zip"/>
</div>
<div class="form-group col-lg-2" id="div_country">
<div class="form-group col-lg-2 s_website_form_custom s_website_form_required" id="div_country">
<label class="col-form-label font-weight-bold" for="country_id">Country<span class="s_website_form_mark"> *</span>
</label>
<select id="country_id" name="country_id" class="o_wpayment_fee_impact form-control ">
@ -122,7 +129,8 @@ reduced participation for pensions in the Sarthe.</h6>
<button type="button" class="list-group-item">500 €</button>
<button type="button" class="list-group-item">250 €</button>
<button type="button" class="list-group-item">108 €</button>
</div>
<div class="btn-group btn-group-justified" role="group">
<button type="button" class="list-group-item">50 €</button>
<button type="button" class="list-group-item">21 €</button>
<button type="button" class="list-group-item">10 €</button>


Loading…
Cancel
Save