Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Titouan Soulard
slapos.core
Commits
d1b94123
Commit
d1b94123
authored
May 31, 2023
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_accounting: force all Sale documents to use a consistent price currency
parent
0b1e88d5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
280 additions
and
5 deletions
+280
-5
master/bt5/slapos_accounting/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
...rtalTypePropertySheetTemplateItem/property_sheet_list.xml
+7
-0
master/bt5/slapos_accounting/PropertySheetTemplateItem/portal_property_sheets/SlapOSSaleProfileConstraint.xml
...em/portal_property_sheets/SlapOSSaleProfileConstraint.xml
+66
-0
master/bt5/slapos_accounting/PropertySheetTemplateItem/portal_property_sheets/SlapOSSaleProfileConstraint/destination_section_price_currency_constraint.xml
...straint/destination_section_price_currency_constraint.xml
+98
-0
master/bt5/slapos_accounting/PropertySheetTemplateItem/portal_property_sheets/SlapOSSaleProfileConstraint/source_section_price_currency_constraint.xml
...leConstraint/source_section_price_currency_constraint.xml
+98
-0
master/bt5/slapos_accounting/bt/template_portal_type_property_sheet_list
...os_accounting/bt/template_portal_type_property_sheet_list
+5
-0
master/bt5/slapos_accounting/bt/template_property_sheet_id_list
.../bt5/slapos_accounting/bt/template_property_sheet_id_list
+6
-5
No files found.
master/bt5/slapos_accounting/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
View file @
d1b94123
...
...
@@ -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>
...
...
master/bt5/slapos_accounting/PropertySheetTemplateItem/portal_property_sheets/SlapOSSaleProfileConstraint.xml
0 → 100644
View file @
d1b94123
<?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>
master/bt5/slapos_accounting/PropertySheetTemplateItem/portal_property_sheets/SlapOSSaleProfileConstraint/destination_section_price_currency_constraint.xml
0 → 100644
View file @
d1b94123
<?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>
master/bt5/slapos_accounting/PropertySheetTemplateItem/portal_property_sheets/SlapOSSaleProfileConstraint/source_section_price_currency_constraint.xml
0 → 100644
View file @
d1b94123
<?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>
master/bt5/slapos_accounting/bt/template_portal_type_property_sheet_list
View file @
d1b94123
...
...
@@ -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
master/bt5/slapos_accounting/bt/template_property_sheet_id_list
View file @
d1b94123
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment