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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Georgios Dagkakis
erp5
Commits
5719e3e2
Commit
5719e3e2
authored
Mar 05, 2013
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use set instead of dict with dummy values
parent
46bffb9f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
17 deletions
+17
-17
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getListBoxColumnList.xml
...accounting/AccountingTransaction_getListBoxColumnList.xml
+16
-16
bt5/erp5_accounting/bt/revision
bt5/erp5_accounting/bt/revision
+1
-1
No files found.
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getListBoxColumnList.xml
View file @
5719e3e2
...
...
@@ -56,23 +56,23 @@
\n
If there is more than one mirror_section on lines, the listbox will have an\n
extra column showing mirror_section_title.\n
The same for apply for
payment / payment_reference
.\n
The same for apply for
most line categories
.\n
"""\n
section_
dict = {None: 1}
\n
payment_
dict = {None: 1}
\n
payment_request_
dict = {None: 1}
\n
resource_
dict = {context.getResource(): 1}
\n
section_
set = set((None,))
\n
payment_
set = set((None,))
\n
payment_request_
set = set((None,))
\n
resource_
set = set((context.getResource(),))
\n
\n
for line in context.getMovementList():\n
resource_
dict[line.getResource()] = 1
\n
resource_
set.add(line.getResource())
\n
if source:\n
section_
dict[line.getDestinationSection()] = 1
\n
payment_
dict[line.getSourcePayment()] = 1
\n
payment_request_
dict[line.getSourcePaymentRequest()] = 1
\n
section_
set.add(line.getDestinationSection())
\n
payment_
set.add(line.getSourcePayment())
\n
payment_request_
set.add(line.getSourcePaymentRequest())
\n
else:\n
section_
dict[line.getSourceSection()] = 1
\n
payment_
dict[line.getDestinationPayment()] = 1
\n
payment_request_
dict[line.getDestinationPaymentRequest()] = 1
\n
section_
set.add(line.getSourceSection())
\n
payment_
set.add(line.getDestinationPayment())
\n
payment_request_
set.add(line.getDestinationPaymentRequest())
\n
\n
if context.getSourcePayment() or context.getDestinationSection():\n
min_payment_count = 2\n
...
...
@@ -86,8 +86,8 @@ else:\n
# a line, we have to show the column\n
min_section_count = 1\n
\n
multiple_sections = len(section_
dic
t) >
min_section_count\n
multiple_payment = len(payment_
dic
t) > min_payment_count\n
multiple_sections = len(section_
se
t) >
min_section_count\n
multiple_payment = len(payment_
se
t) > min_payment_count\n
\n
column_item_list = [(\'translated_id\', \'ID\')]\n
a = column_item_list.append\n
...
...
@@ -113,10 +113,10 @@ if multiple_payment:\n
a((\'getDestinationPaymentTitle\', \'Bank Account\'))\n
else:\n
a((\'getDestinationPaymentReference\', \'Bank Account\'))\n
if len(resource_
dic
t) > 1:\n
if len(resource_
se
t) > 1:\n
a((\'getResourceReference\', \'Currency\'))\n
\n
if len(payment_request_
dic
t) > 1:\n
if len(payment_request_
se
t) > 1:\n
if source:\n
a((\'getSourcePaymentRequestTitle\', \'Payment Request\'))\n
else:\n
...
...
bt5/erp5_accounting/bt/revision
View file @
5719e3e2
1521
\ No newline at end of file
1522
\ No newline at end of file
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