odoo/odoo — pull request #3597 by rgo-odoo (2014-11-13 09:36:39+00:00)
Title: [FIX] Prevent traceback when 'value' is 'None'(Maintenance: 617019).

Hi,

Using new api if we have some module which has defined some field with default value like,

field_name = fields.Many2one('sale.order.action', string='Sale Action', required=True, default=_get_default_sale_action)

and the function that sets the default value from some data file using function "xmlid_to_object(...)", something like,

@api.model
def _get_default_sale_action(self):
return self.env['ir.model.data'].xmlid_to_object('sale_action.sale_order_default_action')

then the system won't be able to install this module and will result into the traceback as shown below.
![default_value_traceback](https://cloud.githubusercontent.com/assets/7601649/5026019/5c8df462-6b45-11e4-9031-00d2ba24a080.png)

Note: The module to reproduce the issue is available in the ticket 617019.

This branch fixes this issue, kindly review it.

Thanks.