[FIX] some usability fixes
bzr revid: qdp-launchpad@openerp.com-20131008141834-p2efs3gimcybnmqa
This commit is contained in:
parent
5ee7193c9c
commit
6602eb1fcc
|
@ -109,7 +109,7 @@ class procurement_order(osv.osv):
|
|||
'priority': fields.selection([('0', 'Not urgent'), ('1', 'Normal'), ('2', 'Urgent'), ('3', 'Very Urgent')], 'Priority', required=True, select=True),
|
||||
'date_planned': fields.datetime('Scheduled date', required=True, select=True),
|
||||
|
||||
'group_id': fields.many2one('procurement.group', 'Procurement Requisition'),
|
||||
'group_id': fields.many2one('procurement.group', 'Procurement Group'),
|
||||
'rule_id': fields.many2one('procurement.rule', 'Rule'),
|
||||
|
||||
'product_id': fields.many2one('product.product', 'Product', required=True, states={'confirmed': [('readonly', False)]}, readonly=True),
|
||||
|
|
|
@ -605,6 +605,7 @@
|
|||
<group>
|
||||
<group>
|
||||
<field name="partner_id"/>
|
||||
<field name="group_id"/>
|
||||
<field name="backorder_id" readonly="1" attrs="{'invisible': [('backorder_id','=',False)]}"/>
|
||||
</group>
|
||||
<group>
|
||||
|
@ -890,7 +891,7 @@
|
|||
<group>
|
||||
<group name="main_grp" string="Details">
|
||||
<field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, False)"/>
|
||||
<field name="procure_method" attrs="{'invisible': [('state', '=', 'confirmed')], 'readonly': [('group_id', '=', False)]}"/>
|
||||
<field name="procure_method" attrs="{'readonly': [('state', '!=', 'draft')]}" groups="base.group_no_one"/>
|
||||
<field name="group_id"/>
|
||||
<label for="product_uom_qty"/>
|
||||
<div>
|
||||
|
|
|
@ -394,15 +394,11 @@ class stock_warehouse(osv.osv):
|
|||
output_loc = wh_output_stock_loc
|
||||
if warehouse.delivery_steps == 'ship_only':
|
||||
output_loc = wh_stock_loc
|
||||
|
||||
|
||||
#choose the next available color for the picking types of this warehouse
|
||||
color = 0
|
||||
all_used_color = self.pool.get('stock.picking.type').search_read(cr, uid, [('warehouse_id','!=',False), ('color','!=',False)], ['color'], order='color')
|
||||
for nColor in all_used_color:
|
||||
if nColor['color'] == color and color < 9:
|
||||
color += 1
|
||||
elif nColor['color'] > color or color == 9:
|
||||
break;
|
||||
all_used_colors = self.pool.get('stock.picking.type').search_read(cr, uid, [('warehouse_id', '!=', False), ('color', '!=', False)], ['color'], order='color')
|
||||
not_used_colors = list(set(range(1, 10)) - set([x['color'] for x in all_used_colors]))
|
||||
color = not_used_colors and not_used_colors[0] or 1
|
||||
|
||||
in_type_id = picking_type_obj.create(cr, uid, vals={
|
||||
'name': _('Receptions'),
|
||||
|
@ -412,7 +408,7 @@ class stock_warehouse(osv.osv):
|
|||
'sequence_id': in_seq_id,
|
||||
'default_location_src_id': supplier_loc.id,
|
||||
'default_location_dest_id': input_loc.id,
|
||||
'color' : color}, context=context)
|
||||
'color': color}, context=context)
|
||||
out_type_id = picking_type_obj.create(cr, uid, vals={
|
||||
'name': _('Delivery Orders'),
|
||||
'warehouse_id': new_id,
|
||||
|
|
Loading…
Reference in New Issue