title: field replace on odoo using xpath
body: <p>I've tried Odoo 9 and want to replace the "Total" field = amount_total with a new field which is the result of some addition of field content (sum_of_total) with XPath expression but it's failing and not returning any result.<br>
  Here is my XML code :</p>
  
  <pre><code>&lt;openerp&gt;
      &lt;data&gt;
          &lt;record id="purchase_order_form_training1" model="ir.ui.view"&gt;
              &lt;field name="name"&gt;purchase.order.form1&lt;/field&gt;
              &lt;field name="model"&gt;purchase.order&lt;/field&gt;
              &lt;field name="inherit_id" ref="purchase.purchase_order_form"/&gt;
              &lt;field name="arch" type="xml"&gt;
                  &lt;field name="amount_tax" position="after"&gt;
                      &lt;field name="down_payment" widget="monetary" options="{'currency_field':'currency_id'}"/&gt;
                  &lt;/field&gt;
                  &lt;xpath expr="form1/sheet/page/group/field[@name='amount_total']" position="replace"&gt;
                      &lt;field name="sum_of_total"/&gt;
                  &lt;/xpath&gt;
              &lt;/field&gt;
          &lt;/record&gt;
      &lt;/data&gt;
  &lt;/openerp&gt;
  </code></pre>
  
  <p>The odoo log didn't show me any syntactical error. Can anyone help me to identify the root cause?</p>
  
  <p>Refer below to understand how sum_of_total is getting initialized </p>
  
  <pre class="lang-py prettyprint-override"><code>from openerp import models, fields, api, _
  
  class purchase_order(models.Model):
      _inherit = "purchase.order"
  
      @api.one
      @api.depends('down_payment', 'amount_total')
      def get_total_after_dp(self):
          dp = self.down_payment
          tot = selt.amount_total
          tota = tot + dp
          self.sum_of_total = tota
  
      sum_of_total = fields.Float('Total Amount',
                                      compute='get_total_after_dp')
  
      down_payment = fields.Float('Down Payment')
  </code></pre>