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
208d0d6f
Commit
208d0d6f
authored
May 30, 2016
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accounting: when grouping, ignore mirror accounts when mirror section has no group
parent
1ab4fc47
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_guessGroupedLines.py
...rp5_accounting/AccountingTransaction_guessGroupedLines.py
+16
-2
No files found.
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_guessGroupedLines.py
View file @
208d0d6f
...
...
@@ -43,11 +43,21 @@ for line in accounting_transaction_line_value_list:
source_section
=
\
source_section
.
Organisation_getMappingRelatedOrganisation
()
section_relative_url
=
source_section
.
getRelativeUrl
()
# For compatibility, we do not want to prevent grouping existing sales/purchase
# invoices where mirror account exists, but we do not keep accounting for the
# mirror section. If the mirror section does not have a group, we ignore the
# mirror account.
mirror_account
=
''
destination_section
=
line
.
getDestinationSectionValue
(
portal_type
=
'Organisation'
)
if
destination_section
is
not
None
and
destination_section
.
hasGroup
():
mirror_account
=
line
.
getDestination
(
portal_type
=
'Account'
)
lines_per_node
.
setdefault
(
(
line
.
getSource
(
portal_type
=
'Account'
),
section_relative_url
,
line
.
getDestinationSection
(),
line
.
getDestination
(
portal_type
=
'Account'
)
,
mirror_account
,
line
.
AccountingTransactionLine_getGroupingExtraParameterList
(
source
=
True
),
),
[]).
append
(
dict
(
total_price
=
line
.
getSourceInventoriatedTotalAssetPrice
()
or
0
,
...
...
@@ -61,11 +71,15 @@ for line in accounting_transaction_line_value_list:
destination_section
=
\
destination_section
.
Organisation_getMappingRelatedOrganisation
()
section_relative_url
=
destination_section
.
getRelativeUrl
()
mirror_account
=
''
source_section
=
line
.
getSourceSectionValue
(
portal_type
=
'Organisation'
)
if
source_section
is
not
None
and
source_section
.
hasGroup
():
mirror_account
=
line
.
getSource
(
portal_type
=
'Account'
)
lines_per_node
.
setdefault
(
(
line
.
getDestination
(
portal_type
=
'Account'
),
section_relative_url
,
line
.
getSourceSection
(),
line
.
getSource
(
portal_type
=
'Account'
)
,
mirror_account
,
line
.
AccountingTransactionLine_getGroupingExtraParameterList
(
source
=
False
),
),
[]).
append
(
dict
(
total_price
=
line
.
getDestinationInventoriatedTotalAssetPrice
()
or
0
,
...
...
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