Revert "[FIX] delivery, stock: carrier_id field in incoming stock picking"

This reverts commit 07e6f28df3.

This was no longer possible to create a picking from scratch.
`Inventory > Your Company: Receipts > Create`
Because `picking_type_id` is not in the res returned by the above call to default_get

Even by forcing `picking_type_id` in the `fields` list,
it doesn't return the value in the fields.
This commit is contained in:
Denis Ledoux
2016-06-08 18:23:08 +02:00
parent 3ddb446b3b
commit dd1e67d263
2 changed files with 1 additions and 10 deletions
+1 -1
View File
@@ -276,7 +276,7 @@
<field name="arch" type="xml">
<xpath expr='//group[@name="carrier_data"]' position='replace'>
<group name='carrier_data'>
<field name="carrier_id" attrs="{'invisible': [('picking_type_code', '=', 'incoming')]}"/>
<field name="carrier_id"/>
<field name="delivery_type" attrs="{'invisible':True}"/>
<label for="carrier_tracking_ref"/>
<div>
-9
View File
@@ -929,15 +929,6 @@ class stock_picking(models.Model):
picking_type = self.env['stock.picking.type'].browse(picking_type_id)
return picking_type.default_location_src_id
@api.model
def default_get(self, fields):
res = super(stock_picking, self).default_get(fields)
if self._context.get('default_picking_type_id'):
picking_type = self.env['stock.picking.type'].browse(res['picking_type_id'])
res['picking_type_code'] = picking_type.code
return res
_columns = {
'name': fields.char('Reference', select=True, states={'done': [('readonly', True)], 'cancel': [('readonly', True)]}, copy=False),
'origin': fields.char('Source Document', states={'done': [('readonly', True)], 'cancel': [('readonly', True)]}, help="Reference of the document", select=True),