-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ADD] web_favicon #252
[ADD] web_favicon #252
Conversation
closes OCA#199
@http.route('/web_favicon/favicon', type='http', auth="none") | ||
def icon(self): | ||
request = http.request | ||
company = request.env['res.company'].search([], limit=1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be in the else
part of the following if
Thank you Holger, this is a great feature. |
|
||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas | ||
:alt: Try me on Runbot | ||
:target: https://runbot.odoo-community.org/runbot/{repo_id}/8.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please replace {repo_id}
Thanks @hbrunn |
It's 👍 after Travis is green. |
@dreispt thanks, please remove the needs fixing label then when appropriate |
👍 |
Configuration | ||
============= | ||
|
||
Upload your favicon (16x16, 32x32 or 64x64 pixels, 16 colors) on the company |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bigger resolution than 64x64 can be also used (and it's advisable for Android or iOS webapps for example). Also 16 colors is an older specification. Now the range color can be wider. Some reference: http://stackoverflow.com/questions/2268204/favicon-dimensions
I was making something similar for website icon, but being static, so this one is very interesting, but your approach is a bit limited, because it doesn't take into account new specifications for declaring webapps icon for iOS and Android (which can be very useful, specially with responsive UI). Look at my module that already declared this: https://github.com/serviciosbaeza/serviciosbaeza-odoo-addons/blob/8.0/website_favicon/views/website_favicon.xml. You can also catch the nice icon I made: https://github.com/serviciosbaeza/serviciosbaeza-odoo-addons/blob/8.0/website_favicon/static/description/icon.png I'm thinking of having multiple fields, one for each size, and the only required is the higher resolution one. Then, to have compute fields that catch the current resolution one if provided, and if not, a resized image to the proper size from the higher resolution image. All of this used in the links in the XML. What do you think? Can you do it? May I propose the change to your branch? |
@pedrobaeza propose it, I'll be happy to merge it |
@pedrobaeza AFAICT the icon is cached and the "high" resolution is not that high. Maybe a single field would be just fine. |
@dreispt, you're thinking only in traditional browsers, but there are more applications. |
@pedrobaeza is it a good idea to block this until we have the maximal version? Can't we merge now and add the fancy stuff whenever you find time to do it? |
@hbrunn Put it in the Roadmap section of the README, as an idea for possible contributors.. |
mobile devices in the roadmap
@dreispt done |
I think this is good to merge. @pedrobaeza ? |
No, please let me work on the points I have told. |
Is there a problem on that going in a separate PR? |
Yes, the need for a migration script. |
@pedrobaeza please either add the feature you want, or remove the work in progress tag. It's been two months now |
I think this can be merged now, it doesn't seem @pedrobaeza will add the feature he want any time soon |
@pedrobaeza can we merge? |
I'm preparing a quick PR with some of the changes we told (not all), and I'll propose it to @hbrunn's branch. |
You have in hbrunn#3 my little improvements. When I have time, I'll work in the rest of the roadmap. |
[IMP] web_favicon: Nicer icon + README imp + support files
@pedrobaeza @dreispt merged |
Travis is fine, so I merge. Thanks to all! |
closes #199