diff options
| author | Christophe Matthieu <chm@openerp.com> | 2012-09-11 11:49:48 +0200 |
|---|---|---|
| committer | Christophe Matthieu <chm@openerp.com> | 2012-09-11 11:49:48 +0200 |
| commit | 5ea9342dc52e82fc492d84ea3837c58767b95eba (patch) | |
| tree | fc485127e6a34946c97932eabe7b3a68509a5cc2 /addons | |
| parent | 22d1ff0c82585beb6ac999cc7b10d98d6107a8cd (diff) | |
[IMP] note : tags on kanban
bzr revid: chm@openerp.com-20120911094948-hr4odql5k1dmief4
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/note/__openerp__.py | 3 | ||||
| -rw-r--r-- | addons/note/note.py | 90 | ||||
| -rw-r--r-- | addons/note/note_demo.xml | 28 | ||||
| -rw-r--r-- | addons/note/note_view.xml | 91 | ||||
| -rw-r--r-- | addons/note/security/ir.model.access.csv | 4 | ||||
| -rw-r--r-- | addons/note/security/res.groups.csv | 5 | ||||
| -rw-r--r-- | addons/note/static/src/css/Makefile | 4 | ||||
| -rw-r--r-- | addons/note/static/src/css/note.css | 70 | ||||
| -rw-r--r-- | addons/note/static/src/css/note.sass | 88 | ||||
| -rw-r--r-- | addons/note_pad/__init__.py | 2 | ||||
| -rw-r--r-- | addons/note_pad/__openerp__.py | 8 | ||||
| -rw-r--r-- | addons/note_pad/note_pad.py | 4 | ||||
| -rw-r--r-- | addons/note_pad/note_pad_view.xml | 2 |
13 files changed, 297 insertions, 102 deletions
diff --git a/addons/note/__openerp__.py b/addons/note/__openerp__.py index 2e02ac567c7..c0c05c4cdb9 100644 --- a/addons/note/__openerp__.py +++ b/addons/note/__openerp__.py @@ -37,11 +37,10 @@ Memos can be found in the 'Home' menu. """, 'author': 'OpenERP SA', 'website': 'http://openerp.com', - 'summary': 'Sticky Memos, Collaborative', + 'summary': 'Sticky notes, Collaborative, Memos', 'depends': [ 'base_tools', 'mail', - 'pad', ], 'data': [ 'security/res.groups.csv', diff --git a/addons/note/note.py b/addons/note/note.py index 7387d1c3d54..ed69214f97d 100644 --- a/addons/note/note.py +++ b/addons/note/note.py @@ -23,15 +23,14 @@ from openerp.osv import osv, fields from tools.translate import _ import re -#every user can create his name of stage for his notes class note_stage(osv.osv): - """ Category of Note """ + """ Category of memo """ _name = "note.stage" _description = "Memo Stage" _columns = { 'name': fields.char('Category Name', size=64, required=True), - 'sequence': fields.integer('Sequence', help="Used to order the note stages"), - 'user_id': fields.many2one('res.users', 'Owner', help="Owner of the note stage.", required=True, readonly=True), + 'sequence': fields.integer('Sequence', help="Used to order the memo stages"), + 'user_id': fields.many2one('res.users', 'Owner', help="Owner of the memo stage.", required=True, readonly=True), 'fold': fields.boolean('Folded'), } _order = 'sequence asc' @@ -41,34 +40,30 @@ class note_stage(osv.osv): 'sequence' : 1, } -#Object for tagging the diferent note. The tagging is shared with all follower class note_tag(osv.osv): _name = "note.tag" - _description = "User can make tags on his memo." + _description = "User can make tags on his note." _columns = { 'name' : fields.char('Tag name', size=64, required=True), } -#object note is kanban view orriented. The first line of the notes are put on the -#kanban view like a title. An upgrade note_pad, can make a pad object in the form view. -#The user can unactivate a note, this note disapear after one days. class note_note(osv.osv): - """ Note """ + """ memo """ _name = 'note.note' _inherit = ['mail.thread'] _description = "Memo" #writing method (no modification of values) def _set_note_first_line(self, cr, uid, id, name, value, args={}, context=None): - return self.write(cr, uid, [id], {'note': value}, context=context) + return self.write(cr, uid, [id], {'memo': value}, context=context) #read the first line (convert hml into text) def _get_note_first_line(self, cr, uid, ids, name="", args={}, context=None): res = {} for note in self.browse(cr, uid, ids, context=context): - text_note = (note.note or '').strip().split('\n')[0] + text_note = (note.memo or '').strip().split('\n')[0] text_note = re.sub(r'(<br[ /]*>|</p>|</div>)[\s\S]*','',text_note) text_note = re.sub(r'<[^>]+>','',text_note) res[note.id] = text_note @@ -80,20 +75,7 @@ class note_note(osv.osv): ids = self.pool.get('note.stage').search(cr,uid,[('user_id','=',uid)]) return ids and ids[0] or False - #nead IMP : return the list of stage for the uid user - #because one note can have more of one stage (one stage per note and per user) - def _read_group_stage_ids(self, cr, uid, ids, domain, read_group_order=None, access_rights_uid=None, context=None): - access_rights_uid = access_rights_uid or uid - stage_obj = self.pool.get('note.stage') - - # only show stage groups not folded and owned by user - search_domain = [('fold', '=', False),('user_id', '=', uid)] - - stage_ids = stage_obj._search(cr, uid, search_domain, order=self._order, access_rights_uid=access_rights_uid, context=context) - result = stage_obj.name_get(cr, access_rights_uid, stage_ids, context=context) - return result - - #unactivate a note and record the date + #unactivate a memo and record the date def onclick_note_is_done(self, cr, uid, ids, context=None): self.write(cr, uid, ids, { 'active' : False, 'date_done' : fields.date.today() }) @@ -102,16 +84,16 @@ class note_note(osv.osv): return False - #activate a note + #activate a memo def onclick_note_not_done(self, cr, uid, ids, context=None): self.write(cr, uid, ids, { 'active' : True }) - self.message_post(cr, uid, ids[0], body='This memo is done', subject=False, + self.message_post(cr, uid, ids[0], body='This memo is close', subject=False, type='notification', parent_id=False, attachments=None, context=context) return False - #look that the title (first line of the note) have more of one caracter + #look that the title (first line of the memo) have more of one caracter def _constraints_min_len(self, cr, uid, ids, context=None): res = self._get_note_first_line(cr, uid, ids, context=context) @@ -121,11 +103,28 @@ class note_note(osv.osv): return False return True - - + + + #used for undisplay the follower if it's the current user + def _get_my_current_partner(self, cr, uid, ids, name, args, context=None): + user = self.pool.get('res.users').browse(cr, uid, uid, context=context) + pid = user.partner_id and user.partner_id.id or False + + result = {} + for record in self.browse(cr, uid, ids, context=context): + result[record.id]=pid + + return result + + + _columns = { - 'name': fields.function(_get_note_first_line, fnct_inv=_set_note_first_line, string='Memo Summary', type='text'), - 'note': fields.html('Pad Content'), + 'name': fields.function(_get_note_first_line, + fnct_inv=_set_note_first_line, + string='Memo Summary', + type='text', + store=True), + 'memo': fields.html('Pad Content'), 'sequence': fields.integer('Sequence'), # the stage_id depending on the uid 'stage_id': fields.many2one('note.stage', 'Stage'), @@ -136,24 +135,35 @@ class note_note(osv.osv): #'stage_ids': fields.many2many('note.stage','note_stage_rel','note_id','stage_id','Linked stages users'), 'active': fields.boolean('Active'), - # when the user unactivate the note, record de date for un display note after 1 days + # when the user unactivate the memo, record de date for un display memo after 1 days 'date_done': fields.date('Date done'), 'color': fields.integer('Color Index'), - # put tags on the note (optional) + # put tags on the memo (optional) 'tag_ids' : fields.many2many('note.tag','note_tags_rel','note_id','tag_id','Tags'), + + 'current_partner_id' : fields.function(_get_my_current_partner), } _constraints = [ - (_constraints_min_len,'The title (first line on the memo) must have at least one character.',['note']), + (_constraints_min_len,'The title (first line on the memo) must have at least one character.',['memo']), ] _defaults = { 'active' : 1, 'stage_id' : _get_default_stage_id, - 'note': " " + 'memo': " " } _order = 'sequence asc' - _group_by_full = { - 'stage_id' : _read_group_stage_ids, - } + +#upgrade config setting page to configure pad, fancy and tags mode +class note_base_config_settings(osv.osv_memory): + _inherit = 'base.config.settings' + _columns = { + #install of the note_pad module => automatic with "module_" + 'module_note_pad': fields.boolean('Use an etherpad'), + #auto group user => automatic with "group_" + 'group_note_fancy': fields.boolean('Use fancy render', implied_group='note.group_note_fancy'), + 'group_note_tags': fields.boolean('Use tags for memo', implied_group='note.group_note_tags'), + 'group_note_thread': fields.boolean('Use mail thread and follower', implied_group='note.group_note_thread'), + } diff --git a/addons/note/note_demo.xml b/addons/note/note_demo.xml index c46846c53f7..22ed73deca3 100644 --- a/addons/note/note_demo.xml +++ b/addons/note/note_demo.xml @@ -3,7 +3,7 @@ <data> <record id="note_1" model="note.note"> - <field name="note"><![CDATA[Customer report #349872 + <field name="memo"><![CDATA[Customer report #349872 <br/><br/>* Calendar app in Home <br/>* The base_calendar module should create a menu in Home, like described above. <br/>* This module should become a main application (in the first screen at installation) @@ -17,7 +17,7 @@ </record> <record id="note_2" model="note.note"> - <field name="note"><![CDATA[Call Fabien + <field name="memo"><![CDATA[Call Fabien <br/><br/>* Followed by the telephone conversation and mail about D.544.3 ]]> </field> @@ -27,7 +27,7 @@ </record> <record id="note_3" model="note.note"> - <field name="note"><![CDATA[Call Marc + <field name="memo"><![CDATA[Call Marc <br/><br/>]]> </field> <field name="note_pad"></field> @@ -36,7 +36,7 @@ </record> <record id="note_4" model="note.note"> - <field name="note"><![CDATA[Project N.947.5 + <field name="memo"><![CDATA[Project N.947.5 <br/><br/>]]> </field> <field name="note_pad"></field> @@ -45,7 +45,7 @@ </record> <record id="note_5" model="note.note"> - <field name="note"><![CDATA[Shop for family dinner + <field name="memo"><![CDATA[Shop for family dinner <br/>* stuffed turkey <br/>* wine ]]> @@ -56,9 +56,9 @@ </record> <record id="note_6" model="note.note"> - <field name="note"><![CDATA[Idea to develop + <field name="memo"><![CDATA[Idea to develop <br/><br/>* Create a module note_pad - it transforms the html editable note text field into widget='pad', similar to project_pad depends on 'note' and 'pad' modules + it transforms the html editable memo text field into widget='pad', similar to project_pad depends on 'memo' and 'pad' modules ]]> </field> <field name="note_pad"></field> @@ -67,7 +67,7 @@ </record> <record id="note_7" model="note.note"> - <field name="note"><![CDATA[Read some documentation about OpenERP before diving into the code + <field name="memo"><![CDATA[Read some documentation about OpenERP before diving into the code <br/><br/>* Open ERP: a modern approach to integrated business management <br/>* Open ERP for Retail and Industrial Management ]]> @@ -78,7 +78,7 @@ </record> <record id="note_8" model="note.note"> - <field name="note"><![CDATA[New computer specs + <field name="memo"><![CDATA[New computer specs <br/><br/>* Motherboard according to processor <br/>* Processor @@ -102,7 +102,7 @@ </record> <record id="note_9" model="note.note"> - <field name="note"><![CDATA[Read those books + <field name="memo"><![CDATA[Read those books <br/><br/>* Open ERP: a modern approach to integrated business management <br/>* Open ERP for Retail and Industrial Management ]]> @@ -113,7 +113,7 @@ </record> <record id="note_10" model="note.note"> - <field name="note"><![CDATA[Read some documentation about OpenERP before diving into the code + <field name="memo"><![CDATA[Read some documentation about OpenERP before diving into the code <br/><br/>* Open ERP: a modern approach to integrated business management <br/>* Open ERP for Retail and Industrial Management ]]> @@ -124,7 +124,7 @@ </record> <record id="note_11" model="note.note"> - <field name="note"><![CDATA[Read those books + <field name="memo"><![CDATA[Read those books <br/><br/>* Open ERP: a modern approach to integrated business management <br/>* Open ERP for Retail and Industrial Management ]]> @@ -136,7 +136,7 @@ </record> <record id="note_12" model="note.note"> - <field name="note"><![CDATA[Read some documentation about OpenERP before diving into the code + <field name="memo"><![CDATA[Read some documentation about OpenERP before diving into the code <br/><br/>* Open ERP: a modern approach to integrated business management <br/>* Open ERP for Retail and Industrial Management ]]> @@ -148,7 +148,7 @@ </record> <record id="note_13" model="note.note"> - <field name="note"><![CDATA[Read those books + <field name="memo"><![CDATA[Read those books <br/><br/>* Open ERP: a modern approach to integrated business management <br/>* Open ERP for Retail and Industrial Management ]]> diff --git a/addons/note/note_view.xml b/addons/note/note_view.xml index 2a2d7d8af8a..763489b0fd7 100644 --- a/addons/note/note_view.xml +++ b/addons/note/note_view.xml @@ -4,7 +4,7 @@ <menuitem name="Organizer" id="note_my_stuff" parent="mail.mail_feeds_main"/> - <!-- Note Stage Form View --> + <!-- memo Stage Form View --> <record model="ir.ui.view" id="view_note_stage_form"> <field name="name">note.stage.form</field> <field name="model">note.stage</field> @@ -17,7 +17,7 @@ </field> </record> - <!-- Note Stage Tree View --> + <!-- memo Stage Tree View --> <record model="ir.ui.view" id="view_note_stage_tree"> <field name="name">note.stage.tree</field> <field name="model">note.stage</field> @@ -31,7 +31,7 @@ </field> </record> - <!-- Note Stage Action --> + <!-- memo Stage Action --> <record model="ir.actions.act_window" id="action_note_stage"> <field name="name">Stages</field> <field name="res_model">note.stage</field> @@ -42,7 +42,7 @@ <menuitem name="Categories" id="menu_notes_stage" parent="note_my_stuff" action="action_note_stage" sequence="40" groups="base.group_no_one"/> - <!-- New Note Kanban View --> + <!-- New memo Kanban View --> <record model="ir.ui.view" id="view_note_note_kanban"> <field name="name">note.note.kanban</field> <field name="model">note.note</field> @@ -53,49 +53,58 @@ <field name="name"/> <field name="stage_id"/> <field name="active"/> - <field name="note"/> + <field name="memo"/> <field name="date_done"/> + <field name="current_partner_id"/> <field name="message_follower_ids"/> + <field name="tag_ids"/> <templates> <t t-name="kanban-box"> - <div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click oe_semantic_html_override "> + + <t t-set="record.group_fancy" t-value="1" groups="note.group_note_fancy"/> + + <div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_global_click_edit oe_semantic_html_override oe_kanban_card #{record.group_fancy==1 ? 'oe_kanban_card_fancy' : ''}"> <div class="oe_dropdown_kanban"> <span> - <a name="onclick_note_is_done" type="object" t-if="record.active.raw_value" class="oe_e">D</a> - <a name="onclick_note_not_done" type="object" t-if="!record.active.raw_value" class="oe_e">C</a> + <a name="onclick_note_is_done" type="object" t-if="record.active.raw_value" class="oe_e">W</a> + <a name="onclick_note_not_done" type="object" t-if="!record.active.raw_value" class="oe_e">è</a> </span> <!-- dropdown menu --> <div class="oe_dropdown_toggle"> <span class="oe_e">í</span> <ul class="oe_dropdown_menu"> - <li><a type="edit">Edit...</a></li> <li><a type="delete">Delete</a></li> <li><ul class="oe_kanban_colorpicker" data-field="color"/></li> </ul> </div> </div> - <!-- kanban note --> + <!-- kanban memo --> <div t-attf-class="oe_kanban_content #{record.active.raw_value ? '' : 'note_text_line_through'}"> <!-- title --> <field name="name"/> </div> + <div class="oe_left oe_kanban_list_many2many" data-model="note.tag" groups="note.group_note_tags"> + <t t-foreach="record.tag_ids.raw_value" t-as="tag"> + <span class="oe_tag" t-att-data-list_id="tag"/> + </t> + </div> <div class="oe_right"> <t t-foreach="record.message_follower_ids.raw_value" t-as="follower"> - <img t-att-src="kanban_image('res.partner', 'image_small', follower)" width="24" height="24" class="oe_kanban_avatar" t-att-data-member_id="follower"/> + <img t-if="record.current_partner_id.raw_value!=follower" t-att-src="kanban_image('res.partner', 'image_small', follower)" width="24" height="24" class="oe_kanban_avatar" t-att-data-member_id="follower"/> </t> </div> + <div class="oe_clear"></div> </div> - <div class="oe_clear"></div> </t> </templates> </kanban> </field> </record> - <!-- New Note Form View --> + <!-- New memo Form View --> <record model="ir.ui.view" id="view_note_note_form"> <field name="name">note.note.form</field> <field name="model">note.note</field> @@ -104,38 +113,74 @@ <header> <field name="stage_id" domain="[('user_id','=',uid)]" widget="statusbar" clickable="1"/> </header> - <field colspan="4" name="note" widget="html" editor_width="100%%" editor_height="400px" nolabel="1"/> - <group> - <field name="tag_ids" widget="many2many_tags" group="group_note_tags"/> + <field colspan="4" name="memo" widget="html" editor_width="100%%" editor_height="400px" nolabel="1"/> + <group groups="note.group_note_tags" col="2"> + <field name="tag_ids" widget="many2many_tags"/> </group> - <div class="oe_chatter"> + <div class="oe_chatter" groups="note.group_note_thread"> <field name="message_ids" widget="mail_thread"/> + <field name="message_follower_ids" widget="mail_followers"/> </div> </form> </field> </record> - <!-- Search Note --> + <!-- Search memo --> <record model="ir.ui.view" id="view_note_note_filter"> <field name="name">note.note.search</field> <field name="model">note.note</field> <field name="arch" type="xml"> <search string="Memos"> - <field name="note" string="Memo"/> + <field name="name" string="Title"/> + <field name="memo" string="Memo"/> <field name="stage_id"/> + <field name="tag_ids" groups="note.group_note_tags"/> <filter name="active_true" string="Active" domain="['|',('active', '=', True),('date_done','=',time.strftime('%%Y-%%m-%%d'))]"/> <filter name="active_false" string="Old" domain="[('active', '=', False)]"/> <group expand="0" string="Group By..."> <filter icon="terp-personal" string="Creator" help="By Creators" context="{'group_by':'create_uid'}"/> - <filter icon="terp-stock_symbol-selection" string="Stage" help="By Note Category" context="{'group_by':'stage_id'}"/> + <filter icon="terp-stock_symbol-selection" string="Stage" help="By memo Category" context="{'group_by':'stage_id'}"/> </group> </search> </field> </record> - <!-- Note Action --> + + <!-- general settings --> + <record model="ir.ui.view" id="view_general_settings_note_form"> + <field name="name">note.view.general_settings.form</field> + <field name="model">base.config.settings</field> + <field name="inherit_id" ref="base_setup.view_general_configuration"/> + <field name="arch" type="xml"> + <xpath expr="//label[@string='Authentication']/.." position="after"> + <group> + <label for="id" string="Memos"/> + <div> + <div> + <field name="module_note_pad" class="oe_inline"/> + <label for="module_note_pad"/> + </div> + <div> + <field name="group_note_fancy" class="oe_inline"/> + <label for="group_note_fancy"/> + </div> + <div> + <field name="group_note_tags" class="oe_inline"/> + <label for="group_note_tags"/> + </div> + <div> + <field name="group_note_thread" class="oe_inline"/> + <label for="group_note_thread"/> + </div> + </div> + </group> + </xpath> + </field> + </record> + + <!-- memo Action --> <record model="ir.actions.act_window" id="action_note_note"> - <field name="name">Notes</field> + <field name="name">note</field> <field name="res_model">note.note</field> <field name="view_type">form</field> <field name="view_mode">kanban,tree,form</field> @@ -143,7 +188,7 @@ <field name="context">{'search_default_active_true':True}</field> </record> - <menuitem name="Notes" id="note_notes" parent="note_my_stuff" sequence="20" action="action_note_note"/> + <menuitem name="Memos" id="note_notes" parent="note_my_stuff" sequence="20" action="action_note_note"/> </data> </openerp>
\ No newline at end of file diff --git a/addons/note/security/ir.model.access.csv b/addons/note/security/ir.model.access.csv index fdd6030ca51..fe523cdd2ee 100644 --- a/addons/note/security/ir.model.access.csv +++ b/addons/note/security/ir.model.access.csv @@ -1,3 +1,3 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_note_stage_user,note.stage user,model_note_stage,base.group_user,1,1,1,1
-access_note_note_user,note.note user,model_note_note,base.group_user,1,1,1,1
+access_note_stage_user,note.stage,model_note_stage,base.group_user,1,1,1,1
+access_note_note_user,note.note,model_note_note,base.group_user,1,1,1,1
diff --git a/addons/note/security/res.groups.csv b/addons/note/security/res.groups.csv index 61f38c84104..5ce1df4106c 100644 --- a/addons/note/security/res.groups.csv +++ b/addons/note/security/res.groups.csv @@ -1,3 +1,4 @@ id,name,implied_ids/id
-group_note_tags,Note : display tags,
-group_note_fancy,Note : fancy mode,
+group_note_tags,Memo / Display tags,
+group_note_fancy,Memo / Fancy mode,
+group_note_thread,Memo / Mail thread,
diff --git a/addons/note/static/src/css/Makefile b/addons/note/static/src/css/Makefile index d6019f4ed4a..91b3abc9333 100644 --- a/addons/note/static/src/css/Makefile +++ b/addons/note/static/src/css/Makefile @@ -1,3 +1,3 @@ -note.css: note.sass - sass -t expanded note.sass note.css +memo.css: memo.sass + sass -t expanded memo.sass memo.css diff --git a/addons/note/static/src/css/note.css b/addons/note/static/src/css/note.css index 60d7541097e..6ada8d6cd14 100644 --- a/addons/note/static/src/css/note.css +++ b/addons/note/static/src/css/note.css @@ -71,3 +71,73 @@ .oe_kanban_column .note_text_line_through { text-decoration: line-through; } + +.openerp .oe_fold_column .oe_kanban_card_fancy { + text-decoration: none; + color: black; + display: block; + padding: 1em; + margin-right: 1em; + margin-bottom: 1em; + -moz-box-shadow: 5px 5px 7px #212121; + -webkit-box-shadow: 5px 5px 7px rgba(33, 33, 33, 0.7); + box-shadow: 5px 5px 7px rgba(33, 33, 33, 0.7); +} + +.openerp .oe_kanban_record .oe_kanban_card_fancy { + -webkit-transform: rotate(-2deg); + -o-transform: rotate(-2deg); + -moz-transform: rotate(-2deg); +} +.openerp .oe_kanban_record:nth-of-type(even) .oe_kanban_card_fancy { + -webkit-transform: rotate(1deg); + -o-transform: rotate(1deg); + -moz-transform: rotate(1deg); +} +.openerp .oe_kanban_record:nth-of-type(3n) .oe_kanban_card_fancy { + -webkit-transform: rotate(4deg); + -o-transform: rotate(4deg); + -moz-transform: rotate(4deg); +} +.openerp .oe_kanban_column:nth-of-type(even) .oe_kanban_card_fancy { + -webkit-transform: rotate(2deg); + -o-transform: rotate(2deg); + -moz-transform: rotate(2deg); +} +.openerp .oe_kanban_column:nth-of-type(even) .oe_kanban_record:nth-of-type(even) .oe_kanban_card_fancy { + -webkit-transform: rotate(-3deg); + -o-transform: rotate(-3deg); + -moz-transform: rotate(-3deg); +} +.openerp .oe_kanban_column:nth-of-type(even) .oe_kanban_record:nth-of-type(3n) .oe_kanban_card_fancy { + -webkit-transform: rotate(1deg); + -o-transform: rotate(1deg); + -moz-transform: rotate(1deg); +} +.openerp .oe_kanban_column:nth-of-type(3n) .oe_kanban_card_fancy { + -webkit-transform: rotate(-2deg); + -o-transform: rotate(-2deg); + -moz-transform: rotate(-2deg); +} +.openerp .oe_kanban_column:nth-of-type(3n) .oe_kanban_record:nth-of-type(even) .oe_kanban_card_fancy { + -webkit-transform: rotate(1deg); + -o-transform: rotate(1deg); + -moz-transform: rotate(1deg); +} +.openerp .oe_kanban_column:nth-of-type(3n) .oe_kanban_record:nth-of-type(3n) .oe_kanban_card_fancy { + -webkit-transform: rotate(-1deg); + -o-transform: rotate(-1deg); + -moz-transform: rotate(-1deg); +} + +.openerp .oe_kanban_column .oe_fold_column .oe_kanban_card_fancy:hover, +.openerp .oe_kanban_column .oe_fold_column .oe_kanban_card_fancy:focus { + box-shadow: 10px 10px 7px rgba(0, 0, 0, 0.7); + -moz-box-shadow: 10px 10px 7px rgba(0, 0, 0, 0.7); + -webkit-box-shadow: 10px 10px 7px rgba(0, 0, 0, 0.7); + position: relative; + z-index: 5; + -webkit-transform: rotate(0); + -o-transform: rotate(0); + -moz-transform: rotate(0); +} diff --git a/addons/note/static/src/css/note.sass b/addons/note/static/src/css/note.sass index 92cb0c9bcd8..56aa91abc44 100644 --- a/addons/note/static/src/css/note.sass +++ b/addons/note/static/src/css/note.sass @@ -42,10 +42,10 @@ $sheet-max-width: 860px background-color: $startColor background-image: -webkit-gradient(linear, left top, left bottom, from($startColor), to($endColor)) /* Saf4+, Chrome */ background-image: -webkit-linear-gradient(top, $startColor, $endColor) /* Chrome 10+, Saf5.1+, iOS 5+ */ - background-image: -moz-linear-gradient(top, $startColor, $endColor) /* FF3.6 */ - background-image: -ms-linear-gradient(top, $startColor, $endColor) /* IE10 */ - background-image: -o-linear-gradient(top, $startColor, $endColor) /* Opera 11.10+ */ - background-image: linear-gradient(to bottom, $startColor, $endColor) + background-image: -moz-linear-gradient(top, $startColor, $endColor) /* FF3.6 */ + background-image: -ms-linear-gradient(top, $startColor, $endColor) /* IE10 */ + background-image: -o-linear-gradient(top, $startColor, $endColor) /* Opera 11.10+ */ + background-image: linear-gradient(to bottom, $startColor, $endColor) @mixin radial-gradient($gradient) background-position: center center @@ -93,7 +93,7 @@ $sheet-max-width: 860px font-size: 1px letter-spacing: -1px color: transparent - &:before + &: before font: 21px "mnmliconsRegular" content: $icon-name color: $color @@ -133,7 +133,77 @@ $sheet-max-width: 860px .oe_kanban_color_2 background-color: red -// au BufWritePost,FileWritePost *.sass :!sass --style expanded --line-numbers <afile> > "%:p:r.css" - -.oe_kanban_column .note_text_line_through - text-decoration: line-through +// au BufWritePost,FileWritePost *.sass : !sass --style expanded --line-numbers <afile> > "%: p: r.css" + +.oe_kanban_column + .note_text_line_through + text-decoration: line-through + + +.openerp + .oe_fold_column + .oe_kanban_card_fancy + text-decoration: none + color: #000 + display: block + padding: 1em + margin-right: 1em + margin-bottom: 1em + -moz-box-shadow: 5px 5px 7px rgba(33,33,33,1) + -webkit-box-shadow: 5px 5px 7px rgba(33,33,33,.7) + box-shadow: 5px 5px 7px rgba(33,33,33,.7) + + +@mixin rotate($a) + -webkit-transform: rotate($a) + -o-transform: rotate($a) + -moz-transform: rotate($a) + +.openerp + .oe_kanban_record + .oe_kanban_card_fancy + @include rotate(-2deg) + .oe_kanban_record:nth-of-type(even) + .oe_kanban_card_fancy + @include rotate(1deg) + .oe_kanban_record:nth-of-type(3n) + .oe_kanban_card_fancy + @include rotate(4deg) + .oe_kanban_column:nth-of-type(even) + .oe_kanban_card_fancy + @include rotate(2deg) + .oe_kanban_column:nth-of-type(even) + .oe_kanban_record:nth-of-type(even) + .oe_kanban_card_fancy + @include rotate(-3deg) + .oe_kanban_column:nth-of-type(even) + .oe_kanban_record:nth-of-type(3n) + .oe_kanban_card_fancy + @include rotate(1deg) + .oe_kanban_column:nth-of-type(3n) + .oe_kanban_card_fancy + @include rotate(-2deg) + .oe_kanban_column:nth-of-type(3n) + .oe_kanban_record:nth-of-type(even) + .oe_kanban_card_fancy + @include rotate(1deg) + .oe_kanban_column:nth-of-type(3n) + .oe_kanban_record:nth-of-type(3n) + .oe_kanban_card_fancy + @include rotate(-1deg) + + +@mixin oe_kanban_card_fancy + box-shadow: 10px 10px 7px rgba(0,0,0,.7) + -moz-box-shadow: 10px 10px 7px rgba(0,0,0,.7) + -webkit-box-shadow: 10px 10px 7px rgba(0,0,0,.7) + position: relative + z-index: 5 + @include rotate(0) + +.openerp + .oe_kanban_column + .oe_fold_column + .oe_kanban_card_fancy:hover, + .oe_kanban_card_fancy:focus + @include oe_kanban_card_fancy diff --git a/addons/note_pad/__init__.py b/addons/note_pad/__init__.py index 44a484adac4..75aae47f772 100644 --- a/addons/note_pad/__init__.py +++ b/addons/note_pad/__init__.py @@ -19,5 +19,5 @@ # ############################################################################## -import note_pad +import memo_pad diff --git a/addons/note_pad/__openerp__.py b/addons/note_pad/__openerp__.py index 7eee5eee487..1a40ef80cc6 100644 --- a/addons/note_pad/__openerp__.py +++ b/addons/note_pad/__openerp__.py @@ -20,19 +20,19 @@ ############################################################################## { - 'name': 'Notes pad', + 'name': 'Memos pad', 'version': '0.1', 'category': 'Tools', 'description': """ -This module update notes inside OpenERP for using an external pad +This module update memos inside OpenERP for using an external pad =================================================================== -Use for update your text note in real time with the following user that you invite. +Use for update your text memo in real time with the following user that you invite. """, 'author': 'OpenERP SA', 'website': 'http://openerp.com', - 'summary': 'Sticky Notes, Collaborative', + 'summary': 'Sticky memos, Collaborative', 'depends': [ 'base_tools', 'mail', diff --git a/addons/note_pad/note_pad.py b/addons/note_pad/note_pad.py index 73cc9d76a62..673867afd53 100644 --- a/addons/note_pad/note_pad.py +++ b/addons/note_pad/note_pad.py @@ -23,13 +23,13 @@ from openerp.osv import osv, fields from tools.translate import _ class note_pad_note(osv.osv): - """ Note pad """ + """ memo pad """ _name = 'note.note' _inherit = ['pad.common','note.note'] _pad_fields = ['note_pad'] - _description = "Note pad" + _description = "Memo pad" _columns = { 'note_pad_url': fields.char('Pad Url', size=250), diff --git a/addons/note_pad/note_pad_view.xml b/addons/note_pad/note_pad_view.xml index fd5c48d7f2a..eec7735d488 100644 --- a/addons/note_pad/note_pad_view.xml +++ b/addons/note_pad/note_pad_view.xml @@ -8,7 +8,7 @@ <field name="arch" type="xml"> <field name="note" position="replace"> <field name="note_pad_url" invisible="1"/> - <field name="name"/> + <field name="name" widget="pad"/> </field> </field> </record> |
