bzr revid: fp@tinyerp.com-20101229141122-y4s7qqp0u3qraoef
This commit is contained in:
Fabien Pinckaers 2010-12-29 15:11:22 +01:00
parent 54ef6964f9
commit 436760ab9f
3 changed files with 11 additions and 7 deletions

View File

@ -1200,11 +1200,11 @@ class sale_config_picking_policy(osv.osv_memory):
ir_values_obj = self.pool.get('ir.values')
ir_values_obj.set(cr, uid, 'default', False, 'picking_policy', ['sale.order'], o.picking_policy)
ir_values_obj.set(cr, uid, 'default', False, 'order_policy', ['sale.order'], o.order_policy)
if o.step == 'one':
if o.step == 'two':
md = self.pool.get('ir.model.data')
location_id = md.get_object_reference(cr, uid, 'stock', 'stock_location_output')
location_id = location_id and location_id[1] or False
self.pool.get('stock.location').write(cr, uid, [location_id], {'chained_auto_packing': 'transparent'})
self.pool.get('stock.location').write(cr, uid, [location_id], {'chained_auto_packing': 'manual'})
sale_config_picking_policy()

View File

@ -61,6 +61,7 @@ class stock_journal(osv.osv):
}
stock_journal()
#----------------------------------------------------------
# Stock Location
#----------------------------------------------------------
@ -69,7 +70,7 @@ class stock_location(osv.osv):
_description = "Location"
_parent_name = "location_id"
_parent_store = True
_parent_order = 'name'
_parent_order = 'posz,name'
_order = 'parent_left'
def name_get(self, cr, uid, ids, context=None):
@ -1509,9 +1510,9 @@ class stock_move(osv.osv):
'move_history_ids2': fields.many2many('stock.move', 'stock_move_history_ids', 'child_id', 'parent_id', 'Move History (parent moves)'),
'picking_id': fields.many2one('stock.picking', 'Reference', select=True,states={'done': [('readonly', True)]}),
'note': fields.text('Notes'),
'state': fields.selection([('draft', 'Draft'), ('waiting', 'Waiting'), ('confirmed', 'Confirmed'), ('assigned', 'Available'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, select=True,
help='When the stock move is created it is in the \'Draft\' state.\n After that it is set to \'Confirmed\' state.\n If stock is available state is set to \'Available\'.\n When the picking is done the state is \'Done\'.\
\nThe state is \'Waiting\' if the move is waiting for another one.'),
'state': fields.selection([('draft', 'Draft'), ('waiting', 'Waiting'), ('confirmed', 'Not Available'), ('assigned', 'Available'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, select=True,
help='When the stock move is created it is in the \'Draft\' state.\n After that, it is set to \'Not Available\' state if the scheduler did not find the products.\n When products are reserved it is set to \'Available\'.\n When the picking is done the state is \'Done\'.\
\nThe state is \'Waiting\' if the move is waiting for another one.'),
'price_unit': fields.float('Unit Price', digits_compute= dp.get_precision('Account'), help="Technical field used to record the product cost set by the user during a picking confirmation (when average price costing method is used)"),
'price_currency_id': fields.many2one('res.currency', 'Currency for average price', help="Technical field used to record the currency chosen by the user during a picking confirmation (when average price costing method is used)"),
'company_id': fields.many2one('res.company', 'Company', required=True, select=True),

View File

@ -32,12 +32,14 @@
<field name="name">Partner Locations</field>
<field name="usage">view</field>
<field name="icon">terp-partner</field>
<field name="posz">1</field>
<field name="company_id"></field>
</record>
<record id="stock_location_locations_virtual" model="stock.location">
<field name="name">Virtual Locations</field>
<field name="usage">view</field>
<field name="icon">terp-mrp</field>
<field name="posz">1</field>
<field name="company_id"></field>
</record>
<record id="stock_location_scrapped" model="stock.location">
@ -47,7 +49,7 @@
<field name="usage">inventory</field>
<field name="company_id"></field>
</record>
<record id="location_inventory" model="stock.location">
<field name="name">Inventory loss</field>
<field name="location_id" ref="stock_location_locations_virtual"/>
@ -92,6 +94,7 @@
<field name="location_id" ref="stock_location_company"/>
<field name="usage">internal</field>
<field name="chained_location_type">customer</field>
<field name="chained_auto_packing">transparent</field>
<field name="chained_picking_type">out</field>
<field name="chained_journal_id" ref="journal_delivery"/>
</record>