Commit 799e981b authored by Jérome Perrin's avatar Jérome Perrin

if no organisation mapping is defined and more than one organisation exists...

if no organisation mapping is defined and more than one organisation exists for the current group, use the currency from any of them, they should be consistent (otherwise, a report at this level of group will show mixed currencies anyway)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27478 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent fa335e63
...@@ -75,7 +75,9 @@ def getCurrencyForSection(section_url):\n ...@@ -75,7 +75,9 @@ def getCurrencyForSection(section_url):\n
mapping = section.getMappingValue(portal_type=\'Organisation\')\n mapping = section.getMappingValue(portal_type=\'Organisation\')\n
if mapping is not None and mapping.getPriceCurrency():\n if mapping is not None and mapping.getPriceCurrency():\n
return mapping.getPriceCurrency()\n return mapping.getPriceCurrency()\n
\n for member in member_list:\n
if member.getPriceCurrency():\n
return member.getPriceCurrency()\n
# nothing found ... returns the currency from preferences.\n # nothing found ... returns the currency from preferences.\n
return portal.portal_preferences.getPreferredAccountingTransactionCurrency()\n return portal.portal_preferences.getPreferredAccountingTransactionCurrency()\n
\n \n
......
938 939
\ No newline at end of file \ No newline at end of file
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