Commit cd9f48d6 authored by Jérome Perrin's avatar Jérome Perrin

init with well sided source & destination section


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5915 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 784d16d3
...@@ -71,14 +71,20 @@ ...@@ -71,14 +71,20 @@
if kw.get(\'created_by_builder\', 0): \n if kw.get(\'created_by_builder\', 0): \n
return\n return\n
\n \n
from Products.CMFCore.utils import getToolByName\n
preference_tool = getToolByName(context, \'portal_preferences\')\n
\n
transaction.edit (\n
# XXX getPreferredAccountingTransactionSourceSection is definitively a bad name ...\n
destination_section = preference_tool.getPreferredAccountingTransactionSourceSection(),\n
resource = preference_tool.getPreferredAccountingTransactionCurrency())\n
\n
transaction.newContent(portal_type=\'Purchase Invoice Transaction Line\',\n transaction.newContent(portal_type=\'Purchase Invoice Transaction Line\',\n
id=\'expense\', )\n id=\'income\', )\n
transaction.newContent(portal_type=\'Purchase Invoice Transaction Line\',\n transaction.newContent(portal_type=\'Purchase Invoice Transaction Line\',\n
id=\'payable\', )\n id=\'receivable\', )\n
transaction.newContent(portal_type=\'Purchase Invoice Transaction Line\',\n transaction.newContent(portal_type=\'Purchase Invoice Transaction Line\',\n
id=\'refundable_vat\', )\n id=\'collected_vat\', )\n
\n
context.AccountingTransaction_initFromPreferences()\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -124,6 +130,9 @@ context.AccountingTransaction_initFromPreferences()\n ...@@ -124,6 +130,9 @@ context.AccountingTransaction_initFromPreferences()\n
<string>context</string> <string>context</string>
<string>transaction</string> <string>transaction</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>Products.CMFCore.utils</string>
<string>getToolByName</string>
<string>preference_tool</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
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