Commit 40e14b01 authored by Kevin Deldycke's avatar Kevin Deldycke

2006-03-07 Kevin

* Fix setReferences script of accounting_workflow to let the script generate good IDs.

2006-03-01 Kevin
* Fix Delivery_Build workflow script.
* setReference script of accounting workflow can be recalled multiple times on the same object without any side effect.
* Call setReference script on balance_action and stop action.
* Don't let the user edit the "Invoice Number" on Sale Invoice Transactions.

2006-02-28 Kevin
* Update SaleInvoiceTransaction_zSelectMovement to not include a 'AS movement' statement in SQL query.
* Move setReferences() call on accounting workflow from stop transition after script to confirm transition before script.
* Update Delivery_build on accounting workflow to generate pay sheet accounting lines automatticaly when they reach the 'confirm' state.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6023 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 73cad8af
...@@ -215,7 +215,7 @@ ...@@ -215,7 +215,7 @@
</item> </item>
<item> <item>
<key> <string>editable</string> </key> <key> <string>editable</string> </key>
<value> <int>1</int> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>editable_expression</string> </key> <key> <string>editable_expression</string> </key>
......
...@@ -215,7 +215,7 @@ ...@@ -215,7 +215,7 @@
</item> </item>
<item> <item>
<key> <string>editable</string> </key> <key> <string>editable</string> </key>
<value> <int>1</int> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>editable_expression</string> </key> <key> <string>editable_expression</string> </key>
......
...@@ -79,15 +79,44 @@ builder_by_ptype = {\n ...@@ -79,15 +79,44 @@ builder_by_ptype = {\n
\'Pay Sheet Transaction\' : \'pay_sheet_transaction_builder\',\n \'Pay Sheet Transaction\' : \'pay_sheet_transaction_builder\',\n
}\n }\n
\n \n
if builder_by_ptype.has_key(delivery_portal_type) : \n if builder_by_ptype.has_key(delivery_portal_type) :\n
builder = getattr(portal_deliveries, builder_by_ptype[delivery_portal_type], None)\n builder = getattr(portal_deliveries, builder_by_ptype[delivery_portal_type], None)\n
if builder is None :\n if builder is None :\n
context.log(\'accounting_workflow/scripts/Delivery_build\', \n context.log(\'accounting_workflow/scripts/Delivery_build\',\n
\'unable to build : no builder in %s\' % builder_by_ptype[delivery_portal_type])\n \'unable to build : no builder in %s\' % builder_by_ptype[delivery_portal_type])\n
return\n return\n
\n \n
# FIXME after_method_id is not enough here. \n ### Kev patch: Generate pay sheet accounting lines (inspired by order_workflow)\n
\n # (It could be great to make this Delivery_build script more generic)\n
if delivery_portal_type == \'Pay Sheet Transaction\':\n
PRIORITY = 3\n
pay_sheet = delivery\n
previous_tag = pay_sheet.getPath() + \'_firstUpdateAppliedRule\'\n
expand_tag = pay_sheet.getPath() + \'_expand\'\n
activate_kw = { \'tag\' : expand_tag\n
, \'priority\': PRIORITY\n
}\n
\n
pay_sheet.activate( tag = expand_tag\n
, after_tag = previous_tag\n
, priority = PRIORITY\n
).updateAppliedRule( rule_id = \'default_invoice_rule\'\n
, activate_kw = activate_kw\n
)\n
\n
builder = pay_sheet.portal_deliveries.pay_sheet_transaction_builder\n
builder.activate( activity = \'SQLQueue\'\n
, after_tag = expand_tag\n
, priority = PRIORITY\n
).build( explanation_uid = pay_sheet.getUid()\n
, activate_kw = activate_kw\n
)\n
return\n
### End of kev patch\n
\n
\n
# FIXME after_method_id is not enough here.\n
\n
# build accounting lines\n # build accounting lines\n
builder.activate(\n builder.activate(\n
after_method_id=(\'expand\', \'updateAppliedRule\', \'edit\',\'recursiveImmediateReindexObject\', \'immediateReindexObject\'))\\\n after_method_id=(\'expand\', \'updateAppliedRule\', \'edit\',\'recursiveImmediateReindexObject\', \'immediateReindexObject\'))\\\n
...@@ -152,6 +181,11 @@ if builder_by_ptype.has_key(delivery_portal_type) : \n ...@@ -152,6 +181,11 @@ if builder_by_ptype.has_key(delivery_portal_type) : \n
<string>None</string> <string>None</string>
<string>builder</string> <string>builder</string>
<string>context</string> <string>context</string>
<string>PRIORITY</string>
<string>pay_sheet</string>
<string>previous_tag</string>
<string>expand_tag</string>
<string>activate_kw</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -79,13 +79,16 @@ if transaction.getPortalType() == \'Sale Invoice Transaction\':\n ...@@ -79,13 +79,16 @@ if transaction.getPortalType() == \'Sale Invoice Transaction\':\n
invoice_id_group = (\'accounting\', \'invoice\', source_section)\n invoice_id_group = (\'accounting\', \'invoice\', source_section)\n
invoice_reference = transaction.generateNewId(id_group = invoice_id_group)\n invoice_reference = transaction.generateNewId(id_group = invoice_id_group)\n
transaction.setReference(invoice_reference)\n transaction.setReference(invoice_reference)\n
\n
# Generate new values for Source Reference and Destination Reference.\n # Generate new values for Source Reference and Destination Reference.\n
source_id_group = (\'accounting\', \'section\', source_section)\n if transaction.getSourceReference() in (None, \'\'):\n
source_reference = transaction.generateNewId(id_group = source_id_group)\n source_id_group = (\'accounting\', \'section\', source_section)\n
transaction.setSourceReference(source_reference)\n source_reference = transaction.generateNewId(id_group = source_id_group)\n
destination_id_group = (\'accounting\', \'section\', destination_section)\n transaction.setSourceReference(source_reference)\n
destination_reference = transaction.generateNewId(id_group = destination_id_group)\n if transaction.getDestinationReference() in (None, \'\'):\n
transaction.setDestinationReference(destination_reference)\n destination_id_group = (\'accounting\', \'section\', destination_section)\n
destination_reference = transaction.generateNewId(id_group = destination_id_group)\n
transaction.setDestinationReference(destination_reference)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
</item> </item>
<item> <item>
<key> <string>after_script_name</string> </key> <key> <string>after_script_name</string> </key>
<value> <string></string> </value> <value> <string>setReferences</string> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
</item> </item>
<item> <item>
<key> <string>script_name</string> </key> <key> <string>script_name</string> </key>
<value> <string></string> </value> <value> <string>setReferences</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
2006-03-07 Kevin
* Fix setReferences script of accounting_workflow to let the script generate good IDs.
2006-03-02 jerome
* Reverse source & destination section in Purchase Invoice Transaction views.
* Improve asset conversion forms to include stat columns and relation fields for source & destination sections.
2006-03-01 Kevin
* Fix Delivery_Build workflow script.
* setReference script of accounting workflow can be recalled multiple times on the same object without any side effect.
* Call setReference script on balance_action and stop action.
* Don't let the user edit the "Invoice Number" on Sale Invoice Transactions.
2006-02-28 Kevin 2006-02-28 Kevin
* Update SaleInvoiceTransaction_zSelectMovement to not include a 'AS movement' statement in SQL query. * Update SaleInvoiceTransaction_zSelectMovement to not include a 'AS movement' statement in SQL query.
* Move setReferences() call on accounting workflow from stop transition after script to confirm transition before script.
* Update Delivery_build on accounting workflow to generate pay sheet accounting lines automatticaly when they reach the 'confirm' state.
2006-02-27 Kevin 2006-02-27 Kevin
* Update Section_getCurrencyPrecision (more generic now). * Update Section_getCurrencyPrecision (more generic now).
......
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