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

Hello it seem in Quotation, Sales or Accouting when i have import a wrong item it automatically create so many random item. So i would like to know how to remove the ability to create products on the sale.order, quotation and accouting form view:


i use to have this code with it.


{'no_create': True, 'no_create_edit':True}

but it seem dont work anymore. Any tips guys.

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

I tried in Studio and it worked - note that the field name is product_template_id 


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

This can be done directly through Studio (in v18 at least)...

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

Hi David,

Have you found any solution for this field product_template_id i​n V16/V17?

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


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

Hi,
You can inherit the form view of the sales order and invoicing. Add the attribute ‘options’ to the field and make no_create_edit values True. eg:

<field name="product_id" position="attributes">
<attribute name="options">{'no_create': True, 'no_create_edit':True}</attribute>
</field>


Hope it helps,

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

Yeah got the same code. but seems dont work on V17...

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 10 25
227
0
thg 10 25
506
0
thg 10 25
432
2
thg 10 25
6195
2
thg 10 25
708