first push message
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
from . import controllers
|
||||
from . import models
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
'name': "survey_hide_keys",
|
||||
|
||||
'summary': "Short (1 phrase/line) summary of the module's purpose",
|
||||
|
||||
'description': """
|
||||
Long description of module's purpose
|
||||
""",
|
||||
|
||||
'author': "My Company",
|
||||
'website': "https://www.yourcompany.com",
|
||||
|
||||
# Categories can be used to filter modules in modules listing
|
||||
# Check https://github.com/odoo/odoo/blob/15.0/odoo/addons/base/data/ir_module_category_data.xml
|
||||
# for the full list
|
||||
'category': 'Uncategorized',
|
||||
'version': '0.1',
|
||||
|
||||
# any module necessary for this one to work correctly
|
||||
'depends': ['survey'],
|
||||
|
||||
# always loaded
|
||||
'data': [
|
||||
# 'security/ir.model.access.csv',
|
||||
'views/views.xml',
|
||||
'views/templates.xml',
|
||||
],
|
||||
# only loaded in demonstration mode
|
||||
'demo': [
|
||||
'demo/demo.xml',
|
||||
],
|
||||
'assets': {
|
||||
'web.assets_frontend': [
|
||||
'survey_hide_keys/static/src/css/survey_hide_keys.css',
|
||||
],
|
||||
},
|
||||
'installable': True,
|
||||
'application': False,
|
||||
'auto_install': False,
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
from . import controllers
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,21 @@
|
||||
# from odoo import http
|
||||
|
||||
|
||||
# class SurveyHideKeys(http.Controller):
|
||||
# @http.route('/survey_hide_keys/survey_hide_keys', auth='public')
|
||||
# def index(self, **kw):
|
||||
# return "Hello, world"
|
||||
|
||||
# @http.route('/survey_hide_keys/survey_hide_keys/objects', auth='public')
|
||||
# def list(self, **kw):
|
||||
# return http.request.render('survey_hide_keys.listing', {
|
||||
# 'root': '/survey_hide_keys/survey_hide_keys',
|
||||
# 'objects': http.request.env['survey_hide_keys.survey_hide_keys'].search([]),
|
||||
# })
|
||||
|
||||
# @http.route('/survey_hide_keys/survey_hide_keys/objects/<model("survey_hide_keys.survey_hide_keys"):obj>', auth='public')
|
||||
# def object(self, obj, **kw):
|
||||
# return http.request.render('survey_hide_keys.object', {
|
||||
# 'object': obj
|
||||
# })
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
<odoo>
|
||||
<data>
|
||||
<!--
|
||||
<record id="object0" model="survey_hide_keys.survey_hide_keys">
|
||||
<field name="name">Object 0</field>
|
||||
<field name="value">0</field>
|
||||
</record>
|
||||
|
||||
<record id="object1" model="survey_hide_keys.survey_hide_keys">
|
||||
<field name="name">Object 1</field>
|
||||
<field name="value">10</field>
|
||||
</record>
|
||||
|
||||
<record id="object2" model="survey_hide_keys.survey_hide_keys">
|
||||
<field name="name">Object 2</field>
|
||||
<field name="value">20</field>
|
||||
</record>
|
||||
|
||||
<record id="object3" model="survey_hide_keys.survey_hide_keys">
|
||||
<field name="name">Object 3</field>
|
||||
<field name="value">30</field>
|
||||
</record>
|
||||
|
||||
<record id="object4" model="survey_hide_keys.survey_hide_keys">
|
||||
<field name="name">Object 4</field>
|
||||
<field name="value">40</field>
|
||||
</record>
|
||||
-->
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -0,0 +1 @@
|
||||
from . import models
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,17 @@
|
||||
# from odoo import models, fields, api
|
||||
|
||||
|
||||
# class survey_hide_keys(models.Model):
|
||||
# _name = 'survey_hide_keys.survey_hide_keys'
|
||||
# _description = 'survey_hide_keys.survey_hide_keys'
|
||||
|
||||
# name = fields.Char()
|
||||
# value = fields.Integer()
|
||||
# value2 = fields.Float(compute="_value_pc", store=True)
|
||||
# description = fields.Text()
|
||||
#
|
||||
# @api.depends('value')
|
||||
# def _value_pc(self):
|
||||
# for record in self:
|
||||
# record.value2 = float(record.value) / 100
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_survey_hide_keys_survey_hide_keys,survey_hide_keys.survey_hide_keys,model_survey_hide_keys_survey_hide_keys,base.group_user,1,1,1,1
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,50 @@
|
||||
.o_survey_form_content{
|
||||
font-family: Khmer OS content; src:url(../fonts/KhmerOS_content.ttf) ;format('truetype');
|
||||
|
||||
}
|
||||
h3,span.text-break{
|
||||
font-family: Khmer OS content; src:url(../fonts/KhmerOS_content.ttf) ;format('truetype');
|
||||
line-height: 35px;
|
||||
}
|
||||
span.ms-2.text-break{
|
||||
font-family: Khmer OS content; src:url(../fonts/KhmerOS_content.ttf) ;format('truetype');
|
||||
}
|
||||
h1.o_survey_main_title{
|
||||
font-family: Khmer OS content; src:url(../fonts/KhmerOS_content.ttf) ;format('truetype');
|
||||
font-size: 25px;
|
||||
}
|
||||
/* Hide the choice key labels (A, B, C, D) */
|
||||
.o_survey_choice_key {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Remove extra padding from choice buttons */
|
||||
.o_survey_choice_btn.py-1.px-3 {
|
||||
padding-left: 1rem !important;
|
||||
}
|
||||
/* Apply to all textareas in survey */
|
||||
.o_survey_question_text_box textarea,
|
||||
textarea.o_survey_question_text_box {
|
||||
border: 1px solid #A1677A !important;
|
||||
padding: 10px !important;
|
||||
transition: border-color 0.3s ease !important;
|
||||
border-radius: 4px !important;
|
||||
height: auto !important;
|
||||
min-height: 45px !important;
|
||||
}
|
||||
|
||||
/* Hover effect */
|
||||
.o_survey_question_text_box textarea:hover,
|
||||
textarea.o_survey_question_text_box:hover {
|
||||
border-color: #A1677A !important;
|
||||
}
|
||||
|
||||
/* Focus effect */
|
||||
.o_survey_question_text_box textarea:focus,
|
||||
textarea.o_survey_question_text_box:focus {
|
||||
box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25) !important;
|
||||
outline: none !important;
|
||||
}
|
||||
div.d-print-none{
|
||||
display: none !important;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<odoo>
|
||||
<data>
|
||||
<!--
|
||||
<template id="listing">
|
||||
<ul>
|
||||
<li t-foreach="objects" t-as="object">
|
||||
<a t-attf-href="#{ root }/objects/#{ object.id }">
|
||||
<t t-esc="object.display_name"/>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
<template id="object">
|
||||
<h1><t t-esc="object.display_name"/></h1>
|
||||
<dl>
|
||||
<t t-foreach="object._fields" t-as="field">
|
||||
<dt><t t-esc="field"/></dt>
|
||||
<dd><t t-esc="object[field]"/></dd>
|
||||
</t>
|
||||
</dl>
|
||||
</template>
|
||||
-->
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -0,0 +1,60 @@
|
||||
<odoo>
|
||||
<data>
|
||||
<!-- explicit list view definition -->
|
||||
<!--
|
||||
<record model="ir.ui.view" id="survey_hide_keys.list">
|
||||
<field name="name">survey_hide_keys list</field>
|
||||
<field name="model">survey_hide_keys.survey_hide_keys</field>
|
||||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<field name="name"/>
|
||||
<field name="value"/>
|
||||
<field name="value2"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
-->
|
||||
|
||||
<!-- actions opening views on models -->
|
||||
<!--
|
||||
<record model="ir.actions.act_window" id="survey_hide_keys.action_window">
|
||||
<field name="name">survey_hide_keys window</field>
|
||||
<field name="res_model">survey_hide_keys.survey_hide_keys</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
</record>
|
||||
-->
|
||||
|
||||
<!-- server action to the one above -->
|
||||
<!--
|
||||
<record model="ir.actions.server" id="survey_hide_keys.action_server">
|
||||
<field name="name">survey_hide_keys server</field>
|
||||
<field name="model_id" ref="model_survey_hide_keys_survey_hide_keys"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">
|
||||
action = {
|
||||
"type": "ir.actions.act_window",
|
||||
"view_mode": "list,form",
|
||||
"res_model": model._name,
|
||||
}
|
||||
</field>
|
||||
</record>
|
||||
-->
|
||||
|
||||
<!-- Top menu item -->
|
||||
<!--
|
||||
<menuitem name="survey_hide_keys" id="survey_hide_keys.menu_root"/>
|
||||
-->
|
||||
<!-- menu categories -->
|
||||
<!--
|
||||
<menuitem name="Menu 1" id="survey_hide_keys.menu_1" parent="survey_hide_keys.menu_root"/>
|
||||
<menuitem name="Menu 2" id="survey_hide_keys.menu_2" parent="survey_hide_keys.menu_root"/>
|
||||
-->
|
||||
<!-- actions -->
|
||||
<!--
|
||||
<menuitem name="List" id="survey_hide_keys.menu_1_list" parent="survey_hide_keys.menu_1"
|
||||
action="survey_hide_keys.action_window"/>
|
||||
<menuitem name="Server to list" id="survey_hide_keys" parent="survey_hide_keys.menu_2"
|
||||
action="survey_hide_keys.action_server"/>
|
||||
-->
|
||||
</data>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user