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
Joshua
erp5
Commits
65d39fde
Commit
65d39fde
authored
Jun 29, 2017
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accounting: fix python code warnings
parent
74d8b5f7
Changes
39
Show whitespace changes
Inline
Side-by-side
Showing
39 changed files
with
114 additions
and
146 deletions
+114
-146
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountListForTrialBalance.py
...accounting/AccountModule_getAccountListForTrialBalance.py
+1
-1
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountListForTrialBalance.xml
...ccounting/AccountModule_getAccountListForTrialBalance.xml
+1
-1
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAvailableGapList.py
...kins/erp5_accounting/AccountModule_getAvailableGapList.py
+0
-1
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getBankAccountsReportSectionList.py
...ounting/AccountModule_getBankAccountsReportSectionList.py
+12
-12
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportCreditorNodeBalance.py
...nting/AccountModule_getFiscalReportCreditorNodeBalance.py
+3
-3
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportCreditorPaymentBalance.py
...ng/AccountModule_getFiscalReportCreditorPaymentBalance.py
+3
-3
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportDebitorNodeBalance.py
...unting/AccountModule_getFiscalReportDebitorNodeBalance.py
+3
-3
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportDebitorPaymentBalance.py
...ing/AccountModule_getFiscalReportDebitorPaymentBalance.py
+3
-3
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getMirrorAccountUrl.py
...kins/erp5_accounting/AccountModule_getMirrorAccountUrl.py
+5
-8
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getTransactionListUrl.py
...ns/erp5_accounting/AccountModule_getTransactionListUrl.py
+7
-7
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getNotGroupedAccountingTransactionList.xml
...unting/Account_getNotGroupedAccountingTransactionList.xml
+1
-1
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_hashGapItemList.py
...m/portal_skins/erp5_accounting/Account_hashGapItemList.py
+2
-0
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_hashGapItemList.xml
.../portal_skins/erp5_accounting/Account_hashGapItemList.xml
+1
-1
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createRelatedPaymentTransactionList.py
...gTransactionModule_createRelatedPaymentTransactionList.py
+2
-4
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createRelatedPaymentTransactionList.xml
...TransactionModule_createRelatedPaymentTransactionList.xml
+1
-1
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createReversalTransactionList.py
...ountingTransactionModule_createReversalTransactionList.py
+1
-4
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createReversalTransactionList.xml
...untingTransactionModule_createReversalTransactionList.xml
+1
-1
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAccountingLineReportReportSectionList.py
...sactionModule_getAccountingLineReportReportSectionList.py
+1
-3
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAgedBalanceReportSectionList.py
...ntingTransactionModule_getAgedBalanceReportSectionList.py
+2
-3
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getJournalSectionLineList.py
.../AccountingTransactionModule_getJournalSectionLineList.py
+1
-1
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getJournalSectionLineList.xml
...AccountingTransactionModule_getJournalSectionLineList.xml
+1
-1
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getJournalSectionStatList.py
.../AccountingTransactionModule_getJournalSectionStatList.py
+0
-1
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getSummaryAgedBalanceLineList.py
...ountingTransactionModule_getSummaryAgedBalanceLineList.py
+1
-1
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getTransactionLineListForGroupingReference.py
...ctionModule_getTransactionLineListForGroupingReference.py
+2
-4
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_setGroupingReference.py
...nting/AccountingTransactionModule_setGroupingReference.py
+7
-12
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_setGroupingReference.xml
...ting/AccountingTransactionModule_setGroupingReference.xml
+1
-1
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_updateGroupingReference.xml
...g/AccountingTransactionModule_updateGroupingReference.xml
+1
-1
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_addAccountingTransactionLine.py
...ing/AccountingTransaction_addAccountingTransactionLine.py
+1
-1
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getAccountingTransactionLineList.xml
...ccountingTransaction_getAccountingTransactionLineList.xml
+1
-1
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_isDestinationCurrencyConvertible.py
...AccountingTransaction_isDestinationCurrencyConvertible.py
+4
-4
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_isSourceCurrencyConvertible.py
...ting/AccountingTransaction_isSourceCurrencyConvertible.py
+4
-4
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Base_importGapFile.py
...teItem/portal_skins/erp5_accounting/Base_importGapFile.py
+16
-19
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/InternalInvoiceTransaction_getAuthenticatedUserSection.py
...InternalInvoiceTransaction_getAuthenticatedUserSection.py
+0
-2
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_createRelatedPaymentTransaction.py
...rp5_accounting/Invoice_createRelatedPaymentTransaction.py
+11
-15
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_getRemainingTotalPayablePrice.py
.../erp5_accounting/Invoice_getRemainingTotalPayablePrice.py
+9
-13
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getExplanationTitleAndAnalytics.py
...p5_accounting/Movement_getExplanationTitleAndAnalytics.py
+1
-1
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.xml
...ins/erp5_accounting/Node_getAccountingTransactionList.xml
+1
-1
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_statAccountingBalance.py
...ortal_skins/erp5_accounting/Node_statAccountingBalance.py
+1
-1
bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/scripts/checkDates.py
...workflow/accounting_period_workflow/scripts/checkDates.py
+1
-2
No files found.
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountListForTrialBalance.py
View file @
65d39fde
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountListForTrialBalance.xml
View file @
65d39fde
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
show_empty_accounts, expand_accounts, at_date, from_date, period_start_date, section_uid, simulation_state, precision, node_uid, gap_root=None, per_account_class_summary=0, portal_type=None, function=None, funding=None, project=None, ledger=None, group_analytic=
[]
, mirror_section_category=None, show_detailed_balance_columns=False, src__=False, **kw
</string>
</value>
<value>
<string>
show_empty_accounts, expand_accounts, at_date, from_date, period_start_date, section_uid, simulation_state, precision, node_uid, gap_root=None, per_account_class_summary=0, portal_type=None, function=None, funding=None, project=None, ledger=None, group_analytic=
()
, mirror_section_category=None, show_detailed_balance_columns=False, src__=False, **kw
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAvailableGapList.py
View file @
65d39fde
...
@@ -7,7 +7,6 @@ item_list = [('', '')]
...
@@ -7,7 +7,6 @@ item_list = [('', '')]
countries
=
context
.
portal_categories
.
gap
.
objectValues
()
countries
=
context
.
portal_categories
.
gap
.
objectValues
()
for
country
in
countries
:
for
country
in
countries
:
for
gap
in
country
.
objectValues
()
:
for
gap
in
country
.
objectValues
()
:
title
=
country
.
getTranslatedTitle
()
+
'/'
+
gap
.
getTranslatedTitle
()
path
=
gap
.
getRelativeUrl
()
path
=
gap
.
getRelativeUrl
()
item_list
.
append
(
item_list
.
append
(
((
country
.
getTranslatedTitle
()
+
'/'
+
gap
.
getTranslatedTitle
()),
((
country
.
getTranslatedTitle
()
+
'/'
+
gap
.
getTranslatedTitle
()),
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getBankAccountsReportSectionList.py
View file @
65d39fde
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportCreditorNodeBalance.py
View file @
65d39fde
...
@@ -17,10 +17,10 @@ if request.get('account_id_list_conversion_script_id'):
...
@@ -17,10 +17,10 @@ if request.get('account_id_list_conversion_script_id'):
else
:
else
:
kw
[
'node_category'
]
=
account_id_list
kw
[
'node_category'
]
=
account_id_list
sum
=
0.0
sum
_
=
0.0
for
inventory
in
portal
.
portal_simulation
.
getInventoryList
(
for
inventory
in
portal
.
portal_simulation
.
getInventoryList
(
group_by_node
=
1
,
group_by_node
=
1
,
**
kw
):
**
kw
):
if
inventory
.
total_price
<
0
:
if
inventory
.
total_price
<
0
:
sum
+=
(
inventory
.
total_price
or
0
)
sum
_
+=
(
inventory
.
total_price
or
0
)
return
sum
return
sum
_
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportCreditorPaymentBalance.py
View file @
65d39fde
...
@@ -17,11 +17,11 @@ if request.get('account_id_list_conversion_script_id'):
...
@@ -17,11 +17,11 @@ if request.get('account_id_list_conversion_script_id'):
else
:
else
:
kw
[
'node_category'
]
=
account_id_list
kw
[
'node_category'
]
=
account_id_list
sum
=
0.0
sum
_
=
0.0
for
inventory
in
portal
.
portal_simulation
.
getInventoryList
(
for
inventory
in
portal
.
portal_simulation
.
getInventoryList
(
group_by_payment
=
1
,
group_by_payment
=
1
,
group_by_node
=
1
,
group_by_node
=
1
,
**
kw
):
**
kw
):
if
inventory
.
total_price
<
0
:
if
inventory
.
total_price
<
0
:
sum
+=
(
inventory
.
total_price
or
0
)
sum
_
+=
(
inventory
.
total_price
or
0
)
return
sum
return
sum
_
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportDebitorNodeBalance.py
View file @
65d39fde
...
@@ -17,10 +17,10 @@ if request.get('account_id_list_conversion_script_id'):
...
@@ -17,10 +17,10 @@ if request.get('account_id_list_conversion_script_id'):
else
:
else
:
kw
[
'node_category'
]
=
account_id_list
kw
[
'node_category'
]
=
account_id_list
sum
=
0.0
sum
_
=
0.0
for
inventory
in
portal
.
portal_simulation
.
getInventoryList
(
for
inventory
in
portal
.
portal_simulation
.
getInventoryList
(
group_by_node
=
1
,
group_by_node
=
1
,
**
kw
):
**
kw
):
if
inventory
.
total_price
>
0
:
if
inventory
.
total_price
>
0
:
sum
+=
inventory
.
total_price
sum
_
+=
inventory
.
total_price
return
sum
return
sum
_
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportDebitorPaymentBalance.py
View file @
65d39fde
...
@@ -17,11 +17,11 @@ if request.get('account_id_list_conversion_script_id'):
...
@@ -17,11 +17,11 @@ if request.get('account_id_list_conversion_script_id'):
else
:
else
:
kw
[
'node_category'
]
=
account_id_list
kw
[
'node_category'
]
=
account_id_list
sum
=
0.0
sum
_
=
0.0
for
inventory
in
portal
.
portal_simulation
.
getInventoryList
(
for
inventory
in
portal
.
portal_simulation
.
getInventoryList
(
group_by_payment
=
1
,
group_by_payment
=
1
,
group_by_node
=
1
,
group_by_node
=
1
,
**
kw
):
**
kw
):
if
inventory
.
total_price
>
0
:
if
inventory
.
total_price
>
0
:
sum
+=
inventory
.
total_price
sum
_
+=
inventory
.
total_price
return
sum
return
sum
_
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getMirrorAccountUrl.py
View file @
65d39fde
index
=
context
.
portal_selections
.
getSelectionIndexFor
(
selection_name
)
index
=
context
.
portal_selections
.
getSelectionIndexFor
(
selection_name
)
object
=
brain
.
getObject
()
account
=
brain
.
getObject
()
object
=
object
.
getDestinationValue
()
account
=
account
.
getDestinationValue
()
if
object
is
None
:
if
account
is
not
None
:
url
=
None
return
'%s/view?selection_index=%s&selection_name=%s&reset=1'
%
(
else
:
account
.
absolute_url
(),
index
,
selection_name
)
url
=
object
.
absolute_url
()
+
'/view?selection_index=%s&selection_name=%s&reset=1'
%
(
index
,
selection_name
)
return
url
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getTransactionListUrl.py
View file @
65d39fde
...
@@ -2,16 +2,16 @@ from ZTUtils import make_query
...
@@ -2,16 +2,16 @@ from ZTUtils import make_query
from
Products.PythonScripts.standard
import
html_quote
from
Products.PythonScripts.standard
import
html_quote
index
=
context
.
portal_selections
.
getSelectionIndexFor
(
selection_name
)
index
=
context
.
portal_selections
.
getSelectionIndexFor
(
selection_name
)
objec
t
=
brain
.
getObject
()
accoun
t
=
brain
.
getObject
()
# this is for domain_tree mode
# this is for domain_tree mode
if
object
.
getPortalType
()
==
"Category"
:
if
account
.
getPortalType
()
==
"Category"
:
return
"#"
return
"#"
method
=
'Account_viewAccountingTransactionList'
kw
=
{
'selection_index'
:
str
(
index
),
kw
=
{
'selection_index'
:
str
(
index
),
'selection_name'
:
selection_name
,
'selection_name'
:
selection_name
,
'reset'
:
'1'
,
'reset'
:
'1'
,
}
}
return
html_quote
(
'%s/%s?%s'
%
(
object
.
absolute_url
(),
method
,
make_query
(
kw
)))
return
html_quote
(
'%s/Account_viewAccountingTransactionList?%s'
%
(
account
.
absolute_url
(),
make_query
(
kw
)))
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getNotGroupedAccountingTransactionList.xml
View file @
65d39fde
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
selection=None, sort_on=
[]
, node_category=None, node_category_strict_membership=None, from_date=None, selection_name=None, function=None, project_uid=None, analytic_column_list=(), **kw
</string>
</value>
<value>
<string>
selection=None, sort_on=
()
, node_category=None, node_category_strict_membership=None, from_date=None, selection_name=None, function=None, project_uid=None, analytic_column_list=(), **kw
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<key>
<string>
_proxy_roles
</string>
</key>
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_hashGapItemList.py
View file @
65d39fde
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
Base_translateString
=
portal
.
Base_translateString
Base_translateString
=
portal
.
Base_translateString
split_depth
=
2
split_depth
=
2
if
default_sub_field_property_dict
is
None
:
default_sub_field_property_dict
=
{}
def
getSubFieldDict
():
def
getSubFieldDict
():
def
getSubFieldDictCache
():
def
getSubFieldDictCache
():
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_hashGapItemList.xml
View file @
65d39fde
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
item_list, value_list, default_sub_field_property_dict=
{}
, is_right_display=0
</string>
</value>
<value>
<string>
item_list, value_list, default_sub_field_property_dict=
None
, is_right_display=0
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createRelatedPaymentTransactionList.py
View file @
65d39fde
from
Products.ERP5Type.Message
import
translateString
from
Products.ERP5Type.Message
import
translateString
try
:
from
zExceptions
import
Redirect
from
zExceptions
import
Redirect
except
:
Redirect
=
'Redirect'
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
stool
=
portal
.
portal_selections
stool
=
portal
.
portal_selections
getObject
=
portal
.
portal_catalog
.
getObject
getObject
=
portal
.
portal_catalog
.
getObject
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createRelatedPaymentTransactionList.xml
View file @
65d39fde
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
node, payment_mode, payment, selection_index=None, uids=
[], listbox_uid=[]
,selection_name=\'\', **kw
</string>
</value>
<value>
<string>
node, payment_mode, payment, selection_index=None, uids=
(), listbox_uid=()
,selection_name=\'\', **kw
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createReversalTransactionList.py
View file @
65d39fde
from
Products.ERP5Type.Message
import
translateString
from
Products.ERP5Type.Message
import
translateString
try
:
from
zExceptions
import
Redirect
from
zExceptions
import
Redirect
except
:
Redirect
=
'Redirect'
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
stool
=
portal
.
portal_selections
stool
=
portal
.
portal_selections
getObject
=
portal
.
portal_catalog
.
getObject
getObject
=
portal
.
portal_catalog
.
getObject
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createReversalTransactionList.xml
View file @
65d39fde
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
cancellation_amount=False, date=None, plan=False, uids=
[], listbox_uid=[]
, selection_name=\'\', form_id=\'view\', **kw
</string>
</value>
<value>
<string>
cancellation_amount=False, date=None, plan=False, uids=
(), listbox_uid=()
, selection_name=\'\', form_id=\'view\', **kw
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAccountingLineReportReportSectionList.py
View file @
65d39fde
from
Products.ERP5Form.Report
import
ReportSection
from
Products.ERP5Form.Report
import
ReportSection
portal
=
context
.
getPortalObject
()
request
=
container
.
REQUEST
selection_columns
=
(
selection_columns
=
(
(
'title'
,
'Title'
,),
(
'title'
,
'Title'
,),
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAgedBalanceReportSectionList.py
View file @
65d39fde
from
Products.ERP5Type.Message
import
translateString
from
Products.ERP5Type.Message
import
translateString
from
Products.ERP5Form.Report
import
ReportSection
from
Products.ERP5Form.Report
import
ReportSection
portal
=
context
.
getPortalObject
()
request
=
container
.
REQUEST
request
=
container
.
REQUEST
section_category
=
request
[
'section_category'
]
section_category
=
request
[
'section_category'
]
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getJournalSectionLineList.py
View file @
65d39fde
...
@@ -111,7 +111,7 @@ for brain in portal.portal_simulation.getMovementHistoryList(
...
@@ -111,7 +111,7 @@ for brain in portal.portal_simulation.getMovementHistoryList(
debit
=
debit
,
debit
=
debit
,
credit
=
credit
,)
credit
=
credit
,)
analytic_info
=
{}
analytic_info
=
{}
for
analytic_column
,
analytic_column_title
in
analytic_column_list
:
for
analytic_column
,
analytic_column_title
in
analytic_column_list
:
# pylint: disable=unused-variable
if
analytic_column
==
'project'
:
if
analytic_column
==
'project'
:
analytic_info
[
'project'
]
=
brain
.
Movement_getProjectTitle
()
analytic_info
[
'project'
]
=
brain
.
Movement_getProjectTitle
()
elif
analytic_column
==
'funding'
:
elif
analytic_column
==
'funding'
:
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getJournalSectionLineList.xml
View file @
65d39fde
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
selection, at_date, from_date, portal_type, simulation_state, section_uid, payment_mode=None, payment=None, gap_root=None, group_by=None, analytic_column_list=
[]
, project_uid=None, ledger_uid=None, **kw
</string>
</value>
<value>
<string>
selection, at_date, from_date, portal_type, simulation_state, section_uid, payment_mode=None, payment=None, gap_root=None, group_by=None, analytic_column_list=
()
, project_uid=None, ledger_uid=None, **kw
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getJournalSectionStatList.py
View file @
65d39fde
from
Products.PythonScripts.standard
import
Object
from
Products.PythonScripts.standard
import
Object
request
=
container
.
REQUEST
request
=
container
.
REQUEST
portal
=
context
.
getPortalObject
()
return
[
Object
(
return
[
Object
(
debit
=
request
.
get
(
debit
=
request
.
get
(
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getSummaryAgedBalanceLineList.py
View file @
65d39fde
...
@@ -8,7 +8,7 @@ detail_line_list = portal\
...
@@ -8,7 +8,7 @@ detail_line_list = portal\
simulation_state
,
period_list
,
account_type
,
detail
=
False
,
**
kw
)
simulation_state
,
period_list
,
account_type
,
detail
=
False
,
**
kw
)
period_id_list
=
[
'period_future'
]
period_id_list
=
[
'period_future'
]
for
idx
,
period
in
enumerate
(
period_list
):
for
idx
,
_
in
enumerate
(
period_list
):
period_id_list
.
append
(
'period_%s'
%
idx
)
period_id_list
.
append
(
'period_%s'
%
idx
)
period_id_list
.
append
(
'period_%s'
%
(
idx
+
1
))
period_id_list
.
append
(
'period_%s'
%
(
idx
+
1
))
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getTransactionLineListForGroupingReference.py
View file @
65d39fde
...
@@ -2,8 +2,6 @@ from Products.ZSQLCatalog.SQLCatalog import Query, NegatedQuery, ComplexQuery
...
@@ -2,8 +2,6 @@ from Products.ZSQLCatalog.SQLCatalog import Query, NegatedQuery, ComplexQuery
request
=
container
.
REQUEST
request
=
container
.
REQUEST
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
ctool
=
portal
.
portal_catalog
stool
=
portal
.
portal_simulation
# we use a different selection for dialog params, because we never want this
# we use a different selection for dialog params, because we never want this
# selection to be reseteted
# selection to be reseteted
...
@@ -77,7 +75,7 @@ if debit_price:
...
@@ -77,7 +75,7 @@ if debit_price:
if
credit_price
:
if
credit_price
:
try
:
try
:
search_kw
[
'stock.total_price'
]
=
-
float
(
credit_price
[
'query'
])
search_kw
[
'stock.total_price'
]
=
-
float
(
credit_price
[
'query'
])
except
ValueError
,
e
:
except
ValueError
:
# happens when user entered a complex query (like "> 100 AND < 200")
# happens when user entered a complex query (like "> 100 AND < 200")
# in that case, there is not much we can do.
# in that case, there is not much we can do.
search_kw
[
'stock.total_price'
]
=
credit_price
[
'query'
]
search_kw
[
'stock.total_price'
]
=
credit_price
[
'query'
]
...
@@ -85,7 +83,7 @@ if date:
...
@@ -85,7 +83,7 @@ if date:
search_kw
[
'stock.date'
]
=
date
search_kw
[
'stock.date'
]
=
date
return
stool
.
getMovementHistoryList
(
return
portal
.
portal_simulation
.
getMovementHistoryList
(
section_uid
=
section_uid
,
section_uid
=
section_uid
,
simulation_state
=
[
'stopped'
,
'delivered'
],
simulation_state
=
[
'stopped'
,
'delivered'
],
sort_on
=
sort_on
,
sort_on
=
sort_on
,
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_setGroupingReference.py
View file @
65d39fde
"""Set grouping reference for selected lines.
"""Set grouping reference for selected lines.
Used as a fast input dialog action.
Used as a fast input dialog action.
"""
"""
from
ZTUtils
import
make_query
from
Products.CMFCore.WorkflowCore
import
WorkflowException
from
ZODB.POSException
import
ConflictError
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
getobject
=
portal
.
portal_catalog
.
getobject
getobject
=
portal
.
portal_catalog
.
getobject
stool
=
portal
.
portal_selections
Base_translateString
=
portal
.
Base_translateString
Base_translateString
=
portal
.
Base_translateString
psm
=
Base_translateString
(
'Nothing matches.'
)
psm
=
Base_translateString
(
'Nothing matches.'
)
request
=
container
.
REQUEST
request
=
container
.
REQUEST
precision
=
request
.
get
(
'precision'
,
2
)
# update selected uids
# update selected uids
stool
.
updateSelectionCheckedUidList
(
portal
.
portal_selections
.
updateSelectionCheckedUidList
(
list_selection_name
,
uids
=
uids
,
listbox_uid
=
listbox_uid
,
REQUEST
=
request
)
list_selection_name
,
uids
=
uids
,
listbox_uid
=
listbox_uid
,
REQUEST
=
request
)
uids
=
stool
.
getSelectionCheckedUidsFor
(
list_selection_name
)
uids
=
portal
.
portal_selections
.
getSelectionCheckedUidsFor
(
list_selection_name
)
# XXX when should it be validated ?
# XXX when should it be validated ?
if
node
==
''
:
if
node
==
''
:
...
@@ -59,7 +56,7 @@ if grouping == 'grouping':
...
@@ -59,7 +56,7 @@ if grouping == 'grouping':
mapping
=
dict
(
grouped_line_count
=
len
(
grouped_line_list
)))
mapping
=
dict
(
grouped_line_count
=
len
(
grouped_line_list
)))
# make sure nothing will be checked next time
# make sure nothing will be checked next time
stool
.
setSelectionCheckedUidsFor
(
list_selection_name
,
[])
portal
.
portal_selections
.
setSelectionCheckedUidsFor
(
list_selection_name
,
[])
# we check if we can mark some transaction as payed.
# we check if we can mark some transaction as payed.
transaction_list
=
{}
transaction_list
=
{}
...
@@ -103,9 +100,7 @@ if grouping == 'grouping':
...
@@ -103,9 +100,7 @@ if grouping == 'grouping':
try
:
try
:
portal
.
portal_workflow
.
doActionFor
(
transaction
,
'clear_action'
,
portal
.
portal_workflow
.
doActionFor
(
transaction
,
'clear_action'
,
payment_date
=
date
)
payment_date
=
date
)
except
ConflictError
:
except
WorkflowException
:
raise
except
:
# Workflow action not supported
# Workflow action not supported
pass
pass
...
@@ -124,7 +119,7 @@ else:
...
@@ -124,7 +119,7 @@ else:
mapping
=
dict
(
ungrouped_line_count
=
len
(
ungrouped_line_list
)))
mapping
=
dict
(
ungrouped_line_count
=
len
(
ungrouped_line_list
)))
# make sure nothing will be checked next time
# make sure nothing will be checked next time
stool
.
setSelectionCheckedUidsFor
(
list_selection_name
,
[])
portal
.
portal_selections
.
setSelectionCheckedUidsFor
(
list_selection_name
,
[])
request
.
set
(
'portal_status_message'
,
psm
)
request
.
set
(
'portal_status_message'
,
psm
)
return
context
.
AccountingTransactionModule_viewGroupingFastInputDialog
(
request
)
return
context
.
AccountingTransactionModule_viewGroupingFastInputDialog
(
request
)
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_setGroupingReference.xml
View file @
65d39fde
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
uids=
[], listbox=None, listbox_uid=[]
, list_selection_name=\'\', grouping=\'\', node=\'\', mirror_section=\'\', update=0, **kw
</string>
</value>
<value>
<string>
uids=
(), listbox=None, listbox_uid=()
, list_selection_name=\'\', grouping=\'\', node=\'\', mirror_section=\'\', update=0, **kw
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_updateGroupingReference.xml
View file @
65d39fde
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
uids=
[], listbox=None, listbox_uid=[]
, list_selection_name=\'\', node=\'\', mirror_section=\'\', cancel_url=\'\', **kw
</string>
</value>
<value>
<string>
uids=
(), listbox=None, listbox_uid=()
, list_selection_name=\'\', node=\'\', mirror_section=\'\', cancel_url=\'\', **kw
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_addAccountingTransactionLine.py
View file @
65d39fde
...
@@ -5,7 +5,7 @@ use.
...
@@ -5,7 +5,7 @@ use.
from
Products.ERP5Type.Message
import
translateString
from
Products.ERP5Type.Message
import
translateString
request
=
container
.
REQUEST
request
=
container
.
REQUEST
for
i
in
range
(
line_count
):
for
_
in
range
(
line_count
):
context
.
newContent
(
portal_type
=
line_portal_type
)
context
.
newContent
(
portal_type
=
line_portal_type
)
request
.
set
(
'portal_status_message'
,
request
.
set
(
'portal_status_message'
,
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getAccountingTransactionLineList.xml
View file @
65d39fde
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
portal_type=
[]
, **kw
</string>
</value>
<value>
<string>
portal_type=
()
, **kw
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_isDestinationCurrencyConvertible.py
View file @
65d39fde
...
@@ -3,12 +3,12 @@ section_value = context.getDestinationSectionValue()
...
@@ -3,12 +3,12 @@ section_value = context.getDestinationSectionValue()
if
section_value
is
None
or
\
if
section_value
is
None
or
\
section_value
.
getProperty
(
'price_currency'
,
None
)
is
None
:
section_value
.
getProperty
(
'price_currency'
,
None
)
is
None
:
# If no section defined, no way to convert currencies
# If no section defined, no way to convert currencies
return
0
return
False
transaction_currency
=
context
.
getResource
()
transaction_currency
=
context
.
getResource
()
if
transaction_currency
is
not
None
and
\
if
transaction_currency
is
not
None
and
\
transaction_currency
!=
section_value
.
getProperty
(
'price_currency'
,
None
):
transaction_currency
!=
section_value
.
getProperty
(
'price_currency'
,
None
):
return
1
return
True
for
line
in
context
.
getMovementList
(
for
line
in
context
.
getMovementList
(
portal_type
=
context
.
getPortalAccountingMovementTypeList
()):
portal_type
=
context
.
getPortalAccountingMovementTypeList
()):
...
@@ -16,6 +16,6 @@ for line in context.getMovementList(
...
@@ -16,6 +16,6 @@ for line in context.getMovementList(
line
.
getDestinationInventoriatedTotalAssetCredit
())
or
(
line
.
getDestinationInventoriatedTotalAssetCredit
())
or
(
line
.
getDestinationDebit
()
!=
line
.
getDestinationDebit
()
!=
line
.
getDestinationInventoriatedTotalAssetDebit
())):
line
.
getDestinationInventoriatedTotalAssetDebit
())):
return
1
return
True
return
0
return
False
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_isSourceCurrencyConvertible.py
View file @
65d39fde
...
@@ -3,12 +3,12 @@ section_value = context.getSourceSectionValue()
...
@@ -3,12 +3,12 @@ section_value = context.getSourceSectionValue()
if
section_value
is
None
or
\
if
section_value
is
None
or
\
section_value
.
getProperty
(
'price_currency'
,
None
)
is
None
:
section_value
.
getProperty
(
'price_currency'
,
None
)
is
None
:
# If no section defined, no way to convert currencies
# If no section defined, no way to convert currencies
return
0
return
False
transaction_currency
=
context
.
getResource
()
transaction_currency
=
context
.
getResource
()
if
transaction_currency
is
not
None
and
\
if
transaction_currency
is
not
None
and
\
transaction_currency
!=
section_value
.
getProperty
(
'price_currency'
,
None
):
transaction_currency
!=
section_value
.
getProperty
(
'price_currency'
,
None
):
return
1
return
True
for
line
in
context
.
getMovementList
(
for
line
in
context
.
getMovementList
(
portal_type
=
context
.
getPortalAccountingMovementTypeList
()):
portal_type
=
context
.
getPortalAccountingMovementTypeList
()):
...
@@ -16,6 +16,6 @@ for line in context.getMovementList(
...
@@ -16,6 +16,6 @@ for line in context.getMovementList(
line
.
getSourceInventoriatedTotalAssetCredit
())
or
(
line
.
getSourceInventoriatedTotalAssetCredit
())
or
(
line
.
getSourceDebit
()
!=
line
.
getSourceDebit
()
!=
line
.
getSourceInventoriatedTotalAssetDebit
())):
line
.
getSourceInventoriatedTotalAssetDebit
())):
return
1
return
True
return
0
return
False
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Base_importGapFile.py
View file @
65d39fde
...
@@ -38,13 +38,12 @@ def splitCsvLine(str_line):
...
@@ -38,13 +38,12 @@ def splitCsvLine(str_line):
return
clean_list
return
clean_list
def
getSubCategory
(
parent
,
id
):
def
getSubCategory
(
parent
,
category_
id
):
try
:
try
:
return
parent
[
id
]
return
parent
[
category_
id
]
except
KeyError
:
except
KeyError
:
return
parent
.
newContent
(
id
=
id
)
return
parent
.
newContent
(
id
=
category_
id
)
request
=
context
.
REQUEST
csv_file_line_list
=
import_file
.
readlines
()
csv_file_line_list
=
import_file
.
readlines
()
csv_line_list
=
[]
csv_line_list
=
[]
...
@@ -54,18 +53,16 @@ for csv_line in csv_file_line_list:
...
@@ -54,18 +53,16 @@ for csv_line in csv_file_line_list:
object_list
=
[]
object_list
=
[]
csv_property_list
=
splitCsvLine
(
csv_line_list
[
0
])
csv_property_list
=
splitCsvLine
(
csv_line_list
[
0
])
csv_title_list
=
splitCsvLine
(
csv_line_list
[
1
])
for
csv_line
in
csv_line_list
[
2
:]:
for
csv_line
in
csv_line_list
[
2
:]:
obje
ct
=
{}
property_di
ct
=
{}
csv_data_list
=
splitCsvLine
(
csv_line
)
csv_data_list
=
splitCsvLine
(
csv_line
)
data_n
=
0
data_n
=
0
for
property
in
csv_property_list
:
for
property
_
in
csv_property_list
:
object
[
property
]
=
csv_data_list
[
data_n
]
property_dict
[
property_
]
=
csv_data_list
[
data_n
]
data_n
+=
1
data_n
+=
1
object_list
.
append
(
obje
ct
)
object_list
.
append
(
property_di
ct
)
root
=
context
.
getPortalObject
().
portal_categories
root
=
context
.
getPortalObject
().
portal_categories
for
path
in
gap_root_path
.
split
(
'/'
):
for
path
in
gap_root_path
.
split
(
'/'
):
...
@@ -74,10 +71,10 @@ for path in gap_root_path.split('/'):
...
@@ -74,10 +71,10 @@ for path in gap_root_path.split('/'):
existing_path_list
=
recursiveDocumentList
(
root
)
existing_path_list
=
recursiveDocumentList
(
root
)
existing_path_list
.
remove
(
root
.
getPath
())
existing_path_list
.
remove
(
root
.
getPath
())
for
obje
ct
in
object_list
:
for
property_di
ct
in
object_list
:
description
=
obje
ct
.
get
(
'Description'
,
None
)
or
''
description
=
property_di
ct
.
get
(
'Description'
,
None
)
or
''
gap
=
obje
ct
.
get
(
'Gap'
,
None
)
or
''
gap
=
property_di
ct
.
get
(
'Gap'
,
None
)
or
''
title
=
obje
ct
.
get
(
'Title'
,
None
)
or
''
title
=
property_di
ct
.
get
(
'Title'
,
None
)
or
''
gap
=
str
(
gap
)
gap
=
str
(
gap
)
if
gap
:
if
gap
:
gap
=
gap
.
replace
(
'CLASSE '
,
''
)
gap
=
gap
.
replace
(
'CLASSE '
,
''
)
...
@@ -95,11 +92,11 @@ for object in object_list:
...
@@ -95,11 +92,11 @@ for object in object_list:
existing_path_list
.
sort
(
key
=
len
,
reverse
=
True
)
existing_path_list
.
sort
(
key
=
len
,
reverse
=
True
)
for
path
in
existing_path_list
:
for
path
in
existing_path_list
:
objec
t
=
context
.
restrictedTraverse
(
path
)
documen
t
=
context
.
restrictedTraverse
(
path
)
description
=
objec
t
.
getDescription
()
or
''
description
=
documen
t
.
getDescription
()
or
''
gap
=
objec
t
.
getId
()
or
''
gap
=
documen
t
.
getId
()
or
''
title
=
objec
t
.
getTitle
()
or
''
title
=
documen
t
.
getTitle
()
or
''
print
'- %s - %s - %s'
%
(
gap
or
''
,
title
or
''
,
description
or
''
)
print
'- %s - %s - %s'
%
(
gap
or
''
,
title
or
''
,
description
or
''
)
object
.
getParentValue
().
deleteContent
(
objec
t
.
getId
())
document
.
getParentValue
().
deleteContent
(
documen
t
.
getId
())
return
printed
return
printed
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/InternalInvoiceTransaction_getAuthenticatedUserSection.py
View file @
65d39fde
...
@@ -11,8 +11,6 @@ if person is None:
...
@@ -11,8 +11,6 @@ if person is None:
from
DateTime
import
DateTime
from
DateTime
import
DateTime
now
=
DateTime
()
now
=
DateTime
()
destination_group
=
section_group
=
None
assigned_group_set
=
set
()
# groups on which the user is assigned
assigned_group_set
=
set
()
# groups on which the user is assigned
for
assignment
in
person
.
contentValues
(
portal_type
=
'Assignment'
):
for
assignment
in
person
.
contentValues
(
portal_type
=
'Assignment'
):
if
assignment
.
getGroup
()
\
if
assignment
.
getGroup
()
\
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_createRelatedPaymentTransaction.py
View file @
65d39fde
...
@@ -10,7 +10,6 @@ Base_translateString = context.Base_translateString
...
@@ -10,7 +10,6 @@ Base_translateString = context.Base_translateString
if
date
is
None
:
if
date
is
None
:
date
=
DateTime
()
date
=
DateTime
()
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
payment_dict
=
{}
is_source
=
context
.
AccountingTransaction_isSourceView
()
is_source
=
context
.
AccountingTransaction_isSourceView
()
line_portal_type
=
'Accounting Transaction Line'
line_portal_type
=
'Accounting Transaction Line'
...
@@ -58,12 +57,10 @@ related_payment = portal.accounting_module.newContent(
...
@@ -58,12 +57,10 @@ related_payment = portal.accounting_module.newContent(
if
is_source
:
if
is_source
:
related_payment
.
edit
(
destination_payment
=
context
.
getDestinationPayment
(),
related_payment
.
edit
(
destination_payment
=
context
.
getDestinationPayment
(),
source_payment
=
payment
)
source_payment
=
payment
)
section
=
context
.
getSourceSection
()
mirror_section
=
context
.
getDestinationSection
()
mirror_section
=
context
.
getDestinationSection
()
else
:
else
:
related_payment
.
edit
(
destination_payment
=
payment
,
related_payment
.
edit
(
destination_payment
=
payment
,
source_payment
=
context
.
getSourcePayment
())
source_payment
=
context
.
getSourcePayment
())
section
=
context
.
getDestinationSection
()
mirror_section
=
context
.
getSourceSection
()
mirror_section
=
context
.
getSourceSection
()
bank
=
related_payment
.
newContent
(
bank
=
related_payment
.
newContent
(
...
@@ -77,30 +74,29 @@ for (line_node, line_mirror_section), quantity in\
...
@@ -77,30 +74,29 @@ for (line_node, line_mirror_section), quantity in\
if
line_mirror_section
==
mirror_section
:
if
line_mirror_section
==
mirror_section
:
bank_quantity
+=
quantity
bank_quantity
+=
quantity
if
is_source
:
if
is_source
:
line
=
related_payment
.
newContent
(
related_payment
.
newContent
(
portal_type
=
line_portal_type
,
portal_type
=
line_portal_type
,
source
=
line_node
,
source
=
line_node
,
quantity
=
quantity
)
quantity
=
quantity
)
else
:
else
:
line
=
related_payment
.
newContent
(
related_payment
.
newContent
(
portal_type
=
line_portal_type
,
portal_type
=
line_portal_type
,
destination
=
line_node
,
destination
=
line_node
,
quantity
=-
quantity
)
quantity
=-
quantity
)
if
is_source
:
if
is_source
:
bank
.
edit
(
source
=
node
,
bank
.
setSource
(
node
)
quantity
=-
bank_quantity
)
bank
.
setQuantity
(
-
bank_quantity
)
else
:
else
:
bank
.
edit
(
destination
=
node
,
bank
.
setDestination
(
node
)
quantity
=
bank_quantity
)
bank
.
setQuantity
(
bank_quantity
)
if
plan
:
if
plan
:
related_payment
.
plan
()
related_payment
.
plan
()
if
not
batch_mode
:
if
not
batch_mode
:
return
context
.
REQUEST
.
RESPONSE
.
redirect
(
return
related_payment
.
Base_redirect
(
"%s/view?portal_status_message=%s"
%
(
'view'
,
related_payment
.
absolute_url
(),
keep_items
=
{
'portal_status_message'
:
Base_translateString
(
'Related payment created.'
)})
Base_translateString
(
'Related payment created.'
)))
else
:
return
related_payment
return
related_payment
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_getRemainingTotalPayablePrice.py
View file @
65d39fde
...
@@ -71,7 +71,6 @@ for is_source, line in getIsSourceMovementItemList(context):
...
@@ -71,7 +71,6 @@ for is_source, line in getIsSourceMovementItemList(context):
if
is_source
:
if
is_source
:
node_value
=
line
.
getSourceValue
(
portal_type
=
'Account'
)
node_value
=
line
.
getSourceValue
(
portal_type
=
'Account'
)
line_section
=
line
.
getSourceSection
()
mirror_section
=
line
.
getDestinationSection
()
mirror_section
=
line
.
getDestinationSection
()
if
quantity
:
if
quantity
:
amount
=
-
line
.
getQuantity
()
amount
=
-
line
.
getQuantity
()
...
@@ -79,7 +78,6 @@ for is_source, line in getIsSourceMovementItemList(context):
...
@@ -79,7 +78,6 @@ for is_source, line in getIsSourceMovementItemList(context):
amount
=
line
.
getSourceInventoriatedTotalAssetPrice
()
or
0
amount
=
line
.
getSourceInventoriatedTotalAssetPrice
()
or
0
else
:
else
:
node_value
=
line
.
getDestinationValue
(
portal_type
=
'Account'
)
node_value
=
line
.
getDestinationValue
(
portal_type
=
'Account'
)
line_section
=
line
.
getDestinationSection
()
mirror_section
=
line
.
getSourceSection
()
mirror_section
=
line
.
getSourceSection
()
if
quantity
:
if
quantity
:
amount
=
line
.
getQuantity
()
amount
=
line
.
getQuantity
()
...
@@ -151,7 +149,6 @@ for related_transaction in related_transaction_list:
...
@@ -151,7 +149,6 @@ for related_transaction in related_transaction_list:
if
related_transaction_is_source
:
if
related_transaction_is_source
:
node_value
=
line
.
getSourceValue
(
portal_type
=
'Account'
)
node_value
=
line
.
getSourceValue
(
portal_type
=
'Account'
)
line_section
=
line
.
getSourceSection
()
mirror_section
=
line
.
getDestinationSection
()
mirror_section
=
line
.
getDestinationSection
()
if
quantity
:
if
quantity
:
amount
=
-
line
.
getQuantity
()
amount
=
-
line
.
getQuantity
()
...
@@ -160,7 +157,6 @@ for related_transaction in related_transaction_list:
...
@@ -160,7 +157,6 @@ for related_transaction in related_transaction_list:
date
=
line
.
getStartDate
().
earliestTime
()
date
=
line
.
getStartDate
().
earliestTime
()
else
:
else
:
node_value
=
line
.
getDestinationValue
(
portal_type
=
'Account'
)
node_value
=
line
.
getDestinationValue
(
portal_type
=
'Account'
)
line_section
=
line
.
getDestinationSection
()
mirror_section
=
line
.
getSourceSection
()
mirror_section
=
line
.
getSourceSection
()
if
quantity
:
if
quantity
:
amount
=
line
.
getQuantity
()
amount
=
line
.
getQuantity
()
...
@@ -185,7 +181,7 @@ if detailed:
...
@@ -185,7 +181,7 @@ if detailed:
else
:
else
:
if
mirror_section_relative_url
:
if
mirror_section_relative_url
:
total_amount
=
0
total_amount
=
0
for
(
node
,
mirror_section
),
amount
in
total_payable_price_per_node_section
.
items
():
for
(
node
,
mirror_section
),
amount
in
total_payable_price_per_node_section
.
items
():
# pylint: disable=unused-variable
if
mirror_section
==
mirror_section_relative_url
:
if
mirror_section
==
mirror_section_relative_url
:
total_amount
+=
amount
total_amount
+=
amount
return
total_amount
return
total_amount
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getExplanationTitleAndAnalytics.py
View file @
65d39fde
...
@@ -10,7 +10,7 @@ else:
...
@@ -10,7 +10,7 @@ else:
analytic_property_list
=
[
explanation
.
getReference
()]
analytic_property_list
=
[
explanation
.
getReference
()]
for
property_name
,
property_title
in
request
[
'analytic_column_list'
]:
for
property_name
,
property_title
in
request
[
'analytic_column_list'
]:
#pylint: disable=unused-variable
# XXX it would be a little better to reuse editable field
# XXX it would be a little better to reuse editable field
if
property_name
==
'project'
:
if
property_name
==
'project'
:
analytic_property_list
.
append
(
brain
.
Movement_getProjectTitle
())
analytic_property_list
.
append
(
brain
.
Movement_getProjectTitle
())
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.xml
View file @
65d39fde
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
selection=None, sort_on=
[]
, node_category=None, node_category_strict_membership=None, mirror_section_category=None, from_date=None, selection_name=None, src__=0, **kw
</string>
</value>
<value>
<string>
selection=None, sort_on=
()
, node_category=None, node_category_strict_membership=None, mirror_section_category=None, from_date=None, selection_name=None, src__=0, **kw
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_statAccountingBalance.py
View file @
65d39fde
from
Products.ZSQLCatalog.SQLCatalog
import
Query
,
SimpleQuery
,
ComplexQuery
from
Products.ZSQLCatalog.SQLCatalog
import
Query
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
params
=
portal
.
ERP5Site_getAccountingSelectionParameterDict
(
selection_name
=
selection_name
)
params
=
portal
.
ERP5Site_getAccountingSelectionParameterDict
(
selection_name
=
selection_name
)
...
...
bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/scripts/checkDates.py
View file @
65d39fde
...
@@ -2,7 +2,6 @@ from Products.DCWorkflow.DCWorkflow import ValidationFailed
...
@@ -2,7 +2,6 @@ from Products.DCWorkflow.DCWorkflow import ValidationFailed
from
Products.ERP5Type.Message
import
translateString
from
Products.ERP5Type.Message
import
translateString
closing_period
=
state_change
[
'object'
]
closing_period
=
state_change
[
'object'
]
portal
=
closing_period
.
getPortalObject
()
valid_state_list
=
[
'started'
,
'stopped'
,
'delivered'
]
valid_state_list
=
[
'started'
,
'stopped'
,
'delivered'
]
closing_period
.
Base_checkConsistency
()
closing_period
.
Base_checkConsistency
()
...
...
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