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

test for getTitle has to be changed in hasTitle, because getTitle acquires id

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25341 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 574293f5
...@@ -80,7 +80,6 @@ related_packing_list = invoice.getDefaultCausalityValue()\n ...@@ -80,7 +80,6 @@ related_packing_list = invoice.getDefaultCausalityValue()\n
\n \n
# XXX this use of currency is completly bogus, it should be set on simulation movements.\n # XXX this use of currency is completly bogus, it should be set on simulation movements.\n
# get a price_currency from the packing list, or the order\n # get a price_currency from the packing list, or the order\n
context.log(related_packing_list)\n
price_currency = related_packing_list.getPriceCurrency()\n price_currency = related_packing_list.getPriceCurrency()\n
if price_currency:\n if price_currency:\n
invoice.edit(\n invoice.edit(\n
...@@ -102,7 +101,7 @@ if not context.getSpecialise():\n ...@@ -102,7 +101,7 @@ if not context.getSpecialise():\n
context.edit(specialise=related_order.getSpecialise())\n context.edit(specialise=related_order.getSpecialise())\n
\n \n
# copy title, if not updating a new delivery\n # copy title, if not updating a new delivery\n
if not invoice.getTitle():\n if not invoice.hasTitle() and related_packing_list.hasTitle():\n
invoice.setTitle(related_packing_list.getTitle())\n invoice.setTitle(related_packing_list.getTitle())\n
\n \n
# initialize accounting_workflow to planned state\n # initialize accounting_workflow to planned state\n
......
186 188
\ 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