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,13 +57,15 @@
\n
searchPredicateList = line.getPortalObject().portal_domains.searchPredicateList\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
if predicate.getDestinationAccount():\n
line.setDestinationAccount(predicate.getDestinationAccount())\n
break\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
if predicate.getSourceAccount():\n
line.setSourceAccount(predicate.getSourceAccount())\n
......
226
\ No newline at end of file
227
\ 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