Commit beb23bfe authored by Vincent Pelletier's avatar Vincent Pelletier

Factorise call to getSource.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15558 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent da722e5f
...@@ -72,13 +72,14 @@ from Products.ERP5Type.Message import Message\n ...@@ -72,13 +72,14 @@ from Products.ERP5Type.Message import Message\n
\n \n
ob = state_change[\'object\'] \n ob = state_change[\'object\'] \n
\n \n
source = ob.getSource()\n
\n
# check we are in an opened accounting day\n # check we are in an opened accounting day\n
vault = \'%s/surface/caisse_courante/encaisse_des_billets_et_monnaies\' %(ob.getSource(),)\n vault = \'%s/surface/caisse_courante/encaisse_des_billets_et_monnaies\' % (source, )\n
date = ob.getStartDate()\n date = ob.getStartDate()\n
ob.Baobab_checkCounterDateOpen(site=vault, date=date)\n ob.Baobab_checkCounterDateOpen(site=vault, date=date)\n
\n \n
# check again that the counter is open\n # check again that the counter is open\n
source = ob.getSource()\n
context.Baobab_checkCounterOpened(source)\n context.Baobab_checkCounterOpened(source)\n
\n \n
if len(ob.objectValues(portal_type="Outgoing Mutilated Banknote Line")) == 0:\n if len(ob.objectValues(portal_type="Outgoing Mutilated Banknote Line")) == 0:\n
...@@ -147,9 +148,9 @@ elif resource <> 0 :\n ...@@ -147,9 +148,9 @@ elif resource <> 0 :\n
<string>_getitem_</string> <string>_getitem_</string>
<string>ob</string> <string>ob</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>source</string>
<string>vault</string> <string>vault</string>
<string>date</string> <string>date</string>
<string>source</string>
<string>context</string> <string>context</string>
<string>len</string> <string>len</string>
<string>msg</string> <string>msg</string>
......
468 470
\ 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