تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
30830 أدوات العرض

For a custom module I had to define some sequences in XML.

I saw an example using the following attribute:

<data noupdate="1">....</data>

What   is ...noupdate="1"...  used for?

الصورة الرمزية
إهمال
أفضل إجابة

Hello all,

noupdate means when second time this module will upgraded, this record will not be updated again. The record which is inside noupdate="1" will be initialized only at installation time.  

Tip : In case if you delete the record then at next update system will Re-create it. Usually those kind of records which are having possibility of modification from front end, given inside noupdate=1. For example, automatic scheduler records. 

Hope this will help,

الصورة الرمزية
إهمال

I have issue with this.
Let's say I have a model with two field. Name with text field and description as text field.
I add two record that only fill the Name field inside xml with noupdate=1 (like in the question)
Those two data successfully inserted

But when I edit the description, the next time I upgrade the module, the description return to empty.
At first I think it's because in the xml I didn't put description field.
Is this suppose to happen? or the description should not be empty after upgrade?

أفضل إجابة

This record will never be updated. Not only second time.
It's also used for demo data in modules for example.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
7
أغسطس 20
11336
1
يناير 23
2514
1
أبريل 22
18364
0
يناير 22
2324
3
أغسطس 20
5100