Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
2384 Visualizzazioni

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
Avatar
Abbandona
Risposta migliore

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.

Avatar
Abbandona
Autore

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

Thanks a lot!

Post correlati Risposte Visualizzazioni Attività
1
set 25
752
2
ott 23
4602
0
giu 22
23
1
dic 21
6894
2
dic 20
4745