← Back to team overview

openerp-india team mailing list archive

[Bug 1074228] [NEW] Accounting Asset syntax error

 

Public bug reported:


On addons/account_asset/account_asset.py line 365:

sign = line.asset_id.category_id.journal_id.type = 'purchase' and 1 or
-1

this expression has a BUG. It's seems always return 1 value. Never get
-1 value.

It must be like this:
sign = (line.asset_id.category_id.journal_id.type == 'purchase' and 1) or -1

** Affects: openobject-addons
     Importance: Undecided
         Status: New

-- 
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/1074228

Title:
  Accounting Asset syntax error

Status in OpenERP Addons (modules):
  New

Bug description:
  
  On addons/account_asset/account_asset.py line 365:

  sign = line.asset_id.category_id.journal_id.type = 'purchase' and 1 or
  -1

  this expression has a BUG. It's seems always return 1 value. Never get
  -1 value.

  It must be like this:
  sign = (line.asset_id.category_id.journal_id.type == 'purchase' and 1) or -1

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


Follow ups

References