跳至内容
菜单
此问题已终结
5 回复
1870 查看

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!

形象
丢弃
编写者 最佳答案

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.

形象
丢弃
最佳答案

This will helpful:



形象
丢弃
最佳答案

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

Thanks

形象
丢弃
最佳答案

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

形象
丢弃
最佳答案

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

形象
丢弃
相关帖文 回复 查看 活动
1
5月 25
687
2
3月 25
1091
0
2月 25
806
0
2月 25
899
0
2月 25
907