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
33807656
Commit
33807656
authored
Feb 09, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
budget: py3
parent
2b8481c1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
+8
-7
bt5/erp5_budget/DocumentTemplateItem/portal_components/document.erp5.CategoryBudgetVariation.py
...ortal_components/document.erp5.CategoryBudgetVariation.py
+1
-1
bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/BudgetLine_getConsumptionSign.py
...portal_skins/erp5_budget/BudgetLine_getConsumptionSign.py
+1
-1
bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/Budget_getBudgetConsumptionReportData.py
...kins/erp5_budget/Budget_getBudgetConsumptionReportData.py
+6
-5
No files found.
bt5/erp5_budget/DocumentTemplateItem/portal_components/document.erp5.CategoryBudgetVariation.py
View file @
33807656
...
...
@@ -207,7 +207,7 @@ class CategoryBudgetVariation(BudgetVariation):
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getBudgetVariationRangeCategoryList'
)
def
getBudgetVariationRangeCategoryList
(
self
,
contex
t
):
def
getBudgetVariationRangeCategoryList
(
self
,
budge
t
):
"""Returns the Variation Range Category List that can be applied to this
budget.
"""
...
...
bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/BudgetLine_getConsumptionSign.py
View file @
33807656
editable_property_list
=
zip
(
*
context
.
BudgetLine_getEditablePropertyList
(
))[
0
]
editable_property_list
=
list
(
zip
(
*
context
.
BudgetLine_getEditablePropertyList
()
))[
0
]
if
'destination_credit'
in
editable_property_list
:
return
-
1
...
...
bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/Budget_getBudgetConsumptionReportData.py
View file @
33807656
import
six
from
pprint
import
pformat
portal
=
context
.
getPortalObject
()
request
=
portal
.
REQUEST
...
...
@@ -89,7 +90,7 @@ for budget in budget_list:
conversion_ratio
=
1
line_list
.
append
(
dict
(
is_budget
=
True
,
title
=
budget
.
getTitle
().
decode
(
'utf8'
),
title
=
six
.
text_type
(
budget
.
getTitle
()
),
target_currency_title
=
target_currency_title
,
conversion_ratio
=
conversion_ratio
,
resource_title
=
budget
.
getResource
()
and
...
...
@@ -149,9 +150,9 @@ for budget in budget_list:
# we use BudgetLine_asCellRange to get cell names, and have a default value
# for "virtual level 2"
title
=
budget_line
.
getTitle
().
decode
(
'utf8'
)
title
=
six
.
text_type
(
budget_line
.
getTitle
()
)
cell_name_dict
=
{
budget_line
.
getResource
(
base
=
1
):
budget_line
.
getTitle
().
decode
(
'utf8'
)}
six
.
text_type
(
budget_line
.
getTitle
()
)}
cell_style_dict
=
{
budget_line
.
getResource
(
base
=
1
):
'Level2'
}
cell_depth_dict
=
{
budget_line
.
getResource
(
base
=
1
):
0
}
...
...
@@ -168,7 +169,7 @@ for budget in budget_list:
for
cell_range_list
in
budget_line_as_cell_range_matrixbox
:
for
category
,
title
in
cell_range_list
:
cell_name_dict
[
category
]
=
title
.
decode
(
'utf8'
).
replace
(
u'
\
xA0
'
,
''
)
cell_name_dict
[
category
]
=
six
.
text_type
(
title
).
replace
(
u'
\
xA0
'
,
''
)
if
category
in
level_2_variation_category_list
:
depth
=
-
min_depth
+
(
title
.
count
(
'
\
xA0
'
)
/
4
)
or
title
.
count
(
'/'
)
cell_depth_dict
[
category
]
=
depth
...
...
@@ -323,7 +324,7 @@ for budget in budget_list:
if
total_level_1_current_budget
:
consumed_ratio
=
total_level_1_consumed_budget
/
total_level_1_current_budget
line_list
.
append
(
dict
(
is_level_1
=
True
,
title
=
budget_line
.
getTitle
().
decode
(
'utf8'
),
title
=
six
.
text_type
(
budget_line
.
getTitle
()
),
initial_budget
=
total_level_1_initial_budget
,
current_budget
=
total_level_1_current_budget
,
engaged_budget
=
total_level_1_engaged_budget
,
...
...
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