Commit 218729b6 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Tax Lines should not be accountable inside Accounting Transactions, because...

Tax Lines should not be accountable inside Accounting Transactions, because accounting is done with Accounting Transaction Lines, thus the information is added twice in the inventory.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25591 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9a6c4f50
...@@ -64,8 +64,19 @@ class TaxLine(DeliveryLine): ...@@ -64,8 +64,19 @@ class TaxLine(DeliveryLine):
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'isAccountable') 'isAccountable')
def isAccountable(self): def isAccountable(self):
""" """ """Return true if the parent is accountable and
return 1 # XXX not sure not an accounting transaction.
NOTE: this is because, if the parent is an accounting transaction,
the accounting is done with another accounting transaction line,
so making tax lines accountable would duplicate the accounting.
"""
delivery = self.getParentValue()
if delivery.isAccountable():
portal = delivery.getPortalObject()
type_list = portal.getPortalAccountingTransactionTypeList()
return delivery.getPortalType() not in type_list
return 0
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'hasCellContent') 'hasCellContent')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment