[MERGE] from upstream
bzr revid: fva@openerp.com-20130927144321-a1zmpaft3vjv3yvs
This commit is contained in:
@@ -663,7 +663,7 @@ class pos_order(osv.osv):
|
||||
|
||||
def _get_out_picking_type(self, cr, uid, context=None):
|
||||
try:
|
||||
picking_type = self.pool.get('ir.model.data').get_object(cr, uid, 'stock', 'picking_type_out', context=context).id
|
||||
picking_type = self.pool.get('ir.model.data').get_object(cr, uid, 'point_of_sale', 'picking_type_posout', context=context).id
|
||||
except:
|
||||
picking_type = False
|
||||
return picking_type
|
||||
@@ -742,8 +742,7 @@ class pos_order(osv.osv):
|
||||
}, context=context)
|
||||
if line.qty < 0:
|
||||
location_id, output_id = output_id, location_id
|
||||
|
||||
picking_obj.signal_button_confirm(cr, uid, [picking_id])
|
||||
picking_obj.action_confirm(cr, uid, [picking_id])
|
||||
picking_obj.force_assign(cr, uid, [picking_id], context)
|
||||
return True
|
||||
|
||||
@@ -754,7 +753,7 @@ class pos_order(osv.osv):
|
||||
stock_picking_obj = self.pool.get('stock.picking')
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
for order in self.browse(cr, uid, ids, context=context):
|
||||
stock_picking_obj.signal_button_cancel(cr, uid, [order.picking_id.id])
|
||||
stock_picking_obj.action_cancel(cr, uid, [order.picking_id.id])
|
||||
if stock_picking_obj.browse(cr, uid, order.picking_id.id, context=context).state <> 'cancel':
|
||||
raise osv.except_osv(_('Error!'), _('Unable to cancel the picking.'))
|
||||
self.write(cr, uid, ids, {'state': 'cancel'}, context=context)
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
<?xml version="1.0" ?>
|
||||
<openerp>
|
||||
<data noupdate="0">
|
||||
<record id="seq_picking_type_posout" model="ir.sequence">
|
||||
<field name="name">Picking POS</field>
|
||||
<field name="prefix">POS</field>
|
||||
<field name="padding">5</field>
|
||||
<field name="company_id" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record id="picking_type_posout" model="stock.picking.type">
|
||||
<field name="name">PoS Orders</field>
|
||||
<field name="sequence_id" ref="seq_picking_type_posout"/>
|
||||
<field name="default_location_src_id" ref="stock.stock_location_stock"/>
|
||||
<field name="default_location_dest_id" ref="stock.stock_location_customers"/>
|
||||
<field name="code_id">outgoing</field>
|
||||
</record>
|
||||
</data>
|
||||
<data noupdate="1">
|
||||
|
||||
|
||||
|
||||
@@ -1007,8 +1007,7 @@ class stock_picking(osv.osv):
|
||||
# Methods for the barcode UI
|
||||
|
||||
def get_picking_for_packing_ui(self, cr, uid, context=None):
|
||||
res = self.search(cr, uid, [('state', 'in', ('confirmed', 'assigned'))], limit=1, context=context)
|
||||
return res and res[0] or False # TODO: what to do if nothing is left to do?
|
||||
return self.search(cr, uid, [('state', 'in', ('confirmed', 'assigned'))], context=context)
|
||||
|
||||
def action_done_from_packing_ui(self, cr, uid, picking_id, only_split_lines=False, context=None):
|
||||
self.do_partial(cr, uid, picking_id, only_split_lines, context=context)
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
-
|
||||
!record {model: stock.warehouse, id: warehouse_icecream}:
|
||||
name: Ice Cream Shop
|
||||
code: ICE
|
||||
lot_stock_id: location_refrigerator
|
||||
code: Cream
|
||||
-
|
||||
|
||||
@@ -1649,8 +1649,8 @@
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='general']" position="after" >
|
||||
<newline/>
|
||||
<group>
|
||||
<field name="route_ids" widget="many2many_tags"/>
|
||||
<group string="Supply Chain Information">
|
||||
<field name="route_ids" widget="many2many_checkboxes"/>
|
||||
</group>
|
||||
<newline/>
|
||||
</xpath>
|
||||
|
||||
Reference in New Issue
Block a user