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

Hello, 

I would like to know if it's possible or not to call a odoo studio field in a model like this ?

class sale_order(models.Model):
    _inherit = "sale.order"
        
     @api.onchange('x_studio_first_field')
    def _onchange_firstfield(self):
        if self.x_studio_first_field:
            self.x_studio_second_field = self.x_studio_first_field
الصورة الرمزية
إهمال
أفضل إجابة

Hi Neyro:

Technically, you can do this provided the Studio based changes have been applied to the database before you install/upgrade the custom module.

One thing to watch out for in such cases, is to ensure that you don't end up with a circular dependency between the studio based customization and the code based customization.

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

I was careful to meet the conditions you mentioned and it works!

Thanks a lot!

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
سبتمبر 25
714
2
أكتوبر 23
4566
0
يونيو 22
23
1
ديسمبر 21
6883
2
ديسمبر 20
4727