title: Odoo set specific domain on xml file
body: <p>I made a custom button whick call a view:</p>
  
  <pre><code>@api.multi
  def split_bot(self):
      view = self.env.ref('purchase_request.view_supply_conditions_tree')
      context = self.env.context
      return {
           'name':blabla',
           'type': 'ir.actions.act_window',
           'view_type': 'form',
           'view_mode': 'tree,form',
           'res_model': 'supply.conditions',
           'views': [(view.id, 'tree')],
           'view_id': view.id,
           'target': 'new',
           'domain': [('purchase_id', '=', self.id)],
           'context': context,
           'flags': {'form': {'action_buttons': True}}
      }
  </code></pre>
  
  <p>But now I don't need this button. I need to open tree view on default "Edit" button click with the same domain:<code>'domain': [('purchase_id', '=', self.id)]</code>
   How can I use the same domain in my xml form? I tried to put domain as:
  </p>
  
  <p>Got an error:</p>
  
  <pre><code>name 'self' is not defined
  </code></pre>
  
  <p>For more information:</p>
  
  <pre><code>purchase_order_status = fields.One2many('purchase.order', 'request_id', string='Order',copy=True)
  
  purchase_id = fields.Many2one('purchase.request', 'Purchase request')
  </code></pre>
  
  <p>How can I change <strong>self.id</strong> in my xml form to get the same domain as was on button click?</p>