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

I'm creating a 8.0 module and want to create this record in an xml if the record hasn't already been created by anyone else:

<record id="bg" model="res.partner.bank.type">
    <field name="name">Bankgiro</field>
    <field name="code">bg</field>
</record>
Is there a way in xml to have this conditioned like "if not 'bg' in res.partner.bank.type" the go ahead an create the record, else do nothing!

The thing is, there's another module that creates this record but I don't want to depend on that module just for this. And I don't want to create duplicate records like it does right now.

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

if all your modules shares similar identical information, it might be wiser to do build a base module of yours, and make other modules depend on it. so you will have no conflict with any.

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 6 22
13
0
thg 9 21
2545
4
thg 1 20
13463
2
thg 9 18
3843
2
thg 5 24
7608