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
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
c45d11cb
Commit
c45d11cb
authored
Apr 20, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accounting py3
parent
93727840
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
46 deletions
+23
-46
bt5/erp5_accounting/DocumentTemplateItem/portal_components/document.erp5.BalanceTransaction.py
...tem/portal_components/document.erp5.BalanceTransaction.py
+4
-14
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAgedBalanceReportSectionList.py
...ntingTransactionModule_getAgedBalanceReportSectionList.py
+2
-6
bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/script_validateTransactionLines.py
...ow/accounting_workflow/script_validateTransactionLines.py
+2
-2
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingTransactionModule_createAccountingTransactionList.py
...ntingTransactionModule_createAccountingTransactionList.py
+8
-11
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingTransactionModule_createAccountingTransactionListSalesAndPayments.py
...Module_createAccountingTransactionListSalesAndPayments.py
+1
-4
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingTransactionModule_createAccountingTransactionListWithPersons.py
...ctionModule_createAccountingTransactionListWithPersons.py
+6
-9
No files found.
bt5/erp5_accounting/DocumentTemplateItem/portal_components/document.erp5.BalanceTransaction.py
View file @
c45d11cb
...
@@ -43,22 +43,12 @@ class InventoryKey(UserDict):
...
@@ -43,22 +43,12 @@ class InventoryKey(UserDict):
self
.
data
=
{}
self
.
data
=
{}
self
.
data
.
update
(
kw
)
self
.
data
.
update
(
kw
)
def
clear
(
self
):
def
_raise_immutable
(
self
,
*
args
,
**
kw
):
raise
TypeError
(
'InventoryKey are immutable'
)
raise
TypeError
(
'InventoryKey are immutable'
)
def
pop
(
self
,
keys
,
*
args
):
clear
=
pop
=
update
=
__delitem__
=
__setitem__
=
_raise_immutable
raise
TypeError
(
'InventoryKey are immutable'
)
def
update
(
self
,
dict
=
None
,
**
kwargs
):
# pylint: disable=redefined-builtin
raise
TypeError
(
'InventoryKey are immutable'
)
def
__delitem__
(
self
,
key
):
raise
TypeError
(
'InventoryKey are immutable'
)
def
__setitem__
(
self
,
key
,
item
):
raise
TypeError
(
'InventoryKey are immutable'
)
def
setdefault
(
self
,
key
,
failobj
=
None
):
def
setdefault
(
self
,
key
,
default
=
None
):
if
key
in
self
.
data
:
if
key
in
self
.
data
:
return
self
.
data
[
key
]
return
self
.
data
[
key
]
raise
TypeError
(
'InventoryKey are immutable'
)
raise
TypeError
(
'InventoryKey are immutable'
)
...
@@ -440,7 +430,7 @@ class BalanceTransaction(AccountingTransaction, Inventory):
...
@@ -440,7 +430,7 @@ class BalanceTransaction(AccountingTransaction, Inventory):
return
factory
return
factory
def
_immediateReindexObject
(
self
,
**
kw
):
def
_immediateReindexObject
(
self
,
*
args
,
*
*
kw
):
"""Reindexes the object.
"""Reindexes the object.
This is different indexing that the default Inventory indexing, because
This is different indexing that the default Inventory indexing, because
we want to take into account that lines in this balance transaction to
we want to take into account that lines in this balance transaction to
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAgedBalanceReportSectionList.py
View file @
c45d11cb
...
@@ -2,12 +2,8 @@ import six
...
@@ -2,12 +2,8 @@ import six
from
Products.ERP5Type.Message
import
translateString
from
Products.ERP5Type.Message
import
translateString
from
Products.ERP5Form.Report
import
ReportSection
from
Products.ERP5Form.Report
import
ReportSection
if
six
.
PY2
:
def
translate
(
*
args
,
**
kw
):
def
translate
(
*
args
,
**
kw
):
return
six
.
text_type
(
translateString
(
*
args
,
**
kw
))
return
unicode
(
translateString
(
*
args
,
**
kw
))
else
:
def
translate
(
*
args
,
**
kw
):
return
str
(
translateString
(
*
args
,
**
kw
))
request
=
container
.
REQUEST
request
=
container
.
REQUEST
section_category
=
request
[
'section_category'
]
section_category
=
request
[
'section_category'
]
...
...
bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/script_validateTransactionLines.py
View file @
c45d11cb
...
@@ -28,14 +28,14 @@ for line in transaction_lines:
...
@@ -28,14 +28,14 @@ for line in transaction_lines:
line
.
getDestinationSectionValue
(
portal_type
=
section_portal_type_list
),
line
.
getDestinationSectionValue
(
portal_type
=
section_portal_type_list
),
line
.
getSourcePaymentValue
(
portal_type
=
bank_account_portal_type
),
line
.
getSourcePaymentValue
(
portal_type
=
bank_account_portal_type
),
lambda
:
(
x
[
1
]
for
x
in
getBankAccountItemList
(
lambda
:
(
x
[
1
]
for
x
in
getBankAccountItemList
(
organisation
=
line
.
getSourceSection
(
portal_type
=
section_portal_type_list
))),
organisation
=
line
.
getSourceSection
(
portal_type
=
section_portal_type_list
))),
# pylint:disable=cell-var-from-loop
),
),
(
(
line
.
getDestinationValue
(
portal_type
=
'Account'
),
line
.
getDestinationValue
(
portal_type
=
'Account'
),
line
.
getSourceSectionValue
(
portal_type
=
section_portal_type_list
),
line
.
getSourceSectionValue
(
portal_type
=
section_portal_type_list
),
line
.
getDestinationPaymentValue
(
portal_type
=
bank_account_portal_type
),
line
.
getDestinationPaymentValue
(
portal_type
=
bank_account_portal_type
),
lambda
:
(
x
[
1
]
for
x
in
getBankAccountItemList
(
lambda
:
(
x
[
1
]
for
x
in
getBankAccountItemList
(
organisation
=
line
.
getDestinationSection
(
portal_type
=
section_portal_type_list
))),
organisation
=
line
.
getDestinationSection
(
portal_type
=
section_portal_type_list
))),
# pylint:disable=cell-var-from-loop
),
),
):
):
if
account
is
not
None
and
account
.
getValidationState
()
!=
'validated'
:
if
account
is
not
None
and
account
.
getValidationState
()
!=
'validated'
:
...
...
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingTransactionModule_createAccountingTransactionList.py
View file @
c45d11cb
...
@@ -21,11 +21,8 @@ if accounting_module.getProperty('current_content_script',
...
@@ -21,11 +21,8 @@ if accounting_module.getProperty('current_content_script',
''
)
==
current_script_data_id
:
''
)
==
current_script_data_id
:
return
"Accounting Transactions Created."
return
"Accounting Transactions Created."
# first, cleanup accounting module
# first, cleanup modules
# XXX should be done in an external script / tool, because we have to
for
module_id
in
[
'accounting_module'
,
# workaround some security checks
if
1
:
for
module_id
in
[
'accounting_module'
,
'sale_packing_list_module'
,
'sale_packing_list_module'
,
'portal_simulation'
,
]:
'portal_simulation'
,
]:
module
=
portal
[
module_id
]
module
=
portal
[
module_id
]
...
...
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingTransactionModule_createAccountingTransactionListSalesAndPayments.py
View file @
c45d11cb
...
@@ -16,10 +16,7 @@ if accounting_module.getProperty('current_content_script',
...
@@ -16,10 +16,7 @@ if accounting_module.getProperty('current_content_script',
return
"Accounting Transactions Created."
return
"Accounting Transactions Created."
# first, cleanup accounting module
# first, cleanup accounting module
# XXX should be done in an external script / tool, because we have to
accounting_module
.
manage_delObjects
(
list
(
accounting_module
.
objectIds
()))
# workaround some security checks
if
1
:
accounting_module
.
manage_delObjects
(
list
(
accounting_module
.
objectIds
()))
# XXX copy & paste
# XXX copy & paste
def
getAccountByTitle
(
title
):
def
getAccountByTitle
(
title
):
...
...
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingTransactionModule_createAccountingTransactionListWithPersons.py
View file @
c45d11cb
...
@@ -15,11 +15,8 @@ if accounting_module.getProperty('current_content_script',
...
@@ -15,11 +15,8 @@ if accounting_module.getProperty('current_content_script',
return
"Accounting Transactions Created."
return
"Accounting Transactions Created."
# first, cleanup accounting module
# first, cleanup modules
# XXX should be done in an external script / tool, because we have to
for
module_id
in
[
'accounting_module'
,
# workaround some security checks
if
1
:
for
module_id
in
[
'accounting_module'
,
'sale_packing_list_module'
,
'sale_packing_list_module'
,
'portal_simulation'
,
]:
'portal_simulation'
,
]:
module
=
portal
[
module_id
]
module
=
portal
[
module_id
]
...
...
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