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 @@
if kw.get(\'created_by_builder\', 0): \n
return\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
id=\'expense\', )\n
id=\'income\', )\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
id=\'refundable_vat\', )\n
\n
context.AccountingTransaction_initFromPreferences()\n
id=\'collected_vat\', )\n
</string> </value>
</item>
<item>
......@@ -124,6 +130,9 @@ context.AccountingTransaction_initFromPreferences()\n
<string>context</string>
<string>transaction</string>
<string>_getattr_</string>
<string>Products.CMFCore.utils</string>
<string>getToolByName</string>
<string>preference_tool</string>
</tuple>
</value>
</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