From 18e0c5d86914d64f9d8a10b71581f3cff3ba6844 Mon Sep 17 00:00:00 2001 From: tarteo Date: Tue, 2 Oct 2018 15:32:25 +0200 Subject: [PATCH] [MIG] web_favicon: Migration to 12.0 --- web_favicon/README.rst | 77 ++-- web_favicon/__init__.py | 1 - web_favicon/__manifest__.py | 4 +- web_favicon/controllers/__init__.py | 1 - web_favicon/controllers/web_favicon.py | 1 - web_favicon/models/__init__.py | 1 - web_favicon/models/res_company.py | 1 - web_favicon/readme/CONFIGURE.rst | 15 + web_favicon/readme/DESCRIPTION.rst | 10 + web_favicon/readme/ROADMAP.rst | 6 + web_favicon/static/description/index.html | 447 ++++++++++++++++++++++ web_favicon/tests/__init__.py | 1 - web_favicon/tests/test_web_favicon.py | 3 +- web_favicon/views/templates.xml | 6 +- 14 files changed, 534 insertions(+), 40 deletions(-) create mode 100644 web_favicon/readme/CONFIGURE.rst create mode 100644 web_favicon/readme/DESCRIPTION.rst create mode 100644 web_favicon/readme/ROADMAP.rst create mode 100644 web_favicon/static/description/index.html diff --git a/web_favicon/README.rst b/web_favicon/README.rst index ae78ca98..bc3f9e1d 100644 --- a/web_favicon/README.rst +++ b/web_favicon/README.rst @@ -1,18 +1,46 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License: AGPL-3 +==================== +Custom shortcut icon +==================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github + :target: https://github.com/OCA/web/tree/12.0/web_favicon + :alt: OCA/web +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/web-12-0/web-12-0-web_favicon + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/162/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| -============================== -Custom shortcut icon (favicon) -============================== This module was written to allow you to customize your Odoo instance's shortcut icon (aka favicon). This is useful for branding purposes, but also for integrators who have many different Odoo instances running and need to see at a glance which browser tab does what. +The icon is shown also for portal users when the website modules are not +installed. + More info about favicon: https://en.wikipedia.org/wiki/Favicon +**Table of contents** + +.. contents:: + :local: + Configuration ============= @@ -32,13 +60,6 @@ favicon generators across the web. To allow a user to edit the favicon it has to be member of group "Administration / Settings". -Usage -===== - -.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas - :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/162/10.0 - Known issues / Roadmap ====================== @@ -54,33 +75,33 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. -If you spotted it first, help us smashing it by providing a detailed and welcomed feedback -`here `_. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. Credits ======= -Contributors ------------- +Authors +~~~~~~~ -* Holger Brunn -* Pedro M. Baeza -* Dennis Sluijk -* Marçal Isern +* Therp BV +* Tecnativa -Maintainer ----------- +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. .. image:: https://odoo-community.org/logo.png :alt: Odoo Community Association :target: https://odoo-community.org -This module is maintained by the OCA. - OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -To contribute to this module, please visit https://odoo-community.org. +This module is part of the `OCA/web `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/web_favicon/__init__.py b/web_favicon/__init__.py index a2666d4d..185df0ee 100644 --- a/web_favicon/__init__.py +++ b/web_favicon/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import models diff --git a/web_favicon/__manifest__.py b/web_favicon/__manifest__.py index dfa8f463..421c7b9f 100644 --- a/web_favicon/__manifest__.py +++ b/web_favicon/__manifest__.py @@ -1,17 +1,17 @@ -# -*- coding: utf-8 -*- # Copyright 2015 Therp BV # Copyright 2016 Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "Custom shortcut icon", - "version": "11.0.1.0.0", + "version": "12.0.1.0.0", "author": "Therp BV, " "Tecnativa, " "Odoo Community Association (OCA)", "license": "AGPL-3", "category": "Website", "summary": "Allows to set a custom shortcut icon (aka favicon)", + "website": "https://github.com/OCA/web", "depends": [ "web", ], diff --git a/web_favicon/controllers/__init__.py b/web_favicon/controllers/__init__.py index 7c3fa3f8..7084537a 100644 --- a/web_favicon/controllers/__init__.py +++ b/web_favicon/controllers/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import web_favicon diff --git a/web_favicon/controllers/web_favicon.py b/web_favicon/controllers/web_favicon.py index a72b31c0..5e135a1b 100644 --- a/web_favicon/controllers/web_favicon.py +++ b/web_favicon/controllers/web_favicon.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2015 Therp BV # Copyright 2017 QubiQ 2010 # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). diff --git a/web_favicon/models/__init__.py b/web_favicon/models/__init__.py index 54d77ccf..a12c1b8e 100644 --- a/web_favicon/models/__init__.py +++ b/web_favicon/models/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import res_company diff --git a/web_favicon/models/res_company.py b/web_favicon/models/res_company.py index 36a7b032..99894824 100644 --- a/web_favicon/models/res_company.py +++ b/web_favicon/models/res_company.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2015 Therp BV # Copyright 2016 Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). diff --git a/web_favicon/readme/CONFIGURE.rst b/web_favicon/readme/CONFIGURE.rst new file mode 100644 index 00000000..55777b65 --- /dev/null +++ b/web_favicon/readme/CONFIGURE.rst @@ -0,0 +1,15 @@ +Upload your favicon (16x16, 32x32, 64x64 or "as big as possible") on the +company form. The file format would be ico, gif or png with 16x16, 32x32 or +64x64 pixels and 16 colors. Highers resolutions or colors support depends on +the used browser, but most modern browsers do. + +Note that most browsers cache favicons basically forever, so if you want your +icon to show up, you'll most probably have to delete you browser cache. +Some browsers can refresh the favicon, accessing the URL +/web_favicon/favicon. + +You have a sample SVG that can be used as template for generating your icon +in /static/src/img/master_original_favicon.svg. You can also search for some +favicon generators across the web. + +To allow a user to edit the favicon it has to be member of group "Administration / Settings". diff --git a/web_favicon/readme/DESCRIPTION.rst b/web_favicon/readme/DESCRIPTION.rst new file mode 100644 index 00000000..83260785 --- /dev/null +++ b/web_favicon/readme/DESCRIPTION.rst @@ -0,0 +1,10 @@ + +This module was written to allow you to customize your Odoo instance's shortcut +icon (aka favicon). This is useful for branding purposes, but also for +integrators who have many different Odoo instances running and need to see at a +glance which browser tab does what. + +The icon is shown also for portal users when the website modules are not +installed. + +More info about favicon: https://en.wikipedia.org/wiki/Favicon diff --git a/web_favicon/readme/ROADMAP.rst b/web_favicon/readme/ROADMAP.rst new file mode 100644 index 00000000..b4d00087 --- /dev/null +++ b/web_favicon/readme/ROADMAP.rst @@ -0,0 +1,6 @@ +* Allow to upload some big icon (preferrably SVG or the like) and generate + all the icons from it +* Generate icons suitable for mobile devices and web apps (see /static/src/img/ + folder inside the module for a sample of the possible current formats. +* Put the icon definition at system level, not at company level. It doesn't + make sense (as the icon is cached) to have a different icon per company. diff --git a/web_favicon/static/description/index.html b/web_favicon/static/description/index.html new file mode 100644 index 00000000..866cc6c6 --- /dev/null +++ b/web_favicon/static/description/index.html @@ -0,0 +1,447 @@ + + + + + + +Custom shortcut icon + + + +
+

Custom shortcut icon

+ + +

Beta License: AGPL-3 OCA/web Translate me on Weblate Try me on Runbot

+

This module was written to allow you to customize your Odoo instance’s shortcut +icon (aka favicon). This is useful for branding purposes, but also for +integrators who have many different Odoo instances running and need to see at a +glance which browser tab does what.

+

The icon is shown also for portal users when the website modules are not +installed.

+

More info about favicon: https://en.wikipedia.org/wiki/Favicon

+

Table of contents

+ +
+

Configuration

+

Upload your favicon (16x16, 32x32, 64x64 or “as big as possible”) on the +company form. The file format would be ico, gif or png with 16x16, 32x32 or +64x64 pixels and 16 colors. Highers resolutions or colors support depends on +the used browser, but most modern browsers do.

+

Note that most browsers cache favicons basically forever, so if you want your +icon to show up, you’ll most probably have to delete you browser cache. +Some browsers can refresh the favicon, accessing the URL +<base_url>/web_favicon/favicon.

+

You have a sample SVG that can be used as template for generating your icon +in /static/src/img/master_original_favicon.svg. You can also search for some +favicon generators across the web.

+

To allow a user to edit the favicon it has to be member of group “Administration / Settings”.

+
+
+

Known issues / Roadmap

+
    +
  • Allow to upload some big icon (preferrably SVG or the like) and generate +all the icons from it
  • +
  • Generate icons suitable for mobile devices and web apps (see /static/src/img/ +folder inside the module for a sample of the possible current formats.
  • +
  • Put the icon definition at system level, not at company level. It doesn’t +make sense (as the icon is cached) to have a different icon per company.
  • +
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Therp BV
  • +
  • Tecnativa
  • +
+
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/web project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/web_favicon/tests/__init__.py b/web_favicon/tests/__init__.py index 6a5f7312..9be3cd52 100644 --- a/web_favicon/tests/__init__.py +++ b/web_favicon/tests/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import test_web_favicon diff --git a/web_favicon/tests/test_web_favicon.py b/web_favicon/tests/test_web_favicon.py index 78222d31..99dbe39a 100644 --- a/web_favicon/tests/test_web_favicon.py +++ b/web_favicon/tests/test_web_favicon.py @@ -1,5 +1,4 @@ -# -*- coding: utf-8 -*- -# © 2015 Therp BV +# Copyright 2015 Therp BV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). import base64 diff --git a/web_favicon/views/templates.xml b/web_favicon/views/templates.xml index 32385c84..37edb63b 100644 --- a/web_favicon/views/templates.xml +++ b/web_favicon/views/templates.xml @@ -1,8 +1,10 @@