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
3efac7ef
Commit
3efac7ef
authored
Apr 20, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accounting py3
parent
25cf17ae
Changes
6
Hide 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 @
3efac7ef
...
...
@@ -43,22 +43,12 @@ class InventoryKey(UserDict):
self
.
data
=
{}
self
.
data
.
update
(
kw
)
def
clear
(
self
):
def
_raise_immutable
(
self
,
*
args
,
**
kw
):
raise
TypeError
(
'InventoryKey are immutable'
)
def
pop
(
self
,
keys
,
*
args
):
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'
)
clear
=
pop
=
update
=
__delitem__
=
__setitem__
=
_raise_immutable
def
setdefault
(
self
,
key
,
failobj
=
None
):
def
setdefault
(
self
,
key
,
default
=
None
):
if
key
in
self
.
data
:
return
self
.
data
[
key
]
raise
TypeError
(
'InventoryKey are immutable'
)
...
...
@@ -440,7 +430,7 @@ class BalanceTransaction(AccountingTransaction, Inventory):
return
factory
def
_immediateReindexObject
(
self
,
**
kw
):
def
_immediateReindexObject
(
self
,
*
args
,
*
*
kw
):
"""Reindexes the object.
This is different indexing that the default Inventory indexing, because
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 @
3efac7ef
...
...
@@ -2,12 +2,8 @@ import six
from
Products.ERP5Type.Message
import
translateString
from
Products.ERP5Form.Report
import
ReportSection
if
six
.
PY2
:
def
translate
(
*
args
,
**
kw
):
return
unicode
(
translateString
(
*
args
,
**
kw
))
else
:
def
translate
(
*
args
,
**
kw
):
return
str
(
translateString
(
*
args
,
**
kw
))
def
translate
(
*
args
,
**
kw
):
return
six
.
text_type
(
translateString
(
*
args
,
**
kw
))
request
=
container
.
REQUEST
section_category
=
request
[
'section_category'
]
...
...
bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/script_validateTransactionLines.py
View file @
3efac7ef
...
...
@@ -28,14 +28,14 @@ for line in transaction_lines:
line
.
getDestinationSectionValue
(
portal_type
=
section_portal_type_list
),
line
.
getSourcePaymentValue
(
portal_type
=
bank_account_portal_type
),
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
.
getSourceSectionValue
(
portal_type
=
section_portal_type_list
),
line
.
getDestinationPaymentValue
(
portal_type
=
bank_account_portal_type
),
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'
:
...
...
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingTransactionModule_createAccountingTransactionList.py
View file @
3efac7ef
...
...
@@ -21,17 +21,14 @@ if accounting_module.getProperty('current_content_script',
''
)
==
current_script_data_id
:
return
"Accounting Transactions Created."
# first, cleanup accounting module
# XXX should be done in an external script / tool, because we have to
# workaround some security checks
if
1
:
for
module_id
in
[
'accounting_module'
,
'sale_packing_list_module'
,
'portal_simulation'
,
]:
module
=
portal
[
module_id
]
if
len
(
module
)
>
200
:
raise
ValueError
(
"Do not run this on production !!!"
)
module
.
manage_delObjects
(
list
(
module
.
objectIds
()))
# first, cleanup modules
for
module_id
in
[
'accounting_module'
,
'sale_packing_list_module'
,
'portal_simulation'
,
]:
module
=
portal
[
module_id
]
if
len
(
module
)
>
200
:
raise
ValueError
(
"Do not run this on production !!!"
)
module
.
manage_delObjects
(
list
(
module
.
objectIds
()))
# if `set_ledger`is true, allow all test ledgers in accounting types.
for
accounting_type_id
in
portal
.
getPortalAccountingTransactionTypeList
():
...
...
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingTransactionModule_createAccountingTransactionListSalesAndPayments.py
View file @
3efac7ef
...
...
@@ -16,10 +16,7 @@ if accounting_module.getProperty('current_content_script',
return
"Accounting Transactions Created."
# first, cleanup accounting module
# XXX should be done in an external script / tool, because we have to
# workaround some security checks
if
1
:
accounting_module
.
manage_delObjects
(
list
(
accounting_module
.
objectIds
()))
accounting_module
.
manage_delObjects
(
list
(
accounting_module
.
objectIds
()))
# XXX copy & paste
def
getAccountByTitle
(
title
):
...
...
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingTransactionModule_createAccountingTransactionListWithPersons.py
View file @
3efac7ef
...
...
@@ -15,15 +15,12 @@ if accounting_module.getProperty('current_content_script',
return
"Accounting Transactions Created."
# first, cleanup accounting module
# XXX should be done in an external script / tool, because we have to
# workaround some security checks
if
1
:
for
module_id
in
[
'accounting_module'
,
'sale_packing_list_module'
,
'portal_simulation'
,
]:
module
=
portal
[
module_id
]
module
.
manage_delObjects
(
list
(
module
.
objectIds
()))
# first, cleanup modules
for
module_id
in
[
'accounting_module'
,
'sale_packing_list_module'
,
'portal_simulation'
,
]:
module
=
portal
[
module_id
]
module
.
manage_delObjects
(
list
(
module
.
objectIds
()))
# XXX copy & paste
def
getAccountByTitle
(
title
):
...
...
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