How to get a field value from one model to another model
<p>I created a new module which depends on sales.  I also created a sales commission tab in sales order.  I would like to add <code>amount_total</code> from the <code>sale.order</code> to <code>sales_value</code> in my new model <code>commission.sale</code> but nothing happens.</p>

<p>In commission.py</p>

<pre><code>_name = 'commission.sale'
sales_value = fields.Float(compute="_total", string="Sale Value")

@api.multi
    def _total(self):
        sale_obj = self.env['sale.order'].search([('amount_total','=', True)])
        self.sales_value = self.sale_obj.amount_total
</code></pre>

<pre><code>class salesman_commission(models.Model):
    _name = 'salesman_commission'

    user = fields.Many2one('res.users',string='User')
    sales_order_id = fields.Many2one('sale.order',string='Sale id',ondelete='cascade')
    sales_val = fields.Float(compute='_total',string='Sales Value')
    percent = fields.Float(string='Percent')
    commission = fields.Integer(compute='_commission',string='Commission')

    @api.one
    @api.depends('sales_order_id.amount_total')
    def _total(self):
        self.sales_val = self.sales_order_id.amount_total
</code></pre>

python odoo-8