parameters: (self)
return_statement: return {'type': 'ir.actions.act_window',
                  'res_model': 'res.partner',
                  'view_mode': 'form',
                  'views': [(address_form_id, 'form')],
                  'res_id': self.parent_id.id,
                  'target': 'new',
                  'flags': {'form': {'action_buttons': True}}}
docstring: Utility method used to add an "Open Parent" button in partner views
docstring_summary: Utility method used to add an "Open Parent" button in partner views
docstring_tokens: Utility method used to add an Open Parent button in partner views
function: def open_parent(self):
          """ Utility method used to add an "Open Parent" button in partner views """
          self.ensure_one()
          address_form_id = self.env.ref('base.view_partner_address_form').id
          return {'type': 'ir.actions.act_window',
                  'res_model': 'res.partner',
                  'view_mode': 'form',
                  'views': [(address_form_id, 'form')],
                  'res_id': self.parent_id.id,
                  'target': 'new',
                  'flags': {'form': {'action_buttons': True}}}
function_tokens: def open_parent ( self ) : self . ensure_one ( ) address_form_id = self . env . ref ( 'base.view_partner_address_form' ) . id return { 'type' : 'ir.actions.act_window' , 'res_model' : 'res.partner' , 'view_mode' : 'form' , 'views' : [ ( address_form_id , 'form' ) ] , 'res_id' : self . parent_id . id , 'target' : 'new' , 'flags' : { 'form' : { 'action_buttons' : True } } }