diff --git a/bt5/erp5_invoicing/WorkflowTemplateItem/portal_workflow/delivery_movement_account_interaction_workflow/scripts/copySourceAndDestinationAccount.xml b/bt5/erp5_invoicing/WorkflowTemplateItem/portal_workflow/delivery_movement_account_interaction_workflow/scripts/copySourceAndDestinationAccount.xml index 7b3033e3a5852c99566dec4353bdba93859a31b8..285c06553fb56768c7c94499facc06cb72c93bda 100644 --- a/bt5/erp5_invoicing/WorkflowTemplateItem/portal_workflow/delivery_movement_account_interaction_workflow/scripts/copySourceAndDestinationAccount.xml +++ b/bt5/erp5_invoicing/WorkflowTemplateItem/portal_workflow/delivery_movement_account_interaction_workflow/scripts/copySourceAndDestinationAccount.xml @@ -57,17 +57,19 @@ \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 + 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 - break\n + if predicate.getSourceAccount():\n + line.setSourceAccount(predicate.getSourceAccount())\n + break\n </string> </value> </item> <item> diff --git a/bt5/erp5_invoicing/bt/revision b/bt5/erp5_invoicing/bt/revision index 0e4c1b3f9084417d02e8328b44ec4bae13645964..37c3b662e16c794da564bef5ff6f9294b7cb2fa1 100644 --- a/bt5/erp5_invoicing/bt/revision +++ b/bt5/erp5_invoicing/bt/revision @@ -1 +1 @@ -226 \ No newline at end of file +227 \ No newline at end of file