Skip to content

Commit

Permalink
Merge pull request OCA#79 from lepistone/default-warehouse-state
Browse files Browse the repository at this point in the history
add states readonly to default warehouse
  • Loading branch information
jgrandguillaume committed Dec 1, 2014
2 parents c5233d9 + 40c864e commit 893b9fa
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions sale_sourced_by_line/model/sale.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,20 @@ def _get_picking_ids(self, cr, uid, ids, name, args, context=None):
context=context)
return res

SO_STATES = {
'cancel': [('readonly', True)],
'progress': [('readonly', True)],
'manual': [('readonly', True)],
'shipping_except': [('readonly', True)],
'invoice_except': [('readonly', True)],
'done': [('readonly', True)],
}

_columns = {
'warehouse_id': fields.many2one(
'stock.warehouse',
'Default Warehouse',
states=SO_STATES,
help="If no source warehouse is selected on line, "
"this warehouse is used as default. "),
'shipped': fields.function(
Expand Down

0 comments on commit 893b9fa

Please sign in to comment.