mirror of https://github.com/OCA/web.git
[ADD] web_widget_slick_example: Create module
* Create SlickJS widget field in example module for usage instructions * Add security to example slick widget modelpull/706/head
parent
d59af25db3
commit
b3ffddfb95
|
@ -0,0 +1,32 @@
|
||||||
|
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg
|
||||||
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
:alt: License: AGPL-3
|
||||||
|
|
||||||
|
====================
|
||||||
|
Slick Widget Example
|
||||||
|
====================
|
||||||
|
|
||||||
|
This module provides an example of how to implement the web_widget_slick module
|
||||||
|
|
||||||
|
|
||||||
|
Credits
|
||||||
|
=======
|
||||||
|
|
||||||
|
Images
|
||||||
|
------
|
||||||
|
|
||||||
|
* LasLabs: `Icon <https://repo.laslabs.com/projects/TEM/repos/odoo-module_template/browse/module_name/static/description/icon.svg?raw>`_.
|
||||||
|
|
||||||
|
Contributors
|
||||||
|
------------
|
||||||
|
|
||||||
|
* Dave Lasley <dave@laslabs.com>
|
||||||
|
|
||||||
|
Maintainer
|
||||||
|
----------
|
||||||
|
|
||||||
|
.. image:: https://laslabs.com/logo.png
|
||||||
|
:alt: LasLabs Inc.
|
||||||
|
:target: https://laslabs.com
|
||||||
|
|
||||||
|
This module is maintained by LasLabs Inc.
|
|
@ -0,0 +1,5 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# © 2016-TODAY LasLabs Inc.
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||||
|
|
||||||
|
from . import models
|
|
@ -0,0 +1,25 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# © 2016-TODAY LasLabs Inc.
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||||
|
|
||||||
|
{
|
||||||
|
"name": "Slick Widget Example",
|
||||||
|
"summary": "Example usage of the web_widget_slick module",
|
||||||
|
"version": "9.0.1.0.0",
|
||||||
|
"category": "Hidden",
|
||||||
|
"website": "https://laslabs.com/",
|
||||||
|
"author": "LasLabs",
|
||||||
|
"license": "AGPL-3",
|
||||||
|
"application": False,
|
||||||
|
"installable": True,
|
||||||
|
"depends": [
|
||||||
|
"web_widget_slick",
|
||||||
|
],
|
||||||
|
"data": [
|
||||||
|
'views/slick_example_view.xml',
|
||||||
|
'security/ir.model.access.csv',
|
||||||
|
],
|
||||||
|
"demo": [
|
||||||
|
'demo/slick_example_data.xml',
|
||||||
|
]
|
||||||
|
}
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,3 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from . import slick_example
|
|
@ -0,0 +1,15 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# © 2016-TODAY LasLabs Inc.
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||||
|
|
||||||
|
from openerp import models, fields
|
||||||
|
|
||||||
|
|
||||||
|
class SlickExample(models.Model):
|
||||||
|
_name = 'slick.example'
|
||||||
|
_description = 'Slick Example Model'
|
||||||
|
image_ids = fields.One2many(
|
||||||
|
name='Images',
|
||||||
|
comodel_name='ir.attachment',
|
||||||
|
inverse_name='res_id',
|
||||||
|
)
|
|
@ -0,0 +1,2 @@
|
||||||
|
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||||
|
slick_example_manager,slick.example.manager,web_widget_slick_example.model_slick_example,base.group_no_one,1,1,1,1
|
|
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 932 KiB |
|
@ -0,0 +1,52 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Copyright (C) 2016-TODAY LasLabs, Inc. [https://laslabs.com]
|
||||||
|
@author Dave Lasley <dave@laslabs.com>
|
||||||
|
@license AGPL-3
|
||||||
|
-->
|
||||||
|
|
||||||
|
<openerp>
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<record id="slick_example_view_form" model="ir.ui.view">
|
||||||
|
<field name="name">slick.example.view.form</field>
|
||||||
|
<field name="model">slick.example</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form string="Slick Example">
|
||||||
|
<header />
|
||||||
|
<sheet>
|
||||||
|
<field name="image_ids" widget="one2many_slick_images"
|
||||||
|
options="{'slidesToShow': 2}" />
|
||||||
|
</sheet>
|
||||||
|
<footer />
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="slick_example_view_tree" model="ir.ui.view">
|
||||||
|
<field name="name">slick.example.view.tree</field>
|
||||||
|
<field name="model">slick.example</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<tree string="Slick Example">
|
||||||
|
<field name="id" />
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="slick_example_action" model="ir.actions.act_window">
|
||||||
|
<field name="name">Slick Examples</field>
|
||||||
|
<field name="res_model">slick.example</field>
|
||||||
|
<field name="type">ir.actions.act_window</field>
|
||||||
|
<field name="view_type">form</field>
|
||||||
|
<field name="view_mode">tree,form</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<menuitem id="slick_example_menu"
|
||||||
|
name="Slick"
|
||||||
|
parent="base.menu_custom"
|
||||||
|
action="slick_example_action"
|
||||||
|
sequence="1" />
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</openerp>
|
Loading…
Reference in New Issue