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

I can't manage to disallow product creation from sale's order. 

Once i'm typing something that is not in my catalogue, Odoo keeps the option to create it on the fly, even if I disallowed create and edit from attributes as following.



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

Any one has the tips for Odoo 16 since this methods seems to not work ? 


Thanks !

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

Hi,

Add the following code in XML.

<xpath expr="//field[@name='product_template_id']" position="attributes">
<attribute name="options">{"no_open":true,"no_create":true}</attribute>
<attribute name="widget">many2one</attribute>
</xpath>

Regards

อวตาร
ละทิ้ง

Thanks Cybrosys Techno Solutions Pvt.Ltd !

คำตอบที่ดีที่สุด

The correct solution is here https:// www. youtube. com /watch?v=b1ApBZjyacw&ab_channel=LoredanaPepe

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

Hi Krafter,


Did you find a solution that worked? After some trial and error, I was able to make it work with Cy's code. Hope the steps below help:


1. Enable Studio

2. Go into any of your quotes and click Studio's icon.

3. Click on a product under the order line and click "Edit List View."

4. On the left hand side click on the "View" tab.

5. Click on "More" with the gear icon.

6. Click on "Inherited Views"

7. Select "Odoo Studio: sale.order.form.customization

8. Copy and paste the code Cy commented below.



อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
เม.ย. 25
985
1
มี.ค. 25
1264
1
มี.ค. 25
162
1
ธ.ค. 24
996
0
ส.ค. 23
1019