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

Hello everyone,


I am trying to inherit the followup_reminder_type field into my module in Odoo 18(odoo.sh). The field is located in the Contacts app in the Accounting tab, in the Reminders field, when a contact has been selected.


The code I have inserted:

from odoo import api, fields, models, _


class Partner(models.Model):

    _inherit = "res.partner"

    followup_reminder_type = fields.Selection(

        [

            ('automatic', 'Automatik'),

            ('auto', 'Automatik'),

            ('manual', 'Manuell')],

        string='Reminders',

        default='manual'

    ) 

I would like to change the default selection from automatic to manual. I would also like to know in which module the code for the field is stored. I created the code I inserted myself and did not copy it from any module.

Thank you in advance.

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

Hi,

If you just want to change the default value to "manual", you don’t need to redefine the field completely. 

Example:

 from odoo import models, fields

class Partner(models.Model):

    _inherit = "res.partner"


    followup_reminder_type = fields.Selection(

        selection_add=[],

        default='manual',

    )



Hope it helps.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
سبتمبر 25
60
1
سبتمبر 25
193
2
سبتمبر 25
459
1
سبتمبر 25
334
3
سبتمبر 25
479