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
9975a04e
Commit
9975a04e
authored
9 years ago
by
Denis Ledoux
Browse files
Options
Downloads
Patches
Plain Diff
[FIX] website_quote: quote creation without default template
onchanges methods are expected to return dicts opw-649862
parent
06138db7
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
addons/website_quote/models/order.py
+2
-2
2 additions, 2 deletions
addons/website_quote/models/order.py
with
2 additions
and
2 deletions
addons/website_quote/models/order.py
+
2
−
2
View file @
9975a04e
...
...
@@ -191,7 +191,7 @@ class sale_order(osv.osv):
def
onchange_template_id
(
self
,
cr
,
uid
,
ids
,
template_id
,
partner
=
False
,
fiscal_position
=
False
,
pricelist_id
=
False
,
context
=
None
):
if
not
template_id
:
return
True
return
{}
if
partner
:
context
=
dict
(
context
or
{})
...
...
@@ -309,7 +309,7 @@ class sale_order(osv.osv):
def
create
(
self
,
cr
,
uid
,
values
,
context
=
None
):
if
not
values
.
get
(
'
template_id
'
):
defaults
=
self
.
default_get
(
cr
,
uid
,
[
'
template_id
'
],
context
=
context
)
template_values
=
self
.
onchange_template_id
(
cr
,
uid
,
[],
defaults
.
get
(
'
template_id
'
),
partner
=
values
.
get
(
'
partner_id
'
),
fiscal_position
=
values
.
get
(
'
fiscal_position
'
),
context
=
context
)
[
'
value
'
]
template_values
=
self
.
onchange_template_id
(
cr
,
uid
,
[],
defaults
.
get
(
'
template_id
'
),
partner
=
values
.
get
(
'
partner_id
'
),
fiscal_position
=
values
.
get
(
'
fiscal_position
'
),
context
=
context
)
.
get
(
'
value
'
,
{})
values
=
dict
(
template_values
,
**
values
)
return
super
(
sale_order
,
self
).
create
(
cr
,
uid
,
values
,
context
=
context
)
...
...
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