Advertisement
Guest User

Untitled

a guest
Dec 10th, 2011
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. #La partie du code qui déconne selon moi
  2.  
  3. dbg = __import__('logging').getLogger('~DBG').warn
  4. dbg("BOUTTON DO PARTIAL")
  5. dbg(calc_qty)
  6. dbg(move.move_id.product_qty)
  7. dbg(calc_qty > move.move_id.product_qty)
  8. #Adding a check whether any move line contains exceeding qty to original moveline
  9. if calc_qty > move.move_id.product_qty:
  10. raise osv.except_osv(_('Processing Error'),
  11. _('Processing quantity %d %s for %s is larger than the available quantity %d %s !')\
  12. %(move.quantity, move.product_uom.name, move.product_id.name,\
  13. move.move_id.product_qty, move.move_id.product_uom.name))
  14.  
  15.  
  16. #Le résultat des logs pour comprendre comment ca déconne
  17. [2011-12-10 16:37:01,144][openERP] WARNING:~DBG:BOUTTON DO PARTIAL
  18. [2011-12-10 16:37:01,144][openERP] WARNING:~DBG:1799.09
  19. [2011-12-10 16:37:01,144][openERP] WARNING:~DBG:1799.09
  20. [2011-12-10 16:37:01,144][openERP] WARNING:~DBG:True
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement