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

i have xml with noupdate="1", to delete some model.

but when i update module the delete xml still called.

how to prevent xml delete again. this is my code:

<odoo>

    <data noupdate="1">

        <delete model="ir.actions.report.xml" id="purchase.action_report_purchase_order"/>

        <delete model="ir.actions.report.xml" id="purchase.report_purchase_quotation"/>

    </data>

</odoo>

อวตาร
ละทิ้ง

Interested in a solution as well, did you find something?

ผู้เขียน

still didn't have solution. when update module via terminal show some error message, but when system running, the error not affected on system, and module have no error again.

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


In Odoo 10 and up (and maybe earlier), you can specify a "search" attribute like so, which only deletes found records:

<delete model="ir.actions.report.xml" search="[('id', '=', ref('purchase.action_report_purchase_order'))]"/>

In older versions of Odoo, you can first create a minimal dummy record before deleting it (I have not tested this):

<report id="purchase.action_report_purchase_order" model="purchase.order"/>
<delete model="ir.actions.report.xml" id="purchase.action_report_purchase_order"/>
อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Duplicate the "contact creation" group, and remove the delete right for all models in the access rights tab.

Then asign that group to the selected user,


Kind regards,

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Delete Blank Lines แก้ไขแล้ว
1
ส.ค. 24
1673
Delete Company (Odoo v14) แก้ไขแล้ว
1
พ.ย. 23
4172
Data for relations table แก้ไขแล้ว
1
เม.ย. 24
2175
Delete my account แก้ไขแล้ว
3
พ.ย. 24
10428
1
ส.ค. 22
2936