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

Dear all,

I am using Odoo 12 and need to set the "Discount on lines = True" for all users.

Can anyone help setting this as a default option for my module in ways when my module is installed all new users automatically get this option selected?

I need it to be defined on my custom module.

Thank you in advance

PM


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

Hi,

Activate the debug mode and open corresponding view, set the field value to True, then click the debugger button and click set default option and from the wizard choose the value and save it for all users.

See: https://www.youtube.com/watch?v=cQYHiGAd9k4

Thanks

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

@Niyas,

Thank you very much.

You're answer is correct but I need to put this on a module so when it is installed all new users will have this option activated.

Thank you once again

Merry Christmas

PM

You can inherit the corresponding model and set the default true for the field, see this:

manual = fields.Boolean('Is a Blocking Reason', default=True)

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
يناير 25
1765
1
فبراير 24
1480
0
ديسمبر 23
1122
3
أكتوبر 23
8965
1
سبتمبر 23
3401