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

accounting: allow any transaction type as causality of invoice

The main motivation is to allow to use Internal Invoice Transaction as
causality of Internal Invoice Transaction, so that when they are posted
the automatic grouping takes place.

A side effect is that now users can also create transaction as causality
of Balance Transaction, not really expected, but not really a problem.
parent be50fa7d
......@@ -58,6 +58,22 @@
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>allow_creation</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>base_category</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>catalog_index</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>columns</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
......@@ -66,10 +82,24 @@
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>proxy_listbox_ids</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
......@@ -139,28 +169,7 @@
<item>
<key> <string>portal_type</string> </key>
<value>
<list>
<tuple>
<string>Pay Sheet Transaction</string>
<string>Pay Sheet Transaction</string>
</tuple>
<tuple>
<string>Purchase Invoice Transaction</string>
<string>Purchase Invoice Transaction</string>
</tuple>
<tuple>
<string>Sale Invoice Transaction</string>
<string>Sale Invoice Transaction</string>
</tuple>
<tuple>
<string>Accounting Transaction</string>
<string>Accounting Transaction</string>
</tuple>
<tuple>
<string>Payment Transaction</string>
<string>Payment Transaction</string>
</tuple>
</list>
<list/>
</value>
</item>
<item>
......@@ -188,4 +197,17 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: [(x,x) for x in context.getPortalAccountingTransactionTypeList()]</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
  • Not sure if this is planned to be merged as topic, but the MR writes:

    Reconfigure Causality (Invoices ...) relation fieds to allow selecting internal transaction (so that when creating the "payment" internal transaction, we connect it to the "invoice" internal transaction and grouping reference is set automatically when posting to general ledger.

    and it is a bit different of what happens allowing every portal type. So to consider:

    • Maybe edit the MR message (like "Reconfigure Causality (Invoices ...) relation fieds to allow allow every portal type, so also Internal Invoice Transaction ...")?
    • I generally prefer not to filter by portal types in relation fields, but one could say why not just add Internal Invoice Transaction instead of allowing every type.

    EDIT: I put this as comment in f5acdc4c, but also appears on MR, so to clarify

    Edited by Georgios Dagkakis
  • Thanks, I amended as you suggested.

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