Skip to content
Snippets Groups Projects
user avatar
Sanket Brahmbhatt authored
When the customer tries to move the video to the first position of the product
image. at that time, the error would be generated.

step to reproduce:
-Install the website_sale
-open Invoicing > vendors > Products > open any Product
-open sales Notepage
-click on add a Media
-past any video url > save it
-click on Go To website from the state button
-click on Edit button > again double click on the image
-then click on a right side position of re-order

error- Key Error:'video_url'

After applying our commit, if the customer got a validation error when
the customer attempted to swap the video into the product images at
 the first position. There is a controller named
`/shop/product/resequence-image` which called, when the customer
changes the position of the video.

https://github.com/odoo/odoo/blob/3ce90ddf33f59a80de34cbafd05679d0817d0076/addons/website_sale/controllers/main.py#L582-L587



The `image res_model` will then receive the `product.image` model when a
customer moves a video from the third to the second position, and that model
locates the field known as `video_url`. However, when a customer moves a
video from the second to the first position, `image res_model` will then
receive the `product.product`  model, and that model finds the same field but
does not have that field in it.

sentry-4393257638

closes odoo/odoo#132471

Signed-off-by: default avatarAntoine Vandevenne (anv) <anv@odoo.com>
8a6a5a10
History

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials