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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
erp5
Commits
a2dbbde0
Commit
a2dbbde0
authored
Jun 20, 2016
by
Nicolas Wavrant
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DeliveryType.py: constructInstance can receive as a parameter any derivative from "ledger_"
parent
895e7ce5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
product/ERP5Type/DeliveryType.py
product/ERP5Type/DeliveryType.py
+3
-2
No files found.
product/ERP5Type/DeliveryType.py
View file @
a2dbbde0
...
@@ -43,10 +43,11 @@ class DeliveryType(ERP5TypeInformation):
...
@@ -43,10 +43,11 @@ class DeliveryType(ERP5TypeInformation):
security
.
declarePublic
(
'constructInstance'
)
security
.
declarePublic
(
'constructInstance'
)
def
constructInstance
(
self
,
*
args
,
**
kw
):
def
constructInstance
(
self
,
*
args
,
**
kw
):
has_ledger_parameter
=
False
for
k
in
kw
:
for
k
in
kw
:
if
k
.
startswith
(
'ledger_'
):
if
k
.
startswith
(
'ledger_'
):
raise
ValueError
has_ledger_parameter
=
True
if
'ledger'
not
in
kw
:
if
not
has_ledger_parameter
:
ledger
=
self
.
getDefaultLedger
()
ledger
=
self
.
getDefaultLedger
()
if
ledger
:
if
ledger
:
kw
[
'ledger'
]
=
ledger
kw
[
'ledger'
]
=
ledger
...
...
Nicolas Wavrant
@Nicolas
mentioned in commit
f52ca085
·
Jun 20, 2016
mentioned in commit
f52ca085
mentioned in commit f52ca0858651929eee34deab8aeeeedf5bca179f
Toggle commit list
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