Advertisement
Guest User

Untitled

a guest
Mar 4th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PyCon 0.94 KB | None | 0 0
  1.  def do_partial(self, cr, uid, ids, context=None):
  2.         res = super(stock_partial_picking, self).do_partial(cr, uid, ids, context=context)
  3.         partial = self.browse(cr, uid, ids[0], context=context)
  4.         qz_print_obj = self.pool.get('QzPrint')
  5.  
  6.         # Select Printable Labels  products
  7.         for wizard_line in partial.move_ids:
  8.             #Quantiny must be Positive
  9.             if wizard_line.quantity < 0:
  10.                 raise osv.except_osv(_('Warning!'), _('Please provide proper Quantity.'))
  11.             # Product to print label
  12.             if wizard_line.product_id.label_print is False:
  13.                 continue
  14.             else:
  15.  
  16.                 ##  CAll print function from QzPrint class
  17.                 # Var num_cop = wizard_line.quantity
  18.                 # Var id = wizard_line.product_id.id
  19.                 label = qz_print_obj.send_epl_data(cr, uid, [wizard_line.product_id], context)
  20.                 return label
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement