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

just like when setting price, only set a destination/source account on the...

just like when setting price, only set a destination/source account on the movement only if it's not already present

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26211 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 686ddec0
...@@ -57,17 +57,19 @@ ...@@ -57,17 +57,19 @@
\n \n
searchPredicateList = line.getPortalObject().portal_domains.searchPredicateList\n searchPredicateList = line.getPortalObject().portal_domains.searchPredicateList\n
\n \n
for predicate in searchPredicateList(\n if not line.getDestinationAccount():\n
for predicate in searchPredicateList(\n
context=line, portal_type=\'Purchase Supply Line\'):\n context=line, portal_type=\'Purchase Supply Line\'):\n
if predicate.getDestinationAccount():\n if predicate.getDestinationAccount():\n
line.setDestinationAccount(predicate.getDestinationAccount())\n line.setDestinationAccount(predicate.getDestinationAccount())\n
break\n break\n
\n \n
for predicate in searchPredicateList(\n if not line.getSourceAccount():\n
for predicate in searchPredicateList(\n
context=line, portal_type=\'Sale Supply Line\'):\n context=line, portal_type=\'Sale Supply Line\'):\n
if predicate.getSourceAccount():\n if predicate.getSourceAccount():\n
line.setSourceAccount(predicate.getSourceAccount())\n line.setSourceAccount(predicate.getSourceAccount())\n
break\n break\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
226 227
\ 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