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
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Lu Xu
erp5
Commits
bdc4326e
Commit
bdc4326e
authored
Jun 23, 2017
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accounting: translate GAP category in account view
parent
d6665300
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getGapItemList.py
...em/portal_skins/erp5_accounting/Account_getGapItemList.py
+11
-5
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_hashGapItemList.py
...m/portal_skins/erp5_accounting/Account_hashGapItemList.py
+2
-2
No files found.
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getGapItemList.py
View file @
bdc4326e
...
@@ -12,8 +12,9 @@ def display(x):
...
@@ -12,8 +12,9 @@ def display(x):
if
x
not
in
display_cache
:
if
x
not
in
display_cache
:
gap_id
=
x
.
getReference
()
gap_id
=
x
.
getReference
()
if
gap_id
:
if
gap_id
:
display_cache
[
x
]
=
'%s - %s'
%
(
gap_id
,
display_cache
[
x
]
=
'%s - %s'
%
(
x
.
getShortTitle
()
or
x
.
getTitle
())
gap_id
,
x
.
getTranslatedShortTitle
()
or
x
.
getTranslatedTitle
())
else
:
else
:
display_cache
[
x
]
=
x
.
getIndentedTitle
()
display_cache
[
x
]
=
x
.
getIndentedTitle
()
...
@@ -36,6 +37,11 @@ def getGapItemList(only_preferred_gap, gap_root=None):
...
@@ -36,6 +37,11 @@ def getGapItemList(only_preferred_gap, gap_root=None):
return
result
return
result
from
Products.ERP5Type.Cache
import
CachingMethod
from
Products.ERP5Type.Cache
import
CachingMethod
getGapItemList
=
CachingMethod
(
getGapItemList
,
id
=
'Account_getGapItemList'
,
cache_factory
=
'erp5_content_long'
)
getGapItemList
=
CachingMethod
(
return
getGapItemList
(
only_preferred_gap
=
only_preferred_gap
,
getGapItemList
,
id
=
'Account_getGapItemList.%s'
%
portal
.
Localizer
.
get_selected_language
(),
cache_factory
=
'erp5_content_long'
)
return
getGapItemList
(
only_preferred_gap
=
only_preferred_gap
,
gap_root
=
portal
.
portal_preferences
.
getPreferredAccountingTransactionGap
())
gap_root
=
portal
.
portal_preferences
.
getPreferredAccountingTransactionGap
())
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_hashGapItemList.py
View file @
bdc4326e
...
@@ -21,7 +21,7 @@ def getSubFieldDict():
...
@@ -21,7 +21,7 @@ def getSubFieldDict():
sub_field_property_dict
[
'key'
]
=
item_key
sub_field_property_dict
[
'key'
]
=
item_key
sub_field_property_dict
[
'title'
]
=
Base_translateString
(
"GAP - ${gap_title}"
,
mapping
=
dict
(
sub_field_property_dict
[
'title'
]
=
Base_translateString
(
"GAP - ${gap_title}"
,
mapping
=
dict
(
gap_title
=
context
.
portal_categories
.
resolveCategory
(
gap_title
=
context
.
portal_categories
.
resolveCategory
(
'gap/%s'
%
item_key
).
getTitle
()))
'gap/%s'
%
item_key
).
getT
ranslatedT
itle
()))
sub_field_property_dict
[
'required'
]
=
0
sub_field_property_dict
[
'required'
]
=
0
sub_field_property_dict
[
'field_type'
]
=
'ListField'
sub_field_property_dict
[
'field_type'
]
=
'ListField'
sub_field_property_dict
[
'size'
]
=
1
sub_field_property_dict
[
'size'
]
=
1
...
...
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