Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
3069 มุมมอง

Hi, I'd like to disable the functionn of creating new products on the fly in sale order lines.

I have searched and found the code below and insert the code in developer mode:

options="{'no_create_edit': True, 'no_create': True}" context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom, 'company_id': parent.company_id}" attrs="{ 'readonly': [('product_updatable', '=', False)], 'required': [('display_type', '=', False)], }" force_save="1"/>





But it seems no working on my odoo instance, even after reboot odoo service. The create and more button still there.

Anybody know how to fix it? Thanks in advanced.




อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

for this specific case, You need to create Custom view and Inherit this Main View and via XPATH you need to add attribute from UI / Developer Mode.

Or

Need to Create Custom Module and Apply those changes by Source instead of doing Manually Edit directly on Server.

Reason:- Once you reboot odoo service so it will take Source from ODOO Modules and you apply changes from UI so it's overridden while that module upgrade automatically once reboot ODOO service.



Thanks & Regards,
 Sunny Sheth

อวตาร
ละทิ้ง
ผู้เขียน

Thanks

Hi Jiashun Chen

Can you please upvote my answer if you have enough Karma / Points?

Thanks in Advance.

Related Posts ตอบกลับ มุมมอง กิจกรรม
2
เม.ย. 22
3655
3
พ.ค. 20
11965
5
ธ.ค. 19
5606
How to add a sequence a field? แก้ไขแล้ว
2
ธ.ค. 24
21563
0
ก.ย. 24
1221