[FIX]mrp_repair:set unique constraint on name
bzr revid: prajapatijitendra7969@gmail.com-20140120065222-05hw8t0ca05mq7r4
This commit is contained in:
parent
2f8864e0a0
commit
0f7ca6e784
|
@ -186,6 +186,10 @@ class mrp_repair(osv.osv):
|
|||
'pricelist_id': lambda self, cr, uid,context : self.pool.get('product.pricelist').search(cr, uid, [('type','=','sale')])[0]
|
||||
}
|
||||
|
||||
_sql_constraints = [
|
||||
('name', 'unique (name)', 'The name of the Repair Order must be unique!'),
|
||||
]
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
if not default:
|
||||
default = {}
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
location_id: stock.stock_location_14
|
||||
picking_type_id: stock.picking_type_out
|
||||
move_id: 'stock_move_pcbasicpc0'
|
||||
name: RMA00004
|
||||
operations:
|
||||
- location_dest_id: stock.location_production
|
||||
location_id: stock.stock_location_stock
|
||||
|
@ -62,7 +61,6 @@
|
|||
location_id: stock.stock_location_14
|
||||
picking_type_id: stock.picking_type_out
|
||||
move_id: 'stock.stock_move_stockmvmrp1'
|
||||
name: RMA-00007
|
||||
operations:
|
||||
- location_dest_id: stock.location_production
|
||||
location_id: stock.stock_location_stock
|
||||
|
@ -104,7 +102,6 @@
|
|||
location_id: stock.stock_location_14
|
||||
picking_type_id: stock.picking_type_out
|
||||
move_id: 'stock.stock_move_stockmvmrp2'
|
||||
name: RMA-00011
|
||||
operations:
|
||||
- location_dest_id: stock.location_production
|
||||
location_id: stock.stock_location_stock
|
||||
|
|
Loading…
Reference in New Issue