Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Carlos Ramos Carreño
erp5
Commits
ff08a5d7
Commit
ff08a5d7
authored
Feb 08, 2018
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_real_time_inventory_accounting: Implement Transit Accounting use case.
parent
ef687d9a
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
1537 additions
and
55 deletions
+1537
-55
bt5/erp5_real_time_inventory_accounting/DocumentTemplateItem/portal_components/document.erp5.InventoryAssetPriceAccountingSimulationRule.py
...ument.erp5.InventoryAssetPriceAccountingSimulationRule.py
+65
-5
bt5/erp5_real_time_inventory_accounting_test/PathTemplateItem/business_process_module/bpm_hoge/inventory_accounting_transit_ledger_in_credit_path.xml
...ge/inventory_accounting_transit_ledger_in_credit_path.xml
+132
-0
bt5/erp5_real_time_inventory_accounting_test/PathTemplateItem/business_process_module/bpm_hoge/inventory_accounting_transit_ledger_in_debit.xml
...bpm_hoge/inventory_accounting_transit_ledger_in_debit.xml
+128
-0
bt5/erp5_real_time_inventory_accounting_test/PathTemplateItem/business_process_module/bpm_hoge/inventory_accounting_transit_ledger_out_credit_path.xml
...e/inventory_accounting_transit_ledger_out_credit_path.xml
+132
-0
bt5/erp5_real_time_inventory_accounting_test/PathTemplateItem/business_process_module/bpm_hoge/inventory_accounting_transit_ledger_out_debit_path.xml
...ge/inventory_accounting_transit_ledger_out_debit_path.xml
+128
-0
bt5/erp5_real_time_inventory_accounting_test/PathTemplateItem/portal_categories/ledger/transit.xml
...est/PathTemplateItem/portal_categories/ledger/transit.xml
+40
-0
bt5/erp5_real_time_inventory_accounting_test/PathTemplateItem/portal_categories/ledger/transit/entree.xml
...hTemplateItem/portal_categories/ledger/transit/entree.xml
+89
-0
bt5/erp5_real_time_inventory_accounting_test/PathTemplateItem/portal_categories/ledger/transit/sortie.xml
...hTemplateItem/portal_categories/ledger/transit/sortie.xml
+89
-0
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerInCreditDestination.py
...getInventoryAccountingTransitLedgerInCreditDestination.py
+10
-0
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerInCreditDestination.xml
...etInventoryAccountingTransitLedgerInCreditDestination.xml
+62
-0
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerInCreditSource.py
...Path_getInventoryAccountingTransitLedgerInCreditSource.py
+10
-0
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerInCreditSource.xml
...ath_getInventoryAccountingTransitLedgerInCreditSource.xml
+62
-0
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerInDebitDestination.py
..._getInventoryAccountingTransitLedgerInDebitDestination.py
+10
-0
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerInDebitDestination.xml
...getInventoryAccountingTransitLedgerInDebitDestination.xml
+62
-0
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerInDebitSource.py
...lPath_getInventoryAccountingTransitLedgerInDebitSource.py
+10
-0
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerInDebitSource.xml
...Path_getInventoryAccountingTransitLedgerInDebitSource.xml
+62
-0
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerOutCreditDestination.py
...etInventoryAccountingTransitLedgerOutCreditDestination.py
+10
-0
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerOutCreditDestination.xml
...tInventoryAccountingTransitLedgerOutCreditDestination.xml
+62
-0
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerOutCreditSource.py
...ath_getInventoryAccountingTransitLedgerOutCreditSource.py
+10
-0
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerOutCreditSource.xml
...th_getInventoryAccountingTransitLedgerOutCreditSource.xml
+62
-0
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerOutDebitDestination.py
...getInventoryAccountingTransitLedgerOutDebitDestination.py
+10
-0
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerOutDebitDestination.xml
...etInventoryAccountingTransitLedgerOutDebitDestination.xml
+62
-0
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerOutDebitSource.py
...Path_getInventoryAccountingTransitLedgerOutDebitSource.py
+10
-0
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerOutDebitSource.xml
...ath_getInventoryAccountingTransitLedgerOutDebitSource.xml
+62
-0
bt5/erp5_real_time_inventory_accounting_test/TestTemplateItem/portal_components/test.erp5.testRealTimeInventoryAccounting.py
...l_components/test.erp5.testRealTimeInventoryAccounting.py
+158
-50
No files found.
bt5/erp5_real_time_inventory_accounting/DocumentTemplateItem/portal_components/document.erp5.InventoryAssetPriceAccountingSimulationRule.py
View file @
ff08a5d7
...
...
@@ -36,9 +36,58 @@ class InventoryAssetPriceAccountingRuleMovementGenerator(InvoiceTransactionRuleM
meta_type
=
'ERP5 Inventory Asset Price Accounting Simulation Rule'
portal_type
=
'Inventory Asset Price Accounting Simulation Rule'
## XXX: "the applicable sale/internal supply (if defined)" => even if the
## price is set to None on the PPLL/SPLL, it will be set anyway by
## Movement_getPriceCalculationOperandDict (lookup for Sale Supply)
# XXX: Copy/paste from Products.ERP5.mixin.rule to support Transit use case
def
getGeneratedMovementList
(
self
,
movement_list
=
None
,
rounding
=
False
):
"""
Returns a list of movements generated by that rule.
movement_list - optional IMovementList which can be passed explicitely
rounding - boolean argument, which controls if rounding shall be applied on
generated movements or not
NOTE:
- implement rounding appropriately (True or False seems
simplistic)
"""
# Default implementation below can be overriden by subclasses
# however it should be generic enough not to be overriden
# by most classes
# Results will be appended to result
result
=
[]
# Build a list of movement and business path
input_movement_list
=
self
.
_getInputMovementList
(
movement_list
=
movement_list
,
rounding
=
rounding
)
for
input_movement
in
input_movement_list
:
# Merge movement and business path properties (core implementation)
# Lookup Business Process through composition (NOT UNION)
business_process
=
input_movement
.
asComposedDocument
()
explanation
=
self
.
_applied_rule
# We use applied rule as local explanation
trade_phase
=
self
.
_getTradePhaseList
(
input_movement
,
business_process
)
# XXX-JPS not convenient to handle
update_property_dict
=
self
.
_getUpdatePropertyDict
(
input_movement
)
for
movement
in
business_process
.
getTradePhaseMovementList
(
explanation
,
input_movement
,
trade_phase
=
trade_phase
,
delay_mode
=
None
,
update_property_dict
=
update_property_dict
):
# PATCH-BEGIN
update_dict
=
{}
if
movement
.
getLedger
()
==
'transit/entree'
:
update_dict
[
'start_date'
]
=
update_dict
[
'stop_date'
]
=
input_movement
.
getStartDate
()
elif
movement
.
getLedger
()
==
'transit/sortie'
:
update_dict
[
'start_date'
]
=
update_dict
[
'stop_date'
]
=
input_movement
.
getStopDate
()
movement
.
_edit
(
**
update_dict
)
input_movement
.
log
(
"%r (input_movement=%r): ledger=%r, start_date=%r, stop_date=%r"
%
(
movement
,
input_movement
,
movement
.
getLedger
(),
movement
.
getStartDate
(),
movement
.
getStopDate
()))
# PATCH-END
result
.
append
(
movement
)
# And return list of generated movements
return
result
def
_getInputMovementList
(
self
,
movement_list
=
None
,
rounding
=
False
):
simulation_movement
=
self
.
_applied_rule
.
getParentValue
()
...
...
@@ -58,10 +107,21 @@ class InventoryAssetPriceAccountingRuleMovementGenerator(InvoiceTransactionRuleM
# XXX: Root Applied Rule?
use
=
input_movement
.
getUse
()
# Site Preference => Trade => Sale/Purchase uses
#input_movement.log("%r (ledger=%r)" % (input_movement, input_movement.getLedger()))
if
use
==
'trade/sale'
:
start_date
=
stop_date
=
input_movement
.
getStartDate
()
start_date
=
input_movement
.
getStartDate
()
if
input_movement
.
getLedger
()
==
'transit/sortie'
:
stop_date
=
input_movement
.
getStopDate
()
else
:
stop_date
=
start_date
elif
use
==
'trade/purchase'
:
start_date
=
stop_date
=
input_movement
.
getStopDate
()
stop_date
=
input_movement
.
getStopDate
()
if
input_movement
.
getLedger
()
==
'transit/entree'
:
start_date
=
input_movement
.
getStartDate
()
else
:
start_date
=
stop_date
update_property_dict
[
'source_section'
]
=
input_movement
.
getDestinationSection
()
else
:
raise
NotImplementedError
(
"%s: use='%s' not handled by this Rule"
%
...
...
bt5/erp5_real_time_inventory_accounting_test/PathTemplateItem/business_process_module/bpm_hoge/inventory_accounting_transit_ledger_in_credit_path.xml
0 → 100644
View file @
ff08a5d7
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Trade Model Path"
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>
_local_properties
</string>
</key>
<value>
<tuple>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ledger
</string>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
<value>
<string>
string
</string>
</value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key>
<string>
_range_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
trade_phase/trade/inventory_accounting
</string>
<string>
ledger/transit/entree
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
TMP-INVENTORY-ACCOUNTING-TRANSIT-LG-IN-CREDIT
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
destination_method_id
</string>
</key>
<value>
<string>
TradeModelPath_getInventoryAccountingTransitLedgerInCreditDestination
</string>
</value>
</item>
<item>
<key>
<string>
efficiency
</string>
</key>
<value>
<float>
-1.0
</float>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
inventory_accounting_transit_ledger_in_credit_path
</string>
</value>
</item>
<item>
<key>
<string>
int_index
</string>
</key>
<value>
<int>
2
</int>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
ledger
</string>
</key>
<value>
<string>
stock
</string>
</value>
</item>
<item>
<key>
<string>
payment_end_of_month
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Trade Model Path
</string>
</value>
</item>
<item>
<key>
<string>
source_method_id
</string>
</key>
<value>
<string>
TradeModelPath_getInventoryAccountingTransitLedgerInCreditSource
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Inventory Accounting Transit Ledger In Credit
</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>
bt5/erp5_real_time_inventory_accounting_test/PathTemplateItem/business_process_module/bpm_hoge/inventory_accounting_transit_ledger_in_debit.xml
0 → 100644
View file @
ff08a5d7
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Trade Model Path"
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>
_local_properties
</string>
</key>
<value>
<tuple>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ledger
</string>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
<value>
<string>
string
</string>
</value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key>
<string>
_range_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
trade_phase/trade/inventory_accounting
</string>
<string>
ledger/transit/entree
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
TMP-INVENTORY-ACCOUNTING-TRANSIT-LG-IN-DEBIT
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
destination_method_id
</string>
</key>
<value>
<string>
TradeModelPath_getInventoryAccountingTransitLedgerInDebitDestination
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
inventory_accounting_transit_ledger_in_debit
</string>
</value>
</item>
<item>
<key>
<string>
int_index
</string>
</key>
<value>
<int>
2
</int>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
ledger
</string>
</key>
<value>
<string>
stock
</string>
</value>
</item>
<item>
<key>
<string>
payment_end_of_month
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Trade Model Path
</string>
</value>
</item>
<item>
<key>
<string>
source_method_id
</string>
</key>
<value>
<string>
TradeModelPath_getInventoryAccountingTransitLedgerInDebitSource
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Inventory Accounting Transit Ledger In Debit
</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>
bt5/erp5_real_time_inventory_accounting_test/PathTemplateItem/business_process_module/bpm_hoge/inventory_accounting_transit_ledger_out_credit_path.xml
0 → 100644
View file @
ff08a5d7
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Trade Model Path"
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>
_local_properties
</string>
</key>
<value>
<tuple>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ledger
</string>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
<value>
<string>
string
</string>
</value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key>
<string>
_range_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
trade_phase/trade/inventory_accounting
</string>
<string>
ledger/transit/sortie
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
TMP-INVENTORY-ACCOUNTING-TRANSIT-LG-OUT-CREDIT
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
destination_method_id
</string>
</key>
<value>
<string>
TradeModelPath_getInventoryAccountingTransitLedgerOutCreditDestination
</string>
</value>
</item>
<item>
<key>
<string>
efficiency
</string>
</key>
<value>
<float>
-1.0
</float>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
inventory_accounting_transit_ledger_out_credit_path
</string>
</value>
</item>
<item>
<key>
<string>
int_index
</string>
</key>
<value>
<int>
2
</int>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
ledger
</string>
</key>
<value>
<string>
stock
</string>
</value>
</item>
<item>
<key>
<string>
payment_end_of_month
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Trade Model Path
</string>
</value>
</item>
<item>
<key>
<string>
source_method_id
</string>
</key>
<value>
<string>
TradeModelPath_getInventoryAccountingTransitLedgerOutCreditSource
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Inventory Accounting Transit Ledger Out Credit
</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>
bt5/erp5_real_time_inventory_accounting_test/PathTemplateItem/business_process_module/bpm_hoge/inventory_accounting_transit_ledger_out_debit_path.xml
0 → 100644
View file @
ff08a5d7
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Trade Model Path"
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>
_local_properties
</string>
</key>
<value>
<tuple>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ledger
</string>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
<value>
<string>
string
</string>
</value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key>
<string>
_range_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
trade_phase/trade/inventory_accounting
</string>
<string>
ledger/transit/sortie
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
TMP-INVENTORY-ACCOUNTING-TRANSIT-LG-OUT-DEBIT
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
destination_method_id
</string>
</key>
<value>
<string>
TradeModelPath_getInventoryAccountingTransitLedgerOutDebitDestination
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
inventory_accounting_transit_ledger_out_debit_path
</string>
</value>
</item>
<item>
<key>
<string>
int_index
</string>
</key>
<value>
<int>
2
</int>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
ledger
</string>
</key>
<value>
<string>
stock
</string>
</value>
</item>
<item>
<key>
<string>
payment_end_of_month
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Trade Model Path
</string>
</value>
</item>
<item>
<key>
<string>
source_method_id
</string>
</key>
<value>
<string>
TradeModelPath_getInventoryAccountingTransitLedgerOutDebitSource
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Inventory Accounting Transit Ledger Out Debit
</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>
bt5/erp5_real_time_inventory_accounting_test/PathTemplateItem/portal_categories/ledger/transit.xml
View file @
ff08a5d7
...
...
@@ -53,6 +53,24 @@
</tuple>
</value>
</item>
<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>
id
</string>
</key>
<value>
<string>
transit
</string>
</value>
...
...
@@ -68,4 +86,26 @@
</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>
bt5/erp5_real_time_inventory_accounting_test/PathTemplateItem/portal_categories/ledger/transit/entree.xml
0 → 100644
View file @
ff08a5d7
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Category"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_folders_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Copy_or_Move_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Delete_objects_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
ledger/transit/entree
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
entree
</string>
</value>
</item>
<item>
<key>
<string>
int_index
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Category
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Entrée Transit
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_real_time_inventory_accounting_test/PathTemplateItem/portal_categories/ledger/transit/sortie.xml
0 → 100644
View file @
ff08a5d7
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Category"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_folders_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Copy_or_Move_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Delete_objects_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
ledger/transit/sortie
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
sortie
</string>
</value>
</item>
<item>
<key>
<string>
int_index
</string>
</key>
<value>
<int>
2
</int>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Category
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Sortie Transit
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerInCreditDestination.py
0 → 100644
View file @
ff08a5d7
use
=
movement
.
getUse
()
if
use
==
'trade/sale'
:
return
[]
elif
use
==
'trade/purchase'
:
if
movement
.
getDestination
()
==
'organisation_module/supplier'
:
return
[
'source/account_module/stock_parts_transit'
]
else
:
raise
NotImplementedError
return
[]
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerInCreditDestination.xml
0 → 100644
View file @
ff08a5d7
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
movement
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
TradeModelPath_getInventoryAccountingTransitLedgerInCreditDestination
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerInCreditSource.py
0 → 100644
View file @
ff08a5d7
use
=
movement
.
getUse
()
if
use
==
'trade/sale'
:
if
movement
.
getSource
()
==
'organisation_module/hoge'
:
return
[
'source/account_module/variation_cars'
]
elif
use
==
'trade/purchase'
:
return
[]
else
:
raise
NotImplementedError
return
[]
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerInCreditSource.xml
0 → 100644
View file @
ff08a5d7
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
movement
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
TradeModelPath_getInventoryAccountingTransitLedgerInCreditSource
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerInDebitDestination.py
0 → 100644
View file @
ff08a5d7
use
=
movement
.
getUse
()
if
use
==
'trade/sale'
:
return
[]
elif
use
==
'trade/purchase'
:
if
movement
.
getDestination
()
==
'organisation_module/supplier'
:
return
[
'source/account_module/variation_parts'
]
else
:
raise
NotImplementedError
return
[]
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerInDebitDestination.xml
0 → 100644
View file @
ff08a5d7
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
movement
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
TradeModelPath_getInventoryAccountingTransitLedgerInDebitDestination
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerInDebitSource.py
0 → 100644
View file @
ff08a5d7
use
=
movement
.
getUse
()
if
use
==
'trade/sale'
:
if
movement
.
getSource
()
==
'organisation_module/hoge'
:
return
[
'source/account_module/stock_car_transit'
]
elif
use
==
'trade/purchase'
:
return
[]
else
:
raise
NotImplementedError
return
[]
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerInDebitSource.xml
0 → 100644
View file @
ff08a5d7
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
movement
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
TradeModelPath_getInventoryAccountingTransitLedgerInDebitSource
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerOutCreditDestination.py
0 → 100644
View file @
ff08a5d7
use
=
movement
.
getUse
()
if
use
==
'trade/sale'
:
return
[]
elif
use
==
'trade/purchase'
:
if
movement
.
getDestination
()
==
'organisation_module/supplier'
:
return
[
'source/account_module/variation_parts'
]
else
:
raise
NotImplementedError
return
[]
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerOutCreditDestination.xml
0 → 100644
View file @
ff08a5d7
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
movement
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
TradeModelPath_getInventoryAccountingTransitLedgerOutCreditDestination
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerOutCreditSource.py
0 → 100644
View file @
ff08a5d7
use
=
movement
.
getUse
()
if
use
==
'trade/sale'
:
if
movement
.
getSource
()
==
'organisation_module/hoge'
:
return
[
'source/account_module/stock_car_transit'
]
elif
use
==
'trade/purchase'
:
return
[]
else
:
raise
NotImplementedError
return
[]
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerOutCreditSource.xml
0 → 100644
View file @
ff08a5d7
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
movement
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
TradeModelPath_getInventoryAccountingTransitLedgerOutCreditSource
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerOutDebitDestination.py
0 → 100644
View file @
ff08a5d7
use
=
movement
.
getUse
()
if
use
==
'trade/sale'
:
return
[]
elif
use
==
'trade/purchase'
:
if
movement
.
getDestination
()
==
'organisation_module/supplier'
:
return
[
'source/account_module/stock_parts_transit'
]
else
:
raise
NotImplementedError
return
[]
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerOutDebitDestination.xml
0 → 100644
View file @
ff08a5d7
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
movement
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
TradeModelPath_getInventoryAccountingTransitLedgerOutDebitDestination
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerOutDebitSource.py
0 → 100644
View file @
ff08a5d7
use
=
movement
.
getUse
()
if
use
==
'trade/sale'
:
if
movement
.
getSource
()
==
'organisation_module/hoge'
:
return
[
'source/account_module/variation_cars'
]
elif
use
==
'trade/purchase'
:
return
[]
else
:
raise
NotImplementedError
return
[]
bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingTransitLedgerOutDebitSource.xml
0 → 100644
View file @
ff08a5d7
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
movement
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
TradeModelPath_getInventoryAccountingTransitLedgerOutDebitSource
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_real_time_inventory_accounting_test/TestTemplateItem/portal_components/test.erp5.testRealTimeInventoryAccounting.py
View file @
ff08a5d7
...
...
@@ -100,15 +100,15 @@ class TestRealTimeInventoryAccountingMixin:
packing_list
=
sequence
[
'current_purchase_packing_list'
]
self
.
_checkAndGetCausalityRelated
(
packing_list
,
'Accounting Transaction'
,
0
)
def
stepCheckAccountingTransactionGeneratedFromSalePackingList
(
self
,
sequence
=
None
,
sequence_list
=
None
):
def
stepCheck
Three
AccountingTransactionGeneratedFromSalePackingList
(
self
,
sequence
=
None
,
sequence_list
=
None
):
packing_list
=
sequence
[
'current_sale_packing_list'
]
accounting_transaction
=
self
.
_checkAndGetCausalityRelated
(
packing_list
,
'Accounting Transaction'
,
1
)[
0
]
sequence
.
edit
(
current_accounting_transaction
=
accounting_transaction
)
accounting_transaction
_list
=
self
.
_checkAndGetCausalityRelated
(
packing_list
,
'Accounting Transaction'
,
3
)
sequence
.
edit
(
current_accounting_transaction
_list
=
accounting_transaction_list
)
def
stepCheckAccountingTransactionGeneratedFromPurchasePackingList
(
self
,
sequence
=
None
,
sequence_list
=
None
):
def
stepCheck
Three
AccountingTransactionGeneratedFromPurchasePackingList
(
self
,
sequence
=
None
,
sequence_list
=
None
):
packing_list
=
sequence
[
'current_purchase_packing_list'
]
accounting_transaction
=
self
.
_checkAndGetCausalityRelated
(
packing_list
,
'Accounting Transaction'
,
1
)[
0
]
sequence
.
edit
(
current_accounting_transaction
=
accounting_transaction
)
accounting_transaction
_list
=
self
.
_checkAndGetCausalityRelated
(
packing_list
,
'Accounting Transaction'
,
3
)
sequence
.
edit
(
current_accounting_transaction
_list
=
accounting_transaction_list
)
def
_checkDelivery
(
self
,
delivery
,
...
...
@@ -150,8 +150,14 @@ class TestRealTimeInventoryAccounting(ERP5TypeTestCase, TestRealTimeInventoryAcc
def
afterSetUp
(
self
):
category_tool
=
self
.
portal
.
portal_categories
getattr
(
self
.
portal
.
portal_types
,
'Accounting Transaction'
).
setLedgerValueList
(
category_tool
.
ledger
.
contentValues
())
getattr
(
self
.
portal
.
portal_types
,
'Accounting Transaction'
).
setLedgerValueList
(
[
category_tool
.
ledger
.
achat
,
category_tool
.
ledger
.
preparation
,
category_tool
.
ledger
.
production
,
category_tool
.
ledger
.
stock
,
category_tool
.
ledger
.
transit
.
entree
,
category_tool
.
ledger
.
transit
.
sortie
,
category_tool
.
ledger
.
vente
])
if
'my_group'
not
in
category_tool
.
group
:
category_tool
.
group
.
newContent
(
portal_type
=
'Category'
,
...
...
@@ -178,6 +184,16 @@ class TestRealTimeInventoryAccounting(ERP5TypeTestCase, TestRealTimeInventoryAcc
financial_section_value
=
category_tool
.
financial_section
.
asset
.
current_assets
.
stock
,
gap_value
=
category_tool
.
gap
.
fr
.
pcg
[
'3'
][
'35'
][
'355'
])
if
'stock_car_transit'
not
in
self
.
portal
.
account_module
:
self
.
portal
.
account_module
.
newContent
(
portal_type
=
'Account'
,
id
=
'stock_car_transit'
,
reference
=
'STOCK_CAR_TRANSIT'
,
title
=
'Stock Transit Véhicules'
,
account_type_value
=
category_tool
.
account_type
.
asset
,
financial_section_value
=
category_tool
.
financial_section
.
asset
.
current_assets
.
stock
,
gap_value
=
category_tool
.
gap
.
fr
.
pcg
[
'3'
][
'35'
][
'355'
])
if
'variation_parts'
not
in
self
.
portal
.
account_module
:
self
.
portal
.
account_module
.
newContent
(
portal_type
=
'Account'
,
...
...
@@ -198,6 +214,16 @@ class TestRealTimeInventoryAccounting(ERP5TypeTestCase, TestRealTimeInventoryAcc
financial_section_value
=
category_tool
.
financial_section
.
asset
.
current_assets
.
stock
,
gap_value
=
category_tool
.
gap
.
fr
.
pcg
[
'3'
][
'32'
][
'321'
])
if
'stock_parts_transit'
not
in
self
.
portal
.
account_module
:
self
.
portal
.
account_module
.
newContent
(
portal_type
=
'Account'
,
id
=
'stock_parts_transit'
,
reference
=
'STOCK_PARTS_TRANSIT'
,
title
=
'Stock Parts Transit'
,
account_type_value
=
category_tool
.
account_type
.
asset
,
financial_section_value
=
category_tool
.
financial_section
.
asset
.
current_assets
.
stock
,
gap_value
=
category_tool
.
gap
.
fr
.
pcg
[
'3'
][
'32'
][
'321'
])
try
:
currency_eur
=
self
.
portal
.
currency_module
.
EUR
except
AttributeError
:
...
...
@@ -430,26 +456,67 @@ class TestRealTimeInventoryAccounting(ERP5TypeTestCase, TestRealTimeInventoryAcc
sequence
.
edit
(
sale_packing_list_1
=
sale_packing_list
)
def
stepTestSalePackingList_checkAllAccountingTransaction
(
self
,
sequence
=
None
,
sequence_list
=
None
):
accounting_transaction
=
sequence
[
'current_accounting_transaction'
]
self
.
assertEquals
(
accounting_transaction
.
getSimulationState
(),
'draft'
)
self
.
_checkDelivery
(
accounting_transaction
,
delivery_property_dict
=
dict
(
source_section_value
=
self
.
portal
.
organisation_module
.
hoge
,
resource_value
=
self
.
portal
.
currency_module
.
DOL
,
ledger_value
=
self
.
portal
.
portal_categories
.
ledger
.
stock
,
# start_date=stop_date=SPL.start_date
start_date
=
DateTime
(
'2018/01/30 00:00:00 GMT+9'
),
stop_date
=
DateTime
(
'2018/01/30 00:00:00 GMT+9'
)),
movement_property_dict_tuple
=
(
dict
(
portal_type
=
'Accounting Transaction Line'
,
source_value
=
self
.
portal
.
account_module
.
variation_cars
,
# sum(SPLL.price)
quantity
=-
17100
),
dict
(
portal_type
=
'Accounting Transaction Line'
,
source_value
=
self
.
portal
.
account_module
.
stock_car_park
,
# sum(SPLL.price)
quantity
=
17100
)))
accounting_transaction_list
=
sequence
[
'current_accounting_transaction_list'
]
for
accounting_transaction
in
accounting_transaction_list
:
self
.
assertEquals
(
accounting_transaction
.
getSimulationState
(),
'draft'
)
if
accounting_transaction
.
getLedgerValue
()
==
self
.
portal
.
portal_categories
.
ledger
.
stock
:
self
.
_checkDelivery
(
accounting_transaction
,
delivery_property_dict
=
dict
(
source_section_value
=
self
.
portal
.
organisation_module
.
hoge
,
resource_value
=
self
.
portal
.
currency_module
.
DOL
,
# start_date=stop_date=SPL.start_date
start_date
=
DateTime
(
'2018/01/30 00:00:00 GMT+9'
),
stop_date
=
DateTime
(
'2018/01/30 00:00:00 GMT+9'
)),
movement_property_dict_tuple
=
(
dict
(
portal_type
=
'Accounting Transaction Line'
,
source_value
=
self
.
portal
.
account_module
.
variation_cars
,
# sum(SPLL.price)
quantity
=-
17100
),
dict
(
portal_type
=
'Accounting Transaction Line'
,
source_value
=
self
.
portal
.
account_module
.
stock_car_park
,
# sum(SPLL.price)
quantity
=
17100
)))
elif
accounting_transaction
.
getLedgerValue
()
==
self
.
portal
.
portal_categories
.
ledger
.
transit
.
entree
:
self
.
_checkDelivery
(
accounting_transaction
,
delivery_property_dict
=
dict
(
source_section_value
=
self
.
portal
.
organisation_module
.
hoge
,
resource_value
=
self
.
portal
.
currency_module
.
DOL
,
# start_date=stop_date=SPL.start_date
start_date
=
DateTime
(
'2018/01/30 00:00:00 GMT+9'
),
stop_date
=
DateTime
(
'2018/01/30 00:00:00 GMT+9'
)),
movement_property_dict_tuple
=
(
dict
(
portal_type
=
'Accounting Transaction Line'
,
source_value
=
self
.
portal
.
account_module
.
variation_cars
,
# sum(SPLL.price)
quantity
=-
17100
),
dict
(
portal_type
=
'Accounting Transaction Line'
,
source_value
=
self
.
portal
.
account_module
.
stock_car_transit
,
# sum(SPLL.price)
quantity
=
17100
)))
# ledger/transit/sortie
else
:
self
.
_checkDelivery
(
accounting_transaction
,
delivery_property_dict
=
dict
(
source_section_value
=
self
.
portal
.
organisation_module
.
hoge
,
resource_value
=
self
.
portal
.
currency_module
.
DOL
,
ledger_value
=
self
.
portal
.
portal_categories
.
ledger
.
transit
.
sortie
,
# start_date=stop_date=SPL.stop_date
start_date
=
DateTime
(
'2018/01/31 00:00:00 GMT+9'
),
stop_date
=
DateTime
(
'2018/01/31 00:00:00 GMT+9'
)),
movement_property_dict_tuple
=
(
dict
(
portal_type
=
'Accounting Transaction Line'
,
source_value
=
self
.
portal
.
account_module
.
stock_car_transit
,
# sum(SPLL.price)
quantity
=-
17100
),
dict
(
portal_type
=
'Accounting Transaction Line'
,
source_value
=
self
.
portal
.
account_module
.
variation_cars
,
# sum(SPLL.price)
quantity
=
17100
)))
def
testSalePackingList
(
self
):
sequence_list
=
SequenceList
()
...
...
@@ -465,7 +532,7 @@ class TestRealTimeInventoryAccounting(ERP5TypeTestCase, TestRealTimeInventoryAcc
Tic
CallBuilder
Tic
CheckAccountingTransactionGeneratedFromSalePackingList
Check
Three
AccountingTransactionGeneratedFromSalePackingList
TestSalePackingList_checkAllAccountingTransaction
"""
sequence_list
.
addSequenceString
(
sequence_str
)
...
...
@@ -548,26 +615,67 @@ class TestRealTimeInventoryAccounting(ERP5TypeTestCase, TestRealTimeInventoryAcc
sequence
.
edit
(
purchase_packing_list_1
=
purchase_packing_list
)
def
stepTestPurchasePackingList_checkAllAccountingTransaction
(
self
,
sequence
=
None
,
sequence_list
=
None
):
accounting_transaction
=
sequence
[
'current_accounting_transaction'
]
self
.
assertEquals
(
accounting_transaction
.
getSimulationState
(),
'draft'
)
self
.
_checkDelivery
(
accounting_transaction
,
delivery_property_dict
=
dict
(
source_section_value
=
self
.
portal
.
organisation_module
.
hoge
,
resource_value
=
self
.
portal
.
currency_module
.
DOL
,
ledger_value
=
self
.
portal
.
portal_categories
.
ledger
.
stock
,
# start_date=stop_date=PPL.stop_date
start_date
=
DateTime
(
'2018/01/10 00:00:00 GMT+9'
),
stop_date
=
DateTime
(
'2018/01/10 00:00:00 GMT+9'
)),
movement_property_dict_tuple
=
(
dict
(
portal_type
=
'Accounting Transaction Line'
,
source_value
=
self
.
portal
.
account_module
.
stock_parts_port
,
# sum(PPLL.price)
quantity
=-
14000
),
dict
(
portal_type
=
'Accounting Transaction Line'
,
source_value
=
self
.
portal
.
account_module
.
variation_parts
,
# sum(PPLL.price)
quantity
=
14000
)))
accounting_transaction_list
=
sequence
[
'current_accounting_transaction_list'
]
for
accounting_transaction
in
accounting_transaction_list
:
self
.
assertEquals
(
accounting_transaction
.
getSimulationState
(),
'draft'
)
if
accounting_transaction
.
getLedgerValue
()
==
self
.
portal
.
portal_categories
.
ledger
.
stock
:
self
.
_checkDelivery
(
accounting_transaction
,
delivery_property_dict
=
dict
(
source_section_value
=
self
.
portal
.
organisation_module
.
hoge
,
resource_value
=
self
.
portal
.
currency_module
.
DOL
,
# start_date=stop_date=PPL.stop_date
start_date
=
DateTime
(
'2018/01/10 00:00:00 GMT+9'
),
stop_date
=
DateTime
(
'2018/01/10 00:00:00 GMT+9'
)),
movement_property_dict_tuple
=
(
dict
(
portal_type
=
'Accounting Transaction Line'
,
source_value
=
self
.
portal
.
account_module
.
stock_parts_port
,
# sum(PPLL.price)
quantity
=-
14000
),
dict
(
portal_type
=
'Accounting Transaction Line'
,
source_value
=
self
.
portal
.
account_module
.
variation_parts
,
# sum(PPLL.price)
quantity
=
14000
)))
elif
accounting_transaction
.
getLedgerValue
()
==
self
.
portal
.
portal_categories
.
ledger
.
transit
.
entree
:
self
.
_checkDelivery
(
accounting_transaction
,
delivery_property_dict
=
dict
(
source_section_value
=
self
.
portal
.
organisation_module
.
hoge
,
resource_value
=
self
.
portal
.
currency_module
.
DOL
,
# start_date=stop_date=PPL.start_date
start_date
=
DateTime
(
'2018/01/09 00:00:00 GMT+9'
),
stop_date
=
DateTime
(
'2018/01/09 00:00:00 GMT+9'
)),
movement_property_dict_tuple
=
(
dict
(
portal_type
=
'Accounting Transaction Line'
,
source_value
=
self
.
portal
.
account_module
.
stock_parts_transit
,
# sum(PPLL.price)
quantity
=-
14000
),
dict
(
portal_type
=
'Accounting Transaction Line'
,
source_value
=
self
.
portal
.
account_module
.
variation_parts
,
# sum(PPLL.price)
quantity
=
14000
)))
# ledger/transit/sortie
else
:
self
.
_checkDelivery
(
accounting_transaction
,
delivery_property_dict
=
dict
(
source_section_value
=
self
.
portal
.
organisation_module
.
hoge
,
resource_value
=
self
.
portal
.
currency_module
.
DOL
,
ledger_value
=
self
.
portal
.
portal_categories
.
ledger
.
transit
.
sortie
,
# start_date=stop_date=PPL.stop_date
start_date
=
DateTime
(
'2018/01/10 00:00:00 GMT+9'
),
stop_date
=
DateTime
(
'2018/01/10 00:00:00 GMT+9'
)),
movement_property_dict_tuple
=
(
dict
(
portal_type
=
'Accounting Transaction Line'
,
source_value
=
self
.
portal
.
account_module
.
stock_parts_transit
,
# sum(PPLL.price)
quantity
=
14000
),
dict
(
portal_type
=
'Accounting Transaction Line'
,
source_value
=
self
.
portal
.
account_module
.
variation_parts
,
# sum(PPLL.price)
quantity
=-
14000
)))
def
testPurchasePackingList
(
self
):
sequence_list
=
SequenceList
()
...
...
@@ -583,7 +691,7 @@ class TestRealTimeInventoryAccounting(ERP5TypeTestCase, TestRealTimeInventoryAcc
Tic
CallBuilder
Tic
CheckAccountingTransactionGeneratedFromPurchasePackingList
Check
Three
AccountingTransactionGeneratedFromPurchasePackingList
TestPurchasePackingList_checkAllAccountingTransaction
"""
sequence_list
.
addSequenceString
(
sequence_str
)
...
...
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