Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Accounting Periods
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
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
XCG
Odoo modules
Accounting Periods
Commits
372f5e3c56e6
Commit
372f5e3c56e6
authored
2 years ago
by
Houzefa Abbasbhay
Browse files
Options
Downloads
Patches
Plain Diff
More lenient tests
in case other modules also install companies.
parent
60eb2a0dd3e1
No related branches found
No related tags found
1 merge request
!19
Topic/15.0/tests 15
Pipeline
#35345
passed
2 years ago
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
NEWS.rst
+1
-0
1 addition, 0 deletions
NEWS.rst
models/account_chart_template.py
+1
-3
1 addition, 3 deletions
models/account_chart_template.py
tests/test_account_period.py
+3
-1
3 additions, 1 deletion
tests/test_account_period.py
with
5 additions
and
4 deletions
NEWS.rst
+
1
−
0
View file @
372f5e3c
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
----------
----------
* Don't rebuild existing fiscal years.
* Don't rebuild existing fiscal years.
* More lenient tests in case other modules also install companies.
15.0.1.0.1
15.0.1.0.1
----------
----------
...
...
This diff is collapsed.
Click to expand it.
models/account_chart_template.py
+
1
−
3
View file @
372f5e3c
...
@@ -52,9 +52,7 @@
...
@@ -52,9 +52,7 @@
)
)
year_str
=
str
(
end_date
.
year
)
year_str
=
str
(
end_date
.
year
)
if
self
.
env
[
"
account.fiscalyear
"
].
search
(
if
self
.
env
[
"
account.fiscalyear
"
].
search
([(
"
code
"
,
"
=
"
,
year_str
)],
limit
=
1
):
[(
"
code
"
,
"
=
"
,
year_str
)],
limit
=
1
):
return
# Fiscal year already exists in this company.
return
# Fiscal year already exists in this company.
self
.
env
[
"
account.fiscalyear
"
].
create
(
self
.
env
[
"
account.fiscalyear
"
].
create
(
...
...
This diff is collapsed.
Click to expand it.
tests/test_account_period.py
+
3
−
1
View file @
372f5e3c
...
@@ -201,5 +201,6 @@
...
@@ -201,5 +201,6 @@
def
test_name_search
(
self
):
def
test_name_search
(
self
):
"""
Test name_search
"""
"""
Test name_search
"""
# Check this specific case without any domains.
results
=
self
.
env
[
"
account.period
"
].
name_search
()
results
=
self
.
env
[
"
account.period
"
].
name_search
()
# 12 periods for 2017, and the current year are created in demo data
# 12 periods for 2017, and the current year are created in demo data
...
@@ -204,3 +205,4 @@
...
@@ -204,3 +205,4 @@
results
=
self
.
env
[
"
account.period
"
].
name_search
()
results
=
self
.
env
[
"
account.period
"
].
name_search
()
# 12 periods for 2017, and the current year are created in demo data
# 12 periods for 2017, and the current year are created in demo data
self
.
assertEqual
(
len
(
results
),
24
)
# greater-equal as we may also have other companies from other modules.
self
.
assertGreaterEqual
(
len
(
results
),
24
)
This diff is collapsed.
Click to expand it.
Houzefa Abbasbhay
@houzefa.abba
mentioned in commit
ad05eb3f23a0
·
2 years ago
mentioned in commit
ad05eb3f23a0
mentioned in commit ad05eb3f23a0d6b1a633d61ff7d195d13bd9a89a
Toggle commit list
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