default '', or None chained_location_type in stock/stock.py is not valid

Bug #301888 reported by Raphaël Valyi - http://www.akretion.com
2
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Undecided
Unassigned

Bug Description

on trunk,

If you try to create a new stock.location ( Stock Management > Configuration > Locations > New ), then, by default, the required chained_location_type (Chained Location Type) field is set to blank ('', or None), which is exactly what you would expect from
the following code:

        'chained_location_type': fields.selection([('','None'),('customer', 'Customer'),('fixed','Fixed Location')],
            'Chained Location Type', required=True),
[...]
    _defaults = {
        'active': lambda *a: 1,
        'usage': lambda *a: 'internal',
        'allocation_method': lambda *a: 'fifo',
        'chained_location_type': lambda *a: '',
...

The trouble is that you can't save it like that! Even if you manually select 'None' in the select box, you can't save it. (the only workarround I have is to select 'Fixed Location'.

I think the default 'None' should just be valid instead.

Hope this helps,

Raphaël Valyi.

Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote :

I think it has been fixed by this commit http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/revision/1915
but I'll test it soon and confirm.

Changed in openobject-addons:
status: New → In Progress
Revision history for this message
Christophe Simonis (OpenERP) (kangol) wrote :

I confirm the patch

Changed in openobject-addons:
status: In Progress → Fix Released
Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote :

yeah, it's fixed indeed, thank you.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.