« Odoo-portail » : différence entre les versions
Aucun résumé des modifications |
Aucun résumé des modifications |
||
| Ligne 12 : | Ligne 12 : | ||
!!! Il faut que l'utilisateur ait un mail valide, il recevra l'invitation à créer son mot de passe d'accès par ce biais. !!! | !!! Il faut que l'utilisateur ait un mail valide, il recevra l'invitation à créer son mot de passe d'accès par ce biais. !!! | ||
=== template de mail avec URL de validation === | |||
<code> | |||
<p>% set access_action = object.get_access_action() | |||
% set doc_name = 'quotation' if object.state in ('draft', 'sent') else 'order confirmation' | |||
% set is_online = access_action and access_action['type'] == 'ir.actions.act_url' | |||
% set access_name = is_online and object.template_id and 'Accept and pay %s online' % doc_name or 'View %s' % doc_name | |||
% set access_url = is_online and access_action['url'] or object.get_signup_url() | |||
</p><div style="font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; "> | |||
<p style="margin:0px 0px 10px 0px;">Bonjour ${object.partner_id.name},</p><p style="margin:0px 0px 10px 0px;"><br></p> | |||
<p style="margin:0px 0px 10px 0px;">Voici votre ${object.state in ('draft', 'sent') and 'devis' or 'confirmation de commande'} de ${object.company_id.name} : </p> | |||
<div style="margin:0px 0px 10px 0px;border-left: 1px solid #8e0000; margin-left: 30px;"> | |||
<p> <strong>REFERENCES</strong><br></p> | |||
<p> Numéro du devis : <strong>${object.name} </strong><br></p> | |||
<p> Total du devis : <strong>${object.amount_untaxed} ${object.pricelist_id.currency_id.name} HT </strong>( ${object.amount_total} TTC )<br></p> | |||
<p> Date du devis : ${object.date_order}<br></p> | |||
</div> | |||
<p> | |||
% if object.origin: | |||
Référence de la commande : ${object.origin}<br></p><p> | |||
% endif | |||
% if object.client_order_ref: | |||
Votre référence : ${object.client_order_ref}<br></p><p> | |||
% endif | |||
% if object.user_id: | |||
Votre contact : <a style="text-decoration-color:-moz-use-text-color;cursor:pointer;color:rgb(51, 122, 183);" href="mailto:${object.user_id.email or ''}?subject=Commande%20${object.name}" marked="1">${object.user_id.name}</a> | |||
% endif | |||
</p> | |||
<br><p></p><p></p><p> | |||
% if is_online: | |||
</p><center> | |||
<a class="o_default_snippet_text" style="background-color: #32749e; padding: 20px; text-decoration: none; color: #fff; border-radius: 5px; font-size: 16px;" href="${access_url}">${access_name}</a> | |||
<br><p></p><p></p><p></p><p></p><p><br></p> | |||
<p> | |||
<span style="color:#000">(or view attached PDF)</span> | |||
</p> | |||
</center> | |||
<br><p></p><p></p><p></p><p> | |||
% endif | |||
</p><p style="margin:0px 0px 10px 0px;">Si vous avez des questions, n'hésitez pas à nous contacter.</p> | |||
<p style="margin:0px 0px 10px 0px;">Merci d'avoir choisi ${object.company_id.name or 'notre société'}</p> | |||
<br><p></p><p></p><p></p><p> | |||
</p><p><br></p><p><br></p> | |||
<div style="width: 347px; margin: 0px; padding: 5px 14px; line-height: 16px; background-color: #32749;"> | |||
<span style="color: #32749; margin-bottom: 5px; display: block; "> | |||
${object.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe} | |||
</span> | |||
% if object.company_id.phone: | |||
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "> | |||
Tél : ${object.company_id.phone} | |||
</div> | |||
% endif | |||
% if object.company_id.website: | |||
<div> | |||
Web : <a style="text-decoration-color:-moz-use-text-color;cursor:pointer;color:rgb(51, 122, 183);" href="${object.company_id.website}" marked="1">${object.company_id.website}</a> | |||
</div> | |||
%endif | |||
<p style="margin:0px 0px 10px 0px;"></p> | |||
</div> | |||
</div><p></p> | |||
</code> | |||
Version du 30 avril 2018 à 09:58
Odoo - Portail
activer les options
Activer l'option qui va bien pour que les clients puissent valider les devis
ventes => configuration => clients => devis en ligne. + "Envoyer les devis aux clients qui peut approuver et payer en ligne (option avancée)"
gestion des utilisateurs
Aller dans la fiche "client" et dans les "actions" => "gestion de l'accès au portail"
!!! Il faut que l'utilisateur ait un mail valide, il recevra l'invitation à créer son mot de passe d'accès par ce biais. !!!
template de mail avec URL de validation
% set access_action = object.get_access_action()
% set doc_name = 'quotation' if object.state in ('draft', 'sent') else 'order confirmation'
% set is_online = access_action and access_action['type'] == 'ir.actions.act_url'
% set access_name = is_online and object.template_id and 'Accept and pay %s online' % doc_name or 'View %s' % doc_name
% set access_url = is_online and access_action['url'] or object.get_signup_url()
Bonjour ${object.partner_id.name},
Voici votre ${object.state in ('draft', 'sent') and 'devis' or 'confirmation de commande'} de ${object.company_id.name} :
REFERENCES
Numéro du devis : ${object.name}
Total du devis : ${object.amount_untaxed} ${object.pricelist_id.currency_id.name} HT ( ${object.amount_total} TTC )
Date du devis : ${object.date_order}
% if object.origin:
Référence de la commande : ${object.origin}
% endif
% if object.client_order_ref:
Votre référence : ${object.client_order_ref}
% endif
% if object.user_id:
Votre contact : <a style="text-decoration-color:-moz-use-text-color;cursor:pointer;color:rgb(51, 122, 183);" href="mailto:${object.user_id.email or }?subject=Commande%20${object.name}" marked="1">${object.user_id.name}</a>
% endif
% if is_online:
<a class="o_default_snippet_text" style="background-color: #32749e; padding: 20px; text-decoration: none; color: #fff; border-radius: 5px; font-size: 16px;" href="${access_url}">${access_name}</a>
(or view attached PDF)
% endif
Si vous avez des questions, n'hésitez pas à nous contacter.
Merci d'avoir choisi ${object.company_id.name or 'notre société'}
${object.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe}
% if object.company_id.phone:
Tél : ${object.company_id.phone}
% endif
% if object.company_id.website:
Web : <a style="text-decoration-color:-moz-use-text-color;cursor:pointer;color:rgb(51, 122, 183);" href="${object.company_id.website}" marked="1">${object.company_id.website}</a>
%endif