Skip to content
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

[11.0][MIG] web_widget_color: Migration to 11.0 #775

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions web_widget_color/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
Color widget for Odoo web client
================================

This module aims to add a color picker to Odoo.

It's a `jsColor <http://jscolor.com/>`_ lib integration.


Features
========

* The picker allow the user to quickly select a color on edit mode

|picker|

.. note::

Notice how html code and the background color is updating when selecting a color.


* Display the color on form view when you are not editing it

|formview|

* Display the color on list view to quickly find what's wrong!

|listview|


Usage
=====

You need to declare a char field of at least size 7::

_columns = {
'color': fields.char(
u"Couleur",
help=u"Toutes couleur valid css, exemple blue ou #f57900"
),
}

OR

color = fields.Char(
string="Color",
help="Choose your color"
)


In the view declaration, put widget='color' attribute in the field tag::

...
<field name="arch" type="xml">
<tree string="View name">
...
<field name="name"/>
<field name="color" widget="color"/>
...
</tree>
</field>
...

.. |picker| image:: ./images/picker.png
.. |formview| image:: ./images/form_view.png
.. |listview| image:: ./images/list_view.png

.. 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/11.0

Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/OCA/OCA/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.

Credits
=======

Contributors
------------

* Adil Houmadi <adil.houmadi@gmail.com>
* Nicolas JEUDY (Sudokeys) <https://www.github.com/njeudy>

Maintainer
----------

.. 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.
2 changes: 2 additions & 0 deletions web_widget_color/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-
#
28 changes: 28 additions & 0 deletions web_widget_color/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
# Odoo, Open Source Web Widget Color
# Copyright (C) 2012 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
# Copyright (C) 2014 Anybox <http://anybox.fr>
# Copyright (C) 2015 Taktik SA <http://taktik.be>
#
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).#
{
'name': "Web Widget Color",
'category': "web",
'version': "11.0.1.0.0",
"author": "Savoir-faire Linux, "
"Anybox, "
"Taktik SA, "
"Sudokeys, "
"Odoo Community Association (OCA)",
'depends': ['base', 'web'],
'data': [
'view/web_widget_color_view.xml'
],
'qweb': [
'static/src/xml/widget.xml',
],
'license': 'AGPL-3',
'auto_install': False,
'installable': True,
'web_preload': True,
}
Binary file added web_widget_color/images/form_view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_widget_color/images/list_view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_widget_color/images/picker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_widget_color/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_widget_color/static/lib/jscolor/arrow.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_widget_color/static/lib/jscolor/cross.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions web_widget_color/static/lib/jscolor/demo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<html>
<head>
<title>jscolor demo</title>
</head>
<body>

<script type="text/javascript" src="jscolor.js"></script>

Click here: <input class="color" value="66ff00">

</body>
</html>
Binary file added web_widget_color/static/lib/jscolor/hs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_widget_color/static/lib/jscolor/hv.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading