title: How to add a state to a Selection field and show it ordered in the statusbar in Odoo 11?
body: <p>I have added a new state to a <em>Selection</em> field, using the parameter <code>selection_add</code>:</p>
  
  <pre><code>state = fields.Selection(
      selection_add=[
          ('draft_ok', 'Validated Quotation'),
      ],
  )
  </code></pre>
  
  <p>Now I want to show it in the XML view, where currently <code>state</code> is shown this way:</p>
  
  <pre><code>&lt;field name="state" widget="statusbar" statusbar_visible="draft,sent,sale"/&gt;
  </code></pre>
  
  <p>If I inherit from that view, to add the new state:</p>
  
  <pre><code>&lt;xpath expr="//header/field[@name='state']" position="attributes"&gt;
      &lt;attribute name="statusbar_visible"&gt;draft,draft_ok,sent,sale&lt;/attribute&gt;
  &lt;/xpath&gt;
  </code></pre>
  
  <p>The new state is shown at the end of the status bar. I want to show it between <code>draft</code> and <code>sent</code> states.</p>
  
  <p>The only way I know to do that is redefining the states in Python:</p>
  
  <pre><code>state = fields.Selection(
      selection=[
          ('draft', 'Quotation'),
          ('draft_ok', 'Validated Quotation'),
          ('sent', 'Quotation Sent'),
          ('sale', 'Sales Order'),
          ('done', 'Locked'),
          ('cancel', 'Cancelled'),
      ],
  )
  </code></pre>
  
  <p>But this solution is not very consistent, because if other module also adds a state to this field and my module code is executed after it, I would destroy the state added by this other module.</p>
  
  <p>So I am looking for other way to show the statusbar with a customised order. Any ideas?</p>