How to set default value from 'on delivery order' to 'on demand' in create invoice field in quotations in odoo?
<p>I am trying to set default value from <code>'on delivery order'</code> to <code>'on demand'</code> in create invoice field in quotation's other information tab in odoo. But its not setting as default value to on demand. Can anyone help me out how to set default value of create invoice in 'on demand'. </p>

<p><strong>This is the default odoo code i am posting.</strong></p>

<pre><code>'order_policy': fields.selection([
                        ('manual', 'On Demand'),
                        ('picking', 'On Delivery Order'),
                        ('prepaid', 'Before Delivery'),
                    ],
                    'Create Invoice',
                    required=True,
                    readonly=True,
                    states={
                        'draft': [('readonly', False)],
                        'sent':  [('readonly', False)]
                    },
                ),
</code></pre>

<p><strong>and this is default value code i am writing.</strong></p>

<pre><code>_defaults = {
        'order_policy': 'manual',
}
</code></pre>

<p>You can use default attribute in the field </p>

<pre><code>'order_policy': fields.selection([
                    ('manual', 'On Demand'),
                    ('picking', 'On Delivery Order'),
                    ('prepaid', 'Before Delivery'),
                ],
                'Create Invoice',
                default='manual',
                required=True,
                readonly=True,
                states={
                    'draft': [('readonly', False)],
                    'sent':  [('readonly', False)]
                },
            ),
</code></pre>

python openerp default odoo-8 default-value