Skip to content
Open
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
89 changes: 89 additions & 0 deletions web_responsive_company_color/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
============================
Web Responsive Company Color
============================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:44f0095f8dc814ced83dd988cb51fdb49cfc33c0c743cf0c13020b870e94cee6
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/18.0/web_responsive_company_color
:alt: OCA/web
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/web-18-0/web-18-0-web_responsive_company_color
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module bridges web_company_color with web_responsive.

With this module, elements introduced or modified by web_responsive can
be styled with the same logic as web_company_color.

**Table of contents**

.. contents::
:local:

Usage
=====

Simply install the app. See web_company_color for instructions on how to
customize colors.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_responsive_company_color%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
-------

* Anusri Veerappan Prakasam

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

- `PyTech <https://www.pytech.it>`__:

- Alessandro Uffreduzzi <alessandro.uffreduzzi@pytech.it>
- Anusri Veerappan Prakasam <aprakhasam@nps100.com>
- Simone Rubino <simone.rubino@pytech.it>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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 <https://github.com/OCA/web/tree/18.0/web_responsive_company_color>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions web_responsive_company_color/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from .hooks import post_init_hook, uninstall_hook
18 changes: 18 additions & 0 deletions web_responsive_company_color/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "Web Responsive Company Color",
"summary": "Styling hooks for web_responsive elements",
"license": "AGPL-3",
"author": "Anusri Veerappan Prakasam, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/web",
"category": "Web",
"version": "18.0.1.0.0",
"depends": [
"web_company_color",
"web_responsive",
],
"data": [],
"post_init_hook": "post_init_hook",
"uninstall_hook": "uninstall_hook",
"installable": True,
"application": False,
}
8 changes: 8 additions & 0 deletions web_responsive_company_color/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
def uninstall_hook(env):
env["res.company"].with_context(uninstall_scss=True).search(
[]
).scss_create_or_update_attachment()


def post_init_hook(env):
env["res.company"].search([]).scss_create_or_update_attachment()
1 change: 1 addition & 0 deletions web_responsive_company_color/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import res_company
26 changes: 26 additions & 0 deletions web_responsive_company_color/models/res_company.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from odoo import models


class ResCompany(models.Model):
_inherit = "res.company"

# For customizations of new web elements included
# under _get_scss_template to take effect, one need
# to handle migration to invoke post_init_hook()
def _get_scss_template(self):
uninstall_scss = self._context.get("uninstall_scss", False)
if not uninstall_scss:
return (
super()._get_scss_template()
+ """
.app-menu-container {
background: url('/web_responsive/static/src/img/home-menu-bg-overlay.svg'),
linear-gradient(
to bottom,
%(color_navbar_bg)s,
desaturate(lighten(%(color_navbar_bg)s, 20%%), 15)
);
}
"""
)
return super()._get_scss_template()
3 changes: 3 additions & 0 deletions web_responsive_company_color/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
4 changes: 4 additions & 0 deletions web_responsive_company_color/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- [PyTech](https://www.pytech.it):
- Alessandro Uffreduzzi \<alessandro.uffreduzzi@pytech.it\>
- Anusri Veerappan Prakasam \<aprakhasam@nps100.com\>
- Simone Rubino \<simone.rubino@pytech.it\>
4 changes: 4 additions & 0 deletions web_responsive_company_color/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This module bridges web_company_color with web_responsive.

With this module, elements introduced or modified by web_responsive can
be styled with the same logic as web_company_color.
2 changes: 2 additions & 0 deletions web_responsive_company_color/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Simply install the app. See web_company_color for instructions on how to
customize colors.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading