Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Build an "image gallery" with ODOO, or integrate an external one?

By
Roberto Cocchiararo
on 1/5/15, 2:02 PM 1,797 views

Hi

I have been building 2 different "addons" to the "fleet management" module for different purposes. One of them still needs the ability to build some sort of image gallery, so that each car (old cars, kinda a museum) can have a link from their technical data to an image gallery (preferably with the option to add text to it, in order to have some kind of introduction).

I tried the website builder, but i think it was not made for this kind of task in mind.

If there is a way to do this in odoo, i would love to use it.

If not, i will have to find some other tool and i will add links to it from each vehicle or something like that.

@Robert, You may find this module useful: https://github.com/OdooCommunityWidgets/website_multi_image I think this could be easily modified to suit your requirements.

Luke Branch
on 1/6/15, 1:21 AM

I would need to still use the website builder, add this module, and then tweak as needed, right? (if i am not wrong, this wont allow extra functionality INSIDE the fleet module, but it might still work for me).

Roberto Cocchiararo
on 1/7/15, 8:53 AM

MMm, that module fails to install complaining about ""External ID not found in the system: website_sale.product" while parsing None:4, near..." The error is way longer. Might take me a while to get it to install.

Roberto Cocchiararo
on 1/7/15, 9:55 AM

@Luke I can't comment on your answer, so i will do it here: I tried installing it because i wanted to see how it looked "in action". Currently i need/want to replace an old "flash" site made for 800x600 resolution. That site has a "home" where you can choose brand, year, brand+year or search. All of those options show a poorly made list of cars, and when you choose one, you get a poorly made image gallery + information (text) about it. This was connected to some kind of system to have technical information about cars, that was even worse. This last system is what i replaced with odoo, and i am happy with the results. Now, if i can add to each vehicle a "way" to get to the gallery that i saw in the pictures of this module (albeit, with modifications), it would replace BOTH old systems with odoo, which would be great. Since i already have the vehicle list that is "searchable" in the fleet module, just getting from each vahicle to it's gallery sounds like the best option. My python skills are limited, tho :P

Roberto Cocchiararo
on 1/7/15, 11:09 AM

@Luke After inspecting the module, what i would need is: (1) Add a new view to the fleet module with those image carousels (i have to make my own, the one there extends a view from another module) (2) Add a one2many field in fleet.vehicle model pointing to the many2one from the image gallery. Will that be enough to get an editable gallery for each vehicle? I will try my best, but guidance will be appreciated. (there are 2 model extensions in the python file, and i think i need to only extend 1 in my case. There are 3 views, and i am unsure what i need there)

Roberto Cocchiararo
on 1/8/15, 3:05 PM

I ended up installing all the modules in order to see it in action, i could not get a full grasp of it by code. Now i get that the "oddo side" of it is for loading the images into the "products", and i get to see the "graphic" side of it in the website built website (in the store). My first issue here is that there is no way (as far as i can see) to display "vehicles" with the website builder. I have added a page to my notebook in fleet.vehicle and i can store images (added the models and all), but i lack the way (or knowledge) to make a website that shows any of that. Will look some more into it.

Roberto Cocchiararo
on 1/9/15, 3:21 PM

@Robert, Are you looking to display these vehicle details to the public? If so I think it would be best to add/relate the features you need from the fleet management module to product.template. This will give you far more flexibility in displaying these cars and their data/specifications, etc. to the public. Could you list out all of the specifications/fields, etc. you would need to show on the product/car page?

Luke Branch
on 1/10/15, 1:30 AM

@luke, I don´t need to display anything to the public, nor will we ever make this internet accesible or sell anything. It is an internal thing. The "graphic" side of this needs only a place for a title, maybe subtitle and a bigger section for a story of the vehicle (should it have one). Then, only pictures. (the current site has that and some animation that are not needed). I just seek those 3 text sections and the option to add as many images as i might need (preferably with a grid or carrousel style of smaller pictures that are expanded/opened in bigger size uppon click). I am not sure i can get the pictures to display IN the fleet module (by adding the "picture" model from the module you recomended and extending the vehicle view to add the grid for loading unlimited pictures, i can store them, but i only see their name and the option to download them IN the fleet module/fleet.vehicle view. If there is a way to make an ODOO view OUTSIDE the website module (which i don need, like or understand correctly >P), that would be AWESOME. I could make a new menu/view/model in the fleet module for it, and a link (many2one) from each vehicle TO it.

Roberto Cocchiararo
on 1/10/15, 9:17 AM

Even if i can get a "fancy" grid gallery to click the pictures and have them expanded (another view maybe?), it MIGHT (not sure) be enough to have a list of picture names that open IN the browser (not download) uppon clicking them (tho the option of seeing small ones that open in a popup/new view after clicking them is way more elegant).

Roberto Cocchiararo
on 1/10/15, 9:19 AM
0

Luke Branch

--Luke Branch--
1531
| 6 7 8
Mui Wo, Lantau, Hong Kong
--Luke Branch--

...

Luke Branch
On 1/7/15, 10:11 AM

@Robert,

If you want to use the module in it's default configuration as-is, you'll need to install the website_sale module, as this module creates a view on the product view page of the e-commerce module to allow products to have an import-compatible image gallery with multiple images attached to a product.

What I meant to say above is that you could consider forking and modifying the module to suit your own requirements. You could do this by creating a view in the fleet management module where you want it, and modifying the python code to add the one2many list in one of the fleet management module's models.

If you could post a detailed list of exactly what you want to accomplish with your module I would be happy to offer suggestions on how you might be able to achieve this.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 1/5/15, 2:02 PM
Seen: 1797 times
Last updated: 3/16/15, 8:10 AM