[IMP] Remove print delivery and ean13 for moves
bzr revid: jco@openerp.com-20140317170339-jjmu788e4c1xwltu
This commit is contained in:
parent
b6f8039880
commit
50b5453a78
|
@ -541,18 +541,10 @@ function openerp_picking_widgets(instance){
|
|||
var self = this;
|
||||
new instance.web.Model('stock.picking.type').call('read', [[self.picking_type_id], ['code'], new instance.web.CompoundContext()])
|
||||
.then(function(pick_type){
|
||||
if (pick_type[0]['code'] == 'outgoing'){
|
||||
new instance.web.Model('stock.picking').call('do_print_delivery',[[self.picking.id]])
|
||||
new instance.web.Model('stock.picking').call('do_print_picking',[[self.picking.id]])
|
||||
.then(function(action){
|
||||
return self.do_action(action);
|
||||
});
|
||||
}
|
||||
else {
|
||||
new instance.web.Model('stock.picking').call('do_print_picking',[[self.picking.id]])
|
||||
.then(function(action){
|
||||
return self.do_action(action);
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
picking_next: function(){
|
||||
|
|
|
@ -780,24 +780,11 @@ class stock_picking(osv.osv):
|
|||
default['date_done'] = False
|
||||
return super(stock_picking, self).copy(cr, uid, id, default, context)
|
||||
|
||||
def do_print_delivery(self, cr, uid, ids, context=None):
|
||||
'''This function prints the delivery order'''
|
||||
assert len(ids) == 1, 'This option should only be used for a single id at a time'
|
||||
datas = {
|
||||
'model': 'stock.picking',
|
||||
'ids': ids,
|
||||
}
|
||||
return self.get_action(cr, uid, ids, context=context)
|
||||
#{'type': 'ir.actions.report.xml', 'report_name': 'stock.picking.list', 'datas': datas, 'nodestroy': True}
|
||||
|
||||
def do_print_picking(self, cr, uid, ids, context=None):
|
||||
'''This function prints the picking list'''
|
||||
assert len(ids) == 1, 'This option should only be used for a single id at a time'
|
||||
datas = {
|
||||
'model': 'stock.picking',
|
||||
'ids': ids,
|
||||
}
|
||||
return {'type': 'ir.actions.report.xml', 'report_name': 'stock.picking.list.internal', 'datas': datas, 'nodestroy': True}
|
||||
return self.pool.get("report").get_action(cr, uid, [], 'stock.report_picking', context=context)
|
||||
|
||||
def action_confirm(self, cr, uid, ids, context=None):
|
||||
todo = []
|
||||
|
|
|
@ -720,8 +720,7 @@
|
|||
<button name="do_transfer" states="assigned" string="Transfer" groups="stock.group_stock_user" type="object" class="oe_highlight"/>
|
||||
<button name="do_transfer" string="Transfer" groups="stock.group_stock_user" type="object" class="oe_highlight" attrs="{'invisible': ['|',('pack_operation_exist', '=', False), ('state', '!=', 'partially_available')]}"/>
|
||||
<button name="do_prepare_partial" string="Enter Transfer Details" groups="stock.group_stock_user" type="object" class="oe_highlight" attrs="{'invisible': ['|',('pack_operation_exist', '=', True),('state','not in',('assigned', 'partially_available'))]}"/>
|
||||
<button name="do_print_delivery" string="Print Delivery Order" groups="stock.group_stock_user" type="object" attrs="{'invisible': ['|', ('picking_type_code', '!=', 'outgoing'), ('state', '!=', 'done')]}"/>
|
||||
<button name="do_print_picking" string="Print Picking List" groups="stock.group_stock_user" type="object" attrs="{'invisible': ['|', ('picking_type_code', '=', 'outgoing'), ('state', '!=', 'assigned')]}"/>
|
||||
<button name="do_print_picking" string="Print Picking List" groups="stock.group_stock_user" type="object" attrs="{'invisible': [('state', '!=', 'assigned')]}"/>
|
||||
<button name="%(act_stock_return_picking)d" string="Reverse Transfer" states="done" type="action" groups="base.group_user"/>
|
||||
<button name="action_cancel" states="assigned,confirmed,partially_available,draft" string="Cancel Transfer" groups="base.group_user" type="object"/>
|
||||
<button name="do_unreserve" string="Unreserve" groups="base.group_user" type="object" attrs="{'invisible': [('quant_reserved_exist', '=', False)]}"/>
|
||||
|
|
|
@ -61,6 +61,11 @@
|
|||
<td><span t-field="move.product_id"/></td>
|
||||
<td><span t-field="move.product_uom_qty"/> <span t-field="move.product_uom" groups="product.group_uom"/></td>
|
||||
<td><span t-field="move.location_id"/></td>
|
||||
<td>
|
||||
<span t-if="move.product_id and move.product_id.ean13">
|
||||
<img t-att-src="'/report/barcode/EAN13/%s' % move.product_id.ean13"/>
|
||||
</span>
|
||||
</td>
|
||||
<td><span t-field="move.location_dest_id"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
Loading…
Reference in New Issue