[IMP]note: remove options tags, tags for all user inside header bar

bzr revid: chm@openerp.com-20120920075031-lx6k382cd8kcyct9
This commit is contained in:
Christophe Matthieu 2012-09-20 09:50:31 +02:00
parent 8e3aa494f1
commit 3863e439d8
5 changed files with 23 additions and 13 deletions

View File

@ -185,5 +185,4 @@ class note_base_config_settings(osv.osv_memory):
_columns = {
'module_note_pad': fields.boolean('Use collaborative pads (etherpad)'),
'group_note_fancy': fields.boolean('Use fancy layouts for notes', implied_group='note.group_note_fancy'),
'group_note_tags': fields.boolean('Allow setting tags on notes', implied_group='note.group_note_tags'),
}

View File

@ -101,7 +101,7 @@
<field name="name"/>
<field name="open"/>
<field name="stage_id"/>
<field name="tag_ids" widget="many2many_tags" groups="note.group_note_tags"/>
<field name="tag_ids" widget="many2many_tags"/>
</tree>
</field>
</record>
@ -130,7 +130,7 @@
<field name="arch" type="xml">
<search string="Notes">
<field name="memo" string="Note"/>
<field name="tag_ids" groups="note.group_note_tags"/>
<field name="tag_ids"/>
<filter name="open_true" string="Active" domain="['|',('open', '=', True),('date_done','=',time.strftime('%%Y-%%m-%%d'))]"/>
<filter name="open_false" string="Archive" domain="[('open', '=', False)]"/>
<group expand="0" string="Group By...">
@ -159,10 +159,6 @@
<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>
</group>
</xpath>

View File

@ -1,3 +1,2 @@
id,name,implied_ids/id
group_note_tags,Memo / Display tags,
group_note_fancy,Memo / Fancy mode,

1 id name implied_ids/id
group_note_tags Memo / Display tags
2 group_note_fancy Memo / Fancy mode

View File

@ -22,7 +22,16 @@ class pad_common(osv.osv_memory):
salt = ''.join([s[random.randint(0, len(s) - 1)] for i in range(10)])
# contruct the url
url = '%s/p/%s-%s-%s' % (pad_server, cr.dbname.replace('_','-'), self._name, salt)
return url
key = "4DxmsNIbnQUVQMW9S9tx2oLOSjFdrx1l"
return {
"url": url,
"pad_server": pad_server,
"dbname": cr.dbname.replace('_','-'),
"name": self._name,
"salt": salt,
}
def pad_get_content(self, cr, uid, url, context=None):
content = ''
@ -57,7 +66,8 @@ class pad_common(osv.osv_memory):
for k,v in self._all_columns:
field = v.column
if hasattr(field,'pad_content_field'):
default[k] = self.pad_generate_url(cr, uid, context)
pad = self.pad_generate_url(cr, uid, context)
default[k] = pad['url']
return super(pad_common, self).copy(cr, uid, id, default, context)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -17,8 +17,14 @@ instance.web.form.FieldPad = instance.web.form.AbstractField.extend({
var _super = self._super;
_super.apply(self,[val]);
if (val === false || val === "") {
self.field_manager.dataset.call('pad_generate_url').then(function(r) {
_super.apply(self,[r]);
self.field_manager.dataset.call('pad_generate_url').then(function(data) {
_super.apply(self,[data.url]);
//var message="test value"
console.log('get :',data, this);
//setText(padID, text)
self.render_value();
});
} else {
@ -27,7 +33,7 @@ instance.web.form.FieldPad = instance.web.form.AbstractField.extend({
this._dirty_flag = true;
},
render_value: function() {
console.log("display");
console.log("FieldPad.render_value: display");
var self = this;
var value = this.get('value');