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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alexander Emmerich
erp5
Commits
ab7b06ee
Commit
ab7b06ee
authored
Jan 14, 2020
by
Xiaowu Zhang
Committed by
Xiaowu Zhang
Apr 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epr5_accounting: only check valide accounting period
parent
c74e8a68
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/scripts/validateTransaction.py
...rkflow/accounting_workflow/scripts/validateTransaction.py
+8
-4
No files found.
bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/scripts/validateTransaction.py
View file @
ab7b06ee
...
...
@@ -79,8 +79,10 @@ if not skip_period_validation :
section
=
source_section
if
section
.
getPortalType
()
==
'Organisation'
:
section
=
section
.
Organisation_getMappingRelatedOrganisation
()
if
not
len
(
section
.
contentValues
(
filter
=
dict
(
portal_type
=
"Accounting Period"
))):
if
not
len
([
ap
for
ap
in
section
.
contentValues
(
portal_type
=
"Accounting Period"
,
checked_permission
=
"Access contents information"
)
if
ap
.
getSimulationState
()
not
in
(
'deleted'
,
'cancelled'
,
'draft'
,)]):
valid_date
=
True
else
:
accounting_period
=
transaction
\
...
...
@@ -109,8 +111,10 @@ if not skip_period_validation :
section
=
destination_section
if
section
.
getPortalType
()
==
'Organisation'
:
section
=
section
.
Organisation_getMappingRelatedOrganisation
()
if
not
len
(
section
.
contentValues
(
filter
=
dict
(
portal_type
=
"Accounting Period"
))):
if
not
len
([
ap
for
ap
in
section
.
contentValues
(
portal_type
=
"Accounting Period"
,
checked_permission
=
"Access contents information"
)
if
ap
.
getSimulationState
()
not
in
(
'deleted'
,
'cancelled'
,
'draft'
,)]):
valid_date
=
True
else
:
accounting_period
=
transaction
\
...
...
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