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

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>

Ảnh đại diện
Huỷ bỏ

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

Tác giả

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.

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


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"/>
Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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,

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
Delete Blank Lines Đã xử lý
1
thg 8 24
1703
1
thg 11 23
4215
1
thg 4 24
2212
Delete my account Đã xử lý
3
thg 11 24
10480
1
thg 8 22
2996