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 @@
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>editable_expression</string> </key>
......
......@@ -215,7 +215,7 @@
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>editable_expression</string> </key>
......
......@@ -79,15 +79,44 @@ builder_by_ptype = {\n
\'Pay Sheet Transaction\' : \'pay_sheet_transaction_builder\',\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
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
return\n
\n
# FIXME after_method_id is not enough here. \n
\n
\n
### Kev patch: Generate pay sheet accounting lines (inspired by order_workflow)\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
builder.activate(\n
after_method_id=(\'expand\', \'updateAppliedRule\', \'edit\',\'recursiveImmediateReindexObject\', \'immediateReindexObject\'))\\\n
......@@ -152,6 +181,11 @@ if builder_by_ptype.has_key(delivery_portal_type) : \n
<string>None</string>
<string>builder</string>
<string>context</string>
<string>PRIORITY</string>
<string>pay_sheet</string>
<string>previous_tag</string>
<string>expand_tag</string>
<string>activate_kw</string>
</tuple>
</value>
</item>
......
......@@ -79,13 +79,16 @@ if transaction.getPortalType() == \'Sale Invoice Transaction\':\n
invoice_id_group = (\'accounting\', \'invoice\', source_section)\n
invoice_reference = transaction.generateNewId(id_group = invoice_id_group)\n
transaction.setReference(invoice_reference)\n
\n
# Generate new values for Source Reference and Destination Reference.\n
source_id_group = (\'accounting\', \'section\', source_section)\n
source_reference = transaction.generateNewId(id_group = source_id_group)\n
transaction.setSourceReference(source_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
if transaction.getSourceReference() in (None, \'\'):\n
source_id_group = (\'accounting\', \'section\', source_section)\n
source_reference = transaction.generateNewId(id_group = source_id_group)\n
transaction.setSourceReference(source_reference)\n
if transaction.getDestinationReference() in (None, \'\'):\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>
</item>
<item>
......
......@@ -36,7 +36,7 @@
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string></string> </value>
<value> <string>setReferences</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
......@@ -54,7 +54,7 @@
</item>
<item>
<key> <string>script_name</string> </key>
<value> <string></string> </value>
<value> <string>setReferences</string> </value>
</item>
<item>
<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
* 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
* 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