Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Coopdevs OCB mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coopdevs
Odoo
Coopdevs OCB mirror
Commits
0ef54895
Commit
0ef54895
authored
4 years ago
by
Xavier Morel
Browse files
Options
Downloads
Patches
Plain Diff
[IMP] l10n_fr_fec: fix report
parent
c8294e19
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
addons/l10n_fr_fec/wizard/account_fr_fec.py
+5
-3
5 additions, 3 deletions
addons/l10n_fr_fec/wizard/account_fr_fec.py
with
5 additions
and
3 deletions
addons/l10n_fr_fec/wizard/account_fr_fec.py
+
5
−
3
View file @
0ef54895
...
...
@@ -7,7 +7,7 @@ import base64
import
io
from
odoo
import
api
,
fields
,
models
,
_
from
odoo.exceptions
import
Warning
from
odoo.exceptions
import
Warning
,
AccessDenied
from
odoo.tools
import
float_is_zero
,
pycompat
from
odoo.tools.misc
import
get_lang
...
...
@@ -25,7 +25,7 @@ class AccountFrFec(models.TransientModel):
(
'
nonofficial
'
,
'
Non-official FEC report (posted and unposted entries)
'
),
],
string
=
'
Export Type
'
,
required
=
True
,
default
=
'
official
'
)
def
do_query_unaffected_earnings
(
self
):
def
_
do_query_unaffected_earnings
(
self
):
'''
Compute the sum of ending balances for all accounts that are of a type that does not bring forward the balance in new fiscal years.
This is needed because we have to display only one line for the initial balance of all expense/revenue accounts in the FEC.
'''
...
...
@@ -100,6 +100,8 @@ class AccountFrFec(models.TransientModel):
def
generate_fec
(
self
):
self
.
ensure_one
()
if
not
(
self
.
env
.
is_admin
()
or
self
.
env
.
user
.
has_group
(
'
account.group_account_user
'
)):
raise
AccessDenied
()
# We choose to implement the flat file instead of the XML
# file for 2 reasons :
# 1) the XSD file impose to have the label on the account.move
...
...
@@ -138,7 +140,7 @@ class AccountFrFec(models.TransientModel):
unaffected_earnings_line
=
True
# used to make sure that we add the unaffected earning initial balance only once
if
unaffected_earnings_xml_ref
:
#compute the benefit/loss of last year to add in the initial balance of the current year earnings account
unaffected_earnings_results
=
self
.
do_query_unaffected_earnings
()
unaffected_earnings_results
=
self
.
_
do_query_unaffected_earnings
()
unaffected_earnings_line
=
False
sql_query
=
'''
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment