Browse Source

[ADD] Group 'Edit Favicon'

pull/607/head
tarteo 8 years ago
committed by tarteo
parent
commit
00eb9e4abe
  1. 2
      web_favicon/README.rst
  2. 3
      web_favicon/__manifest__.py
  3. 7
      web_favicon/security/web_favicon_security.xml
  4. 2
      web_favicon/views/res_company.xml

2
web_favicon/README.rst

@ -30,6 +30,8 @@ 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 an user to edit the favicon it has to be member of group "Edit Favicon".
Usage
=====

3
web_favicon/__manifest__.py

@ -16,8 +16,9 @@
'web',
],
"data": [
"views/res_company.xml",
'views/res_company.xml',
'views/templates.xml',
'security/web_favicon_security.xml'
],
'installable': True,
}

7
web_favicon/security/web_favicon_security.xml

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="group_edit_favicon" model="res.groups">
<field name="name">Edit Favicon</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
</odoo>

2
web_favicon/views/res_company.xml

@ -5,7 +5,7 @@
<field name="inherit_id" ref="base.view_company_form" />
<field name="arch" type="xml">
<notebook position="inside">
<page string="Web Favicon" name="favicon">
<page string="Web Favicon" name="favicon" groups="web_favicon.group_edit_favicon">
<group string="Favicon" name="favicon">
<field name="favicon_backend" widget="image" />
<field name="favicon_backend_mimetype" attrs="{'required': [('favicon_backend', '!=', False)]}" />

Loading…
Cancel
Save