调用工作室字段? Odoo V14

Calling a studio field ? Odoo V14

我想知道是否可以在这样的模型中调用 Odoo 工作室字段?

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

提前致谢

显然,答案就是我写的例子。我试过了,效果很好!

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