openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #21810
[Bug 1101826] [NEW] [7.0] module analytic: _get_one_full_name() method can't work
Public bug reported:
version 7.0/trunk
In analytic module:
index 0755217..91ebac4 100644
--- a/analytic/analytic.py
+++ b/analytic/analytic.py
@@ -127,7 +127,8 @@ class account_analytic_account(osv.osv):
def _get_one_full_name(self, elmt, level=6):
if level<=0:
return '...'
- if elmt.parent_id and not elmt.type == 'template':
+
+ if getattr(elmt, 'parent_id', False) and not elmt.type == 'template':
parent_path = self._get_one_full_name(elmt.parent_id, level-1) + " / "
else:
parent_path = ''
Method get() doesn't exist on browse record object. Replace by
getattr().
By default this method _get_one_full_name() is not used, but I think it
is used when you want specific get_name() for an object.
** 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/1101826
Title:
[7.0] module analytic: _get_one_full_name() method can't work
Status in OpenERP Addons (modules):
New
Bug description:
version 7.0/trunk
In analytic module:
index 0755217..91ebac4 100644
--- a/analytic/analytic.py
+++ b/analytic/analytic.py
@@ -127,7 +127,8 @@ class account_analytic_account(osv.osv):
def _get_one_full_name(self, elmt, level=6):
if level<=0:
return '...'
- if elmt.parent_id and not elmt.type == 'template':
+
+ if getattr(elmt, 'parent_id', False) and not elmt.type == 'template':
parent_path = self._get_one_full_name(elmt.parent_id, level-1) + " / "
else:
parent_path = ''
Method get() doesn't exist on browse record object. Replace by
getattr().
By default this method _get_one_full_name() is not used, but I think
it is used when you want specific get_name() for an object.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1101826/+subscriptions
Follow ups
References