summaryrefslogtreecommitdiff
path: root/addons/note
diff options
context:
space:
mode:
authorTwinkle Christian (OpenERP) <tch@tinyerp.com>2012-09-07 13:00:38 +0530
committerTwinkle Christian (OpenERP) <tch@tinyerp.com>2012-09-07 13:00:38 +0530
commitcbd5cff60c3449c2d36ec2f193ddb9550578f476 (patch)
treebef13893f3267a9342593face5566cf1b2e00d0e /addons/note
parent8a06dd37ef4fc7791f68e9ef1a0fce7675a4a0a8 (diff)
parentac75763855853a730374365fe5b1501593fb0cc7 (diff)
[MERGE]merge with project barch main branch
bzr revid: tch@tinyerp.com-20120907073038-ezgc5cpmnost9zcm
Diffstat (limited to 'addons/note')
-rw-r--r--addons/note/note.py13
-rw-r--r--addons/note/note_demo.xml12
-rw-r--r--addons/note/note_view.xml4
-rw-r--r--addons/note/static/src/css/note.css27
4 files changed, 30 insertions, 26 deletions
diff --git a/addons/note/note.py b/addons/note/note.py
index f6a46c72c88..abc7dca297e 100644
--- a/addons/note/note.py
+++ b/addons/note/note.py
@@ -46,6 +46,9 @@ class note_note(osv.osv):
_pad_fields = ['note_pad']
_description = "Note"
+ def _set_note_first_line(self, cr, uid, id, name, value, args, context=None):
+ return self.write(cr, uid, [id], {'note': value}, context=context)
+
def _get_note_first_line(self, cr, uid, ids, name, args, context=None):
res = {}
for note in self.browse(cr, uid, ids, context=context):
@@ -61,14 +64,18 @@ class note_note(osv.osv):
stage_obj = self.pool.get('note.stage')
# only show stage groups not folded and owned by user
- search_domain = [('fold', '=', False),('user_id', '=', uid)]
+ search_domain = [('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
+
+ fold = {}
+ for stage in stage_obj.browse(cr, access_rights_uid, stage_ids, context=context):
+ fold[stage.id] = stage.fold or False
+ return result, fold
_columns = {
- 'name': fields.function(_get_note_first_line, string='Note Summary', type="text", store=True),
+ 'name': fields.function(_get_note_first_line, fnct_inv=_set_note_first_line, string='Note Summary', type="text"),
'note': fields.text('Pad Content'),
'note_pad_url': fields.char('Pad Url', size=250),
'sequence': fields.integer('Sequence'),
diff --git a/addons/note/note_demo.xml b/addons/note/note_demo.xml
index 1578b43d2f0..3535f19739f 100644
--- a/addons/note/note_demo.xml
+++ b/addons/note/note_demo.xml
@@ -54,7 +54,7 @@
<record id="note_4" model="note.note">
<field name="note"><![CDATA[Read some documentation about OpenERP before diving into the code
- * Open ERP Version 6: a modern approach to integrated business management
+ * Open ERP: a modern approach to integrated business management
* Open ERP for Retail and Industrial Management
]]>
</field>
@@ -85,7 +85,7 @@
<record id="note_6" model="note.note">
<field name="note"><![CDATA[Read those books
- * Open ERP Version 6: a modern approach to integrated business management
+ * Open ERP: a modern approach to integrated business management
* Open ERP for Retail and Industrial Management
]]>
</field>
@@ -94,7 +94,7 @@
<record id="note_7" model="note.note">
<field name="note"><![CDATA[Read some documentation about OpenERP before diving into the code
- * Open ERP Version 6: a modern approach to integrated business management
+ * Open ERP: a modern approach to integrated business management
* Open ERP for Retail and Industrial Management
]]>
</field>
@@ -103,7 +103,7 @@
<record id="note_8" model="note.note">
<field name="note"><![CDATA[Read those books
- * Open ERP Version 6: a modern approach to integrated business management
+ * Open ERP: a modern approach to integrated business management
* Open ERP for Retail and Industrial Management
]]>
</field>
@@ -113,7 +113,7 @@
<record id="note_9" model="note.note">
<field name="note"><![CDATA[Read some documentation about OpenERP before diving into the code
- * Open ERP Version 6: a modern approach to integrated business management
+ * Open ERP: a modern approach to integrated business management
* Open ERP for Retail and Industrial Management
]]>
</field>
@@ -123,7 +123,7 @@
<record id="note_10" model="note.note">
<field name="note"><![CDATA[Read those books
- * Open ERP Version 6: a modern approach to integrated business management
+ * Open ERP: a modern approach to integrated business management
* Open ERP for Retail and Industrial Management
]]>
</field>
diff --git a/addons/note/note_view.xml b/addons/note/note_view.xml
index a7c17a29869..73636ce1a9a 100644
--- a/addons/note/note_view.xml
+++ b/addons/note/note_view.xml
@@ -47,7 +47,7 @@
<field name="name">note.note.kanban</field>
<field name="model">note.note</field>
<field name="arch" type="xml">
- <kanban default_group_by="stage_id">
+ <kanban default_group_by="stage_id" class="oe_notes" version="7.0">
<field name="color"/>
<field name="sequence"/>
<field name="name"/>
@@ -57,7 +57,7 @@
<field name="follower_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">
+ <div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click oe_semantic_html_override">
<!-- dropdown menu -->
<div class="oe_dropdown_toggle oe_dropdown_kanban">
<span class="oe_e">í</span>
diff --git a/addons/note/static/src/css/note.css b/addons/note/static/src/css/note.css
index e5a3d1455c2..7e79438b46a 100644
--- a/addons/note/static/src/css/note.css
+++ b/addons/note/static/src/css/note.css
@@ -1,6 +1,4 @@
-
-
-.openerp .oe_fold_column .oe_kanban_card {
+.openerp .oe_notes .oe_fold_column .oe_kanban_card {
text-decoration:none;
color:#000;
display:block;
@@ -13,63 +11,62 @@
box-shadow: 5px 5px 7px rgba(33,33,33,.7);
}
-.oe_kanban_record .oe_kanban_card {
+.openerp .oe_notes .oe_kanban_record .oe_kanban_card {
-webkit-transform: rotate(-2deg);
-o-transform: rotate(-2deg);
-moz-transform:rotate(-2deg);
}
-.oe_kanban_record:nth-of-type(even) .oe_kanban_card {
+.openerp .oe_notes .oe_kanban_record:nth-of-type(even) .oe_kanban_card {
-webkit-transform: rotate(1deg);
-o-transform: rotate(1deg);
-moz-transform:rotate(1deg);
}
-.oe_kanban_record:nth-of-type(3n) .oe_kanban_card {
+.openerp .oe_notes .oe_kanban_record:nth-of-type(3n) .oe_kanban_card {
-webkit-transform: rotate(4deg);
-o-transform: rotate(4deg);
-moz-transform:rotate(4deg);
}
-.oe_kanban_column:nth-of-type(even) .oe_kanban_record .oe_kanban_card {
+.openerp .oe_notes .oe_kanban_column:nth-of-type(even) .oe_kanban_record .oe_kanban_card {
-webkit-transform: rotate(2deg);
-o-transform: rotate(2deg);
-moz-transform:rotate(2deg);
}
-.oe_kanban_column:nth-of-type(even) .oe_kanban_record:nth-of-type(even) .oe_kanban_card {
+.openerp .oe_notes .oe_kanban_column:nth-of-type(even) .oe_kanban_record:nth-of-type(even) .oe_kanban_card {
-webkit-transform: rotate(-3deg);
-o-transform: rotate(-3deg);
-moz-transform:rotate(-3deg);
}
-.oe_kanban_column:nth-of-type(even) .oe_kanban_record:nth-of-type(3n) .oe_kanban_card {
+.openerp .oe_notes .oe_kanban_column:nth-of-type(even) .oe_kanban_record:nth-of-type(3n) .oe_kanban_card {
-webkit-transform: rotate(1deg);
-o-transform: rotate(1deg);
-moz-transform:rotate(1deg);
}
-.oe_kanban_column:nth-of-type(3n) .oe_kanban_record .oe_kanban_card {
+.openerp .oe_notes .oe_kanban_column:nth-of-type(3n) .oe_kanban_record .oe_kanban_card {
-webkit-transform: rotate(-2deg);
-o-transform: rotate(-2deg);
-moz-transform:rotate(-2deg);
}
-.oe_kanban_column:nth-of-type(3n) .oe_kanban_record:nth-of-type(even) .oe_kanban_card {
+.openerp .oe_notes .oe_kanban_column:nth-of-type(3n) .oe_kanban_record:nth-of-type(even) .oe_kanban_card {
-webkit-transform: rotate(1deg);
-o-transform: rotate(1deg);
-moz-transform:rotate(1deg);
}
-.oe_kanban_column:nth-of-type(3n) .oe_kanban_record:nth-of-type(3n) .oe_kanban_card {
+.openerp .oe_notes .oe_kanban_column:nth-of-type(3n) .oe_kanban_record:nth-of-type(3n) .oe_kanban_card {
-webkit-transform: rotate(-1deg);
-o-transform: rotate(-1deg);
-moz-transform:rotate(-1deg);
}
-.openerp .oe_kanban_column .oe_fold_column .oe_kanban_card:hover,
-.openerp .oe_kanban_column .oe_fold_column .oe_kanban_card:focus
-{
+.openerp .oe_notes .oe_kanban_column .oe_fold_column .oe_kanban_card:hover,
+.openerp .oe_notes .oe_kanban_column .oe_fold_column .oe_kanban_card:focus {
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);