[FIX] stock,purchase: stop shortening picking type names
In purchase, a special key is set in the context to simplify the name of the picking type: instead of the normal name, only the name of the warehouse is used. This is problematic if more than one incoming picking type exists for a given warehouse, as it prevents you from being able to differentiate them. Asking users to modify the view to remove the context key seem a bit too much to ask for something that should be simple. It is my understanding that this was implemented only for cosmetic reasons, but I am willing to assume that having to select "YourCompany: Delivery Orders" instead of simply "YourCompany" for people who only have one picking type should not be too disruptive or obscure. opw-685751
This commit is contained in:
parent
c844534f8a
commit
08ed48e24c
|
@ -225,7 +225,7 @@
|
|||
<field name="date_order"/>
|
||||
<field name="origin" attrs="{'invisible': [('origin','=',False)]}"/>
|
||||
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
||||
<field name="picking_type_id" on_change="onchange_picking_type_id(picking_type_id, context)" domain="[('code','=','incoming')]" options="{'no_create': True}" context="{'special_shortened_wh_name': True}" groups="stock.group_locations"/>
|
||||
<field name="picking_type_id" on_change="onchange_picking_type_id(picking_type_id, context)" domain="[('code','=','incoming')]" options="{'no_create': True}" groups="stock.group_locations"/>
|
||||
<field name="related_usage" invisible="1"/>
|
||||
<field name="dest_address_id" string="Customer Address" on_change="onchange_dest_address_id(dest_address_id, context)"
|
||||
attrs="{'invisible':[('related_usage','!=','customer')],
|
||||
|
|
|
@ -4478,11 +4478,6 @@ class stock_picking_type(osv.osv):
|
|||
name = record.name
|
||||
if record.warehouse_id:
|
||||
name = record.warehouse_id.name + ': ' +name
|
||||
if context.get('special_shortened_wh_name'):
|
||||
if record.warehouse_id:
|
||||
name = record.warehouse_id.name
|
||||
else:
|
||||
name = _('Customer') + ' (' + record.name + ')'
|
||||
res.append((record.id, name))
|
||||
return res
|
||||
|
||||
|
|
Loading…
Reference in New Issue