Skip to content

Commit

Permalink
[FIX] website: name is required at model level
Browse files Browse the repository at this point in the history
Before this commit,  There would be an error due to the required field `name` which was not passed in vals when the user creates new Redirects through Manage Pages from Website, while the `name` field is required at the model level.

In this commit, we pass 'name' field in the values of `website.rewrite`

Followup on be8fc22

closes odoo#49000

Signed-off-by: Jérémy Kersten (jke) <[email protected]>
  • Loading branch information
sswapnesh authored Apr 4, 2020
1 parent 143960c commit a8125eb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions addons/website/models/website_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def save_page_info(self, website_id, data):
# Create redirect if needed
if data['create_redirect']:
self.env['website.rewrite'].create({
'name': data['name'],
'redirect_type': data['redirect_type'],
'url_from': original_url,
'url_to': url,
Expand Down

0 comments on commit a8125eb

Please sign in to comment.