Commit 6e2a8651 authored by Romain Courteaud's avatar Romain Courteaud

slapos_accounting: force all Sale documents to use a consistent price currency

parent b6834e2d
......@@ -31,6 +31,7 @@
<portal_type id="Open Sale Order">
<item>SlapOSAccountingOpenSaleOrderConstraint</item>
<item>SlapOSLedgerConstraint</item>
<item>SlapOSSaleProfileConstraint</item>
</portal_type>
<portal_type id="Open Sale Order Line">
<item>SlapOSAccountingOpenSaleOrderLineConstraint</item>
......@@ -45,16 +46,22 @@
<portal_type id="Sale Invoice Transaction">
<item>SlapOSAccountingSaleInvoiceTransactionConstraint</item>
<item>SlapOSLedgerConstraint</item>
<item>SlapOSSaleProfileConstraint</item>
</portal_type>
<portal_type id="Sale Order">
<item>SlapOSSaleProfileConstraint</item>
</portal_type>
<portal_type id="Sale Packing List">
<item>SlapOSAccountingSalePackingListConstraint</item>
<item>SlapOSLedgerConstraint</item>
<item>SlapOSSaleProfileConstraint</item>
</portal_type>
<portal_type id="Sale Packing List Line">
<item>SlapOSAccountingSalePackingListLineConstraint</item>
</portal_type>
<portal_type id="Sale Trade Condition">
<item>SlapOSAccountingSaleTradeConditionConstraint</item>
<item>SlapOSSaleProfileConstraint</item>
</portal_type>
<portal_type id="Slave Instance">
<item>InstanceAccountingSynchronisation</item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Property Sheet" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SlapOSSaleProfileConstraint</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Property Sheet</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="TALES Constraint" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Consider the system do not manage double accounting for now.</string> </value>
</item>
<item>
<key> <string>expression</string> </key>
<value> <string>python: context.getDestinationSectionValue().getPriceCurrency(\'\') == \'\'</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>destination_section_price_currency_constraint</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>message_expression_false</string> </key>
<value> <string>Price Currency must be defined on the Destination Section</string> </value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>test_tales_expression</string> </key>
<value> <string>python: context.hasDestinationSection(portal_type=\'Organisation\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="TALES Constraint" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Consider the system use no currency convertion. If a source_section is used, it MUST define the same currency</string> </value>
</item>
<item>
<key> <string>expression</string> </key>
<value> <string>python: context.getPriceCurrency() == context.getSourceSectionValue().getPriceCurrency()</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>source_section_price_currency_constraint</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>message_expression_false</string> </key>
<value> <string>Price Currency must be the one used on the Source Section</string> </value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>test_tales_expression</string> </key>
<value> <string>python: context.hasSourceSection()</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -14,15 +14,20 @@ Internal Invoice Transaction | SlapOSVirtualMasterSourceProjectConstraint
Open Sale Order Line | SlapOSAccountingOpenSaleOrderLineConstraint
Open Sale Order | SlapOSAccountingOpenSaleOrderConstraint
Open Sale Order | SlapOSLedgerConstraint
Open Sale Order | SlapOSSaleProfileConstraint
Payment Transaction | SlapOSLedgerConstraint
Purchase Invoice Transaction | SlapOSLedgerConstraint
Purchase Invoice Transaction | SlapOSVirtualMasterSourceProjectConstraint
Sale Invoice Transaction | SlapOSAccountingSaleInvoiceTransactionConstraint
Sale Invoice Transaction | SlapOSLedgerConstraint
Sale Invoice Transaction | SlapOSSaleProfileConstraint
Sale Order | SlapOSSaleProfileConstraint
Sale Packing List Line | SlapOSAccountingSalePackingListLineConstraint
Sale Packing List | SlapOSAccountingSalePackingListConstraint
Sale Packing List | SlapOSLedgerConstraint
Sale Packing List | SlapOSSaleProfileConstraint
Sale Trade Condition | SlapOSAccountingSaleTradeConditionConstraint
Sale Trade Condition | SlapOSSaleProfileConstraint
Slave Instance | InstanceAccountingSynchronisation
Software Instance | InstanceAccountingSynchronisation
User Consumption HTML File | SortIndex
\ No newline at end of file
InstanceAccountingSynchronisation
SlapOSLedgerConstraint
SlapOSAccountingOpenSaleOrderLineConstraint
SlapOSAccountingOpenSaleOrderConstraint
SlapOSAccountingHostingSubscriptionConstraint
SlapOSAccountingSaleTradeConditionConstraint
SlapOSAccountingOpenSaleOrderConstraint
SlapOSAccountingOpenSaleOrderLineConstraint
SlapOSAccountingSaleInvoiceTransactionConstraint
SlapOSAccountingSalePackingListConstraint
SlapOSAccountingSalePackingListLineConstraint
SlapOSAccountingSaleTradeConditionConstraint
SlapOSAccountingSystemPreference
SlapOSCloudContractAccounting
SlapOSCloudContractLineAccounting
\ No newline at end of file
SlapOSCloudContractLineAccounting
SlapOSLedgerConstraint
SlapOSSaleProfileConstraint
\ 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