Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cgscop_cotisation_cg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Le Filament
Confédération Générale des SCOP
cgscop_cotisation_cg
Commits
90e9c66a
Commit
90e9c66a
authored
3 years ago
by
Benjamin - Le Filament
Browse files
Options
Downloads
Patches
Plain Diff
[fix] export CG empty values
parent
85d3b56e
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
controllers/main.py
+5
-3
5 additions, 3 deletions
controllers/main.py
wizard/export_journal_wizard.py
+12
-5
12 additions, 5 deletions
wizard/export_journal_wizard.py
with
17 additions
and
8 deletions
controllers/main.py
+
5
−
3
View file @
90e9c66a
...
@@ -19,8 +19,10 @@ class ExportJournalCg(http.Controller):
...
@@ -19,8 +19,10 @@ class ExportJournalCg(http.Controller):
@http.route
(
'
/web/export_journal_cg/
'
,
type
=
'
http
'
,
auth
=
"
user
"
)
@http.route
(
'
/web/export_journal_cg/
'
,
type
=
'
http
'
,
auth
=
"
user
"
)
@serialize_exception
@serialize_exception
def
export_journal_cg
(
def
export_journal_cg
(
self
,
date_start
,
date_end
,
date_creation_start
,
date_creation_end
,
self
,
company_id
,
company_id
,
partner_ids
,
**
kwargs
):
date_start
=
False
,
date_end
=
False
,
date_creation_start
=
False
,
date_creation_end
=
False
,
partner_ids
=
False
,
**
kwargs
):
"""
"""
Sélectionne les account.move.line correspondants aux journaux
Sélectionne les account.move.line correspondants aux journaux
et à la plage de date définis
et à la plage de date définis
...
@@ -48,7 +50,7 @@ class ExportJournalCg(http.Controller):
...
@@ -48,7 +50,7 @@ class ExportJournalCg(http.Controller):
(
'
date
'
,
'
>=
'
,
date_start
),
(
'
date
'
,
'
>=
'
,
date_start
),
(
'
date
'
,
'
<=
'
,
date_end
),
(
'
date
'
,
'
<=
'
,
date_end
),
]
]
if
date_start
and
date_end
:
if
date_
creation_
start
and
date_
creation_
end
:
domain
+=
[
domain
+=
[
(
'
create_date
'
,
'
>=
'
,
date_creation_start
),
(
'
create_date
'
,
'
>=
'
,
date_creation_start
),
(
'
create_date
'
,
'
<=
'
,
date_creation_end
),
(
'
create_date
'
,
'
<=
'
,
date_creation_end
),
...
...
This diff is collapsed.
Click to expand it.
wizard/export_journal_wizard.py
+
12
−
5
View file @
90e9c66a
...
@@ -48,13 +48,20 @@ class ExportJournalWizard(models.TransientModel):
...
@@ -48,13 +48,20 @@ class ExportJournalWizard(models.TransientModel):
"""
"""
datas
=
{
datas
=
{
'
export_type
'
:
self
.
export_type
,
'
export_type
'
:
self
.
export_type
,
'
date_start
'
:
self
.
date_start
,
'
date_end
'
:
self
.
date_end
,
'
date_creation_start
'
:
self
.
date_creation_start
,
'
date_creation_end
'
:
self
.
date_creation_end
,
'
company_id
'
:
self
.
company_id
.
id
,
'
company_id
'
:
self
.
company_id
.
id
,
'
partner_ids
'
:
'
,
'
.
join
(
str
(
x
)
for
x
in
self
.
partner_ids
.
ids
),
}
}
if
self
.
date_start
and
self
.
date_end
:
datas
.
update
({
'
date_start
'
:
self
.
date_start
,
'
date_end
'
:
self
.
date_end
,
})
if
self
.
date_creation_start
and
self
.
date_creation_end
:
datas
.
update
({
'
date_creation_start
'
:
self
.
date_start
,
'
date_creation_end
'
:
self
.
date_end
,
})
if
self
.
partner_ids
:
datas
[
'
partner_ids
'
]
=
'
,
'
.
join
(
str
(
x
)
for
x
in
self
.
partner_ids
.
ids
)
return
{
return
{
'
type
'
:
'
ir.actions.act_url
'
,
'
type
'
:
'
ir.actions.act_url
'
,
'
url
'
:
'
/web/export_journal_cg?
'
+
urlencode
(
datas
),
'
url
'
:
'
/web/export_journal_cg?
'
+
urlencode
(
datas
),
...
...
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