title: Inherit button function from one model into another - Odoo v9 community
body: <p>I'm trying to use the functions/buttons from <code>stock.picking</code> model into <code>fleet.vehicle.log.services</code> one.</p>
  
  <p>So far on my view:</p>
  
  <pre><code>        &lt;record model='ir.ui.view' id='fleet_vehicle_log_services_form_inherit_1'&gt;
          &lt;field name='name'&gt;fleet.vehicle.log.services.form0&lt;/field&gt;
          &lt;field name='model'&gt;fleet.vehicle.log.services&lt;/field&gt;
          &lt;field name='inherit_id' ref='fleet.fleet_vehicle_log_services_form'/&gt;
          &lt;field name="priority"&gt;89&lt;/field&gt;
          &lt;field name='arch' type='xml'&gt;
              &lt;xpath expr="//form//sheet//group[1]" position="before"&gt;
              &lt;header&gt;
                  &lt;button name="action_confirm" states="draft" string="Mark as Todo" type="object" class="oe_highlight" groups="base.group_user"/&gt;
                  &lt;button name="action_assign" states="confirmed,waiting" string="Reserve" type="object" class="oe_highlight" groups="base.group_user"/&gt;
                  &lt;button name="force_assign" states="confirmed,waiting,partially_available" string="Force Availability" type="object" groups="base.group_user"/&gt;
                  &lt;button name="do_new_transfer" states="draft,partially_available,assigned" string="Validate" groups="stock.group_stock_user" type="object" class="oe_highlight"/&gt;
                  &lt;button name="do_print_picking" string="Print" groups="stock.group_stock_user" type="object" attrs="{'invisible': [('state', 'not in', ('assigned', 'partially_available'))]}"/&gt;
                  &lt;button name="%(stock.act_stock_return_picking)d" string="Reverse" states="done" type="action" groups="base.group_user"/&gt;
                  &lt;button name="action_cancel" states="assigned,confirmed,partially_available,draft,waiting" string="Cancel" groups="base.group_user" type="object"/&gt;
                  &lt;field name="state" widget="statusbar" statusbar_visible="draft,confirmed,partially_available,assigned,done" statusbar_colors='{"shipping_except":"red","invoice_except":"red","waiting_date":"blue"}'/&gt;                
              &lt;/header&gt;
              &lt;/xpath&gt;
          &lt;/field&gt;
      &lt;/record&gt;
  </code></pre>
  
  <p>On the model:</p>
  
  <pre><code>    _inherit = "fleet.vehicle.log.services"
      stock_picking = fields.Many2one("stock.picking", "Picking")
      state = fields.Selection(string="Estados", store=True, readonly=True, related="stock_picking.state")
  </code></pre>
  
  <p>So far, <code>state</code> field shows fine, no problem with that, but I can't seem to make the buttons work, they just doesn't appear on the view.</p>
  
  <p>I guess I need to relate these functions to <code>stock_picking</code> as I did with <code>state</code>, but these are function fields...</p>
  
  <p>Any ideas on how to achieve this?</p>