Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
5 Odpowiedzi
2143 Widoki

Hi there,

I need to add a new field to the customer sign up portal in the ecommerce website. I have made the field with odoo studio, but I cannot find a way to edit the customer sign up form.

I need to store EORI numbers for customers because they are required for shipping into europe. 

My version is saas 16.2.

Would be great if anyone knows the way to edit the sign up form with studio!

Awatar
Odrzuć
Autor Najlepsza odpowiedź

Thank you for your answers and information. I have used the "Extra info" option in studio at the checkout to add a custom box, and then a backend user will manually add the information to the customer account. This will be ok for now. It may be worth implementing built in support for Customer EORI numbers, as this is now a requirement for B2B shipping into the EU.

Awatar
Odrzuć
Najlepsza odpowiedź

This will helpful:



Awatar
Odrzuć
Najlepsza odpowiedź

Hi, this might help you: https://youtu.be/An6YTH3kJD8

Thanks

Awatar
Odrzuć
Najlepsza odpowiedź

Hi,

As you are using the saas 16.2 ,  i believe you cannot achieve this as you cannot add custom codes there. As explained in the another answer, you have to inherit and modify the corresponding template , which we can achieve from ui using the debug tools.

Even though you add new field to the view, you have to adjust the corresponding controller, which records data into the backend, but this we cannot achieve directly from the db without custom code.


Thanks

Awatar
Odrzuć
Najlepsza odpowiedź

Hi,

It is not possible to edit the sign up page with odoo Studio. However, you can add fields by editing code.

You need to inherit the template auth_signup.fields and using xpath add necessary fields in it.

Here's an example for your reference. 


<template id="signup_layout_replace" inherit_id="auth_signup.fields" name="sign up layout">
   <xpath expr="<xpath expr="//div[1]" position="after">

<div class="mb-3 field-login">

            <label for="new_field">New Field</label>

            <input type="text" name="new_field" t-att-value="new_field" id="new_field"

                   class="form-control form-control-sm" autofocus="autofocus"

                   autocapitalize="off" required="required"

                  />

</div>

</xpath>


This will create the new field after the name field.


Hope it helps

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
lip 25
1131
2
mar 25
1401
0
lut 25
1075
0
lut 25
1217
0
lut 25
1201