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

Hi,

I created a new module that add a new field "user_last_change_state" to the object "account.invouce", and I've done some code with this field.

I needed that older records to have this field equal to 1 (admin id ).

Someone knows how to set the new data field with a default value to existent records?

Thanks

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

The simplest form is to do it from a sql script in postgresql. If you have linux, you could do it using pgadmin3 software. The script will be like this: UPDATE [file] SET [field] = 'value' WHERE [condition] ;

الصورة الرمزية
إهمال
الكاتب

I did that... but it this the best way ?

I my experience yes.... but maybe there's something better.

الكاتب

Hope that someone knows a better way =)

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مايو 22
3948
1
أغسطس 19
3904
1
ديسمبر 21
6374
0
أكتوبر 21
2944
1
أكتوبر 21
3747