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

How can I make the fields "Fiscal Position" and "Customer Payment Term" mandatory field for creating a new company that is marked as Customer?

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

You can use attrs tag in xml.

For example:

<field name="property_payment_term" attrs="{'required': [('customer','=',True)]}"/>

This will make Customer Payment Term field mandatory when Customer is True.

Same thing you can apply for other fields also.

Ảnh đại diện
Huỷ bỏ
Tác giả

Thank you for the quick answer. In the developer mode I selected the Edit Form View option to see and edit the xml. But unfortunately I can not find the fields of the Accounting Tab. Do you know where I can find them in order to edit them?

Tác giả

I can not find this field. Maybe you can make a screenshoot to show me where to find it?

property_payment_term is on line: 86

Câu trả lời hay nhất

Can you resolved this issue? I customize field pack in form product and when I create the product I have the problem

creation/update: a mandatory field is not correctly set
[object with reference: Product Template - product.template]

but, I already create product in product.template but still have warning this.


any ideas? can somebody answer me? thank you.


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

Hi Robert.

You can use attrs attribute to make mandatory field depending on the other field.

For e.g. attrs="{'required': [('customer', '=', True)]}"

image description

Ảnh đại diện
Huỷ bỏ
Tác giả

Hi Keyur, thank you for the quick answer! Unfortunately I can not find the fields of the Accounting Tab in the View Editor. do you know how to access the fields to change the attributes?

You can only see field of Accounting if the partner is a company. Check my updated answer.

Tác giả

I checked the "is a Comnpany" box and selected the Accounting Tab, but when I edit the re.partner form in the View Editor, I only see the fields of the Contacts Tab, the Internal Notes Tab, the Sales & Purchase Tab and the Warnings Tab. There are neither fields from the Payment Payment Follow-up nor from the Accounting Tab :-(

Câu trả lời hay nhất

have you resolved this issue? I also have the same problem

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 2 25
1378
0
thg 1 25
1162
1
thg 12 24
1520
1
thg 6 22
5673
Field __last_update Đã xử lý
1
thg 2 19
5016