Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
5218 Lượt xem

I created a field in the contact card called "nit". I also inserted the "nit" field in the contact address form in the ecommerce module. But I can't get the value that I insert from the ecommerce address to be saved in the contact card. At the most I managed to show me the value that it has saved in the client's file, but not edit it. This is the code I put in the address management of the website_sale.address view:

 <form action="/shop/address" method="post" class="checkout_autoformat">
                                <div class="form-row">

.

.

.

<div t-attf-class="form-group #{error.get('nit_ci') and 'o_has_error' or ''} col-lg-6">
                                        <label class="col-form-label" for="nit_ci">nit_ci</label>
                                        <input type="nit_ci" name="nit_ci" t-attf-class="form-control #{error.get('nit_ci') and 'is-invalid' or ''}" t-att-value="'nit_ci' in checkout and checkout['nit_ci']"/>
                                    </div>




Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

The res.partner fields you want to show on the webshop address form need to have the flag
website_form_blacklisted set to False. See website_sale/data/data.xml on how to do that in an xml file using the formbuilder_whitelist function.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi Franklin

I am in the same situation that you were when you wrote this problem.

Did you find any solution?

Add a new field to the "Address" form in the e-commerce module, already add the field in the form, already add the field in the "res.partner" view, and add the field in the "Contact" model, but when filling in the field from the website form it does not save the information that I add, only if I edit it from within if it leaves me.

I appreciate that you can help me or guide me.

Greetings.


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 3 22
610
0
thg 10 20
2584
1
thg 2 25
4400
0
thg 12 22
2207
4
thg 6 21
17602