← Back to team overview

openerp-india team mailing list archive

[Bug 993283] Re: Sale : some code never reach or bad indentation

 

** Description changed:

  Module :sale.py
  Class :sale_order
  Def: test_state
  
  At the end of test_state
  
-  if mode == 'finished':
-     return finished
+  if mode == 'finished':
+     return finished
  elif mode == 'canceled':
-     return canceled
-     if notcanceled:       <------
-         return False        <------
-     return canceled    <------
+     return canceled
+     if notcanceled:       <------
+         return False        <------
+     return canceled    <------
  
  This not a bug, but this code need to be deleted because never reach, or
  maybe a bad Indentation, i'm not investigate more, just see it and
  report it.
+ 
+ Edit: if the code is delete, maybe remove all place where use
+ notcanceled in the function, because no more needed. (remove declaration
+ and one esle)

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/993283

Title:
  Sale : some code never reach or bad indentation

Status in OpenERP Addons (modules):
  New

Bug description:
  Module :sale.py
  Class :sale_order
  Def: test_state

  At the end of test_state

   if mode == 'finished':
      return finished
  elif mode == 'canceled':
      return canceled
      if notcanceled:       <------
          return False        <------
      return canceled    <------

  This not a bug, but this code need to be deleted because never reach,
  or maybe a bad Indentation, i'm not investigate more, just see it and
  report it.

  Edit: if the code is delete, maybe remove all place where use
  notcanceled in the function, because no more needed. (remove
  declaration and one esle)

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/993283/+subscriptions


References