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

I tried adding a model constraint of type 'u' from Settings -> Database Structure -> Model constraints to res.partner's base module. But there was no way to specify column/field name to which the constraint should apply ?

I hope there is a way to add constraint without altering any Odoo code. 

Any suggestions ?

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

I think there is no option to add constraint from back end.

الكاتب

Will adding/updating ir.model.constraint work without creating any other issue ?

أفضل إجابة

Hi

To add this you must go to the code

It can not be increased by the user interface

because you deserve to restart the server odoo 

look this code 

https://stackoverflow.com/questions/31513326/what-is-the-correct-format-to-use-unique-in-sql-constraints-in-openerp

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
4
مارس 15
12052
1
مارس 15
7880
2
أغسطس 25
3550
1
فبراير 22
3763
1
نوفمبر 24
20223