Ir al contenido
Menú
Se marcó esta pregunta
3 Respuestas
1337 Vistas

Hi, I hope someone can help me


I am building a web site in odoo online and the following situation:


I need to configure the subscriptions and when making the payment it asks me as a requirement that the customer has inserted the VAT ID but in the customer registration it does not ask the customer to enter it with which the customer would have to go to enter it later and this can be a problem since many customers would not do this.


I can't find a way to modify the registration form to also ask for the dni, how can I do this?


another solution would be that when the customer enters his address the VAT ID field is mandatory.


How would this be done?


thanks.

Avatar
Descartar
Autor Mejor respuesta

but you mean HTMLS/CSS button to enter the code, don't you?


because from the edit button of the web site application it does not let me modify the form.


Avatar
Descartar
Mejor respuesta

In Odoo, you can customize the registration form and make the VAT ID (DNI) field mandatory. Here are two potential solutions:

Solution 1: Add VAT ID Field to the Registration Form

  1. Activate Developer Mode:
    • Log in to your Odoo instance.
    • Activate Developer Mode by adding ?debug=assets to your URL and then selecting "Activate the developer mode" from the user menu.
  2. Edit the Registration Form:
    • Go to the website module and navigate to the registration form.
    • Use the "Edit" button to modify the form.
  3. Add VAT ID Field:
    • Inside the form, add a new field for the VAT ID. You can use the following XML snippet as an example:
      xml
    • Customize the form layout according to your needs.
  4. Save and Apply Changes:
    • Save your changes and apply them.

Solution 2: Make VAT ID Field Mandatory During Address Entry

  1. Activate Developer Mode:
    • Follow the same steps as mentioned in Solution 1 to activate Developer Mode.
  2. Edit the Address Form:
    • Locate the form where customers enter their address information (e.g., checkout process, customer portal).
  3. Make VAT ID Field Mandatory:
    • Add the required attribute to the VAT ID field in the address form. Example:
      xml

Save and Apply Changes:

  • Save your changes and apply them.


Avatar
Descartar