diff --git a/addons/base_calendar/__openerp__.py b/addons/base_calendar/__openerp__.py index 48ec05e2e92..b1afacfbd01 100644 --- a/addons/base_calendar/__openerp__.py +++ b/addons/base_calendar/__openerp__.py @@ -20,7 +20,7 @@ ############################################################################## { - 'name': 'Calendar Layer', + 'name': 'Calendar', 'version': '1.0', 'depends': ['base', 'base_status', 'mail', 'base_action_rule'], 'description': """ @@ -51,6 +51,7 @@ If you need to manage your meetings, you should install the CRM module. ], 'test' : ['test/base_calendar_test.yml'], 'installable': True, + 'application': True, 'auto_install': False, 'certificate': '00694071962960352821', 'images': ['images/base_calendar1.jpeg','images/base_calendar2.jpeg','images/base_calendar3.jpeg','images/base_calendar4.jpeg',], diff --git a/addons/base_calendar/base_calendar_view.xml b/addons/base_calendar/base_calendar_view.xml index 0ea2be4f37f..d374c2e6d88 100644 --- a/addons/base_calendar/base_calendar_view.xml +++ b/addons/base_calendar/base_calendar_view.xml @@ -428,5 +428,6 @@ name="Events" parent="base.menu_calendar_configuration" sequence="15" action="action_view_event"/> + diff --git a/addons/base_calendar/static/src/img/icon.png b/addons/base_calendar/static/src/img/icon.png new file mode 100644 index 00000000000..f612cd9ea4b Binary files /dev/null and b/addons/base_calendar/static/src/img/icon.png differ diff --git a/addons/contacts/__init__.py b/addons/contacts/__init__.py new file mode 100644 index 00000000000..26c654db9dd --- /dev/null +++ b/addons/contacts/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + diff --git a/addons/contacts/__openerp__.py b/addons/contacts/__openerp__.py new file mode 100644 index 00000000000..3b4df183478 --- /dev/null +++ b/addons/contacts/__openerp__.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +{ + 'name': 'Address Book', + 'version': '1.0', + 'category': 'Tools', + 'description': """ +This module gives you a quick view of your address book, accessible from your home page. +You can track your suppliers, customers and other contacts. +""", + 'author': 'OpenERP SA', + 'website': 'http://openerp.com', + 'summary': 'Contacts, People and Companies', + 'depends': [ + 'mail', + ], + 'data': [ + 'contacts_view.xml', + ], + 'installable': True, + 'application': True, + 'auto_install': False, +} + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/contacts/contacts_view.xml b/addons/contacts/contacts_view.xml new file mode 100644 index 00000000000..4908653aa2b --- /dev/null +++ b/addons/contacts/contacts_view.xml @@ -0,0 +1,53 @@ + + + + + + + Contacts + ir.actions.act_window + res.partner + form + kanban,tree,form + + +

+ Click to add a contact in your address book. +

+ OpenERP helps you easily track all activities related to + a customer; discussions, history of business opportunities, + documents, etc. +

+
+
+ + + + kanban + + + + + + tree + + + + + + form + + + + + + +
+
+ + diff --git a/addons/contacts/static/src/img/icon.png b/addons/contacts/static/src/img/icon.png new file mode 100644 index 00000000000..dc9f8ee3422 Binary files /dev/null and b/addons/contacts/static/src/img/icon.png differ diff --git a/addons/mail/mail_thread_view.xml b/addons/mail/mail_thread_view.xml index 34efa05f812..b4b1aade755 100644 --- a/addons/mail/mail_thread_view.xml +++ b/addons/mail/mail_thread_view.xml @@ -9,7 +9,8 @@ sequence="10"/> - + + My Feeds diff --git a/addons/note/__openerp__.py b/addons/note/__openerp__.py index 7d6cac5b85b..2c6134e5e3a 100644 --- a/addons/note/__openerp__.py +++ b/addons/note/__openerp__.py @@ -20,7 +20,7 @@ ############################################################################## { - 'name': 'Memos', + 'name': 'Notes', 'version': '1.0', 'category': 'Tools', 'description': """ @@ -28,12 +28,12 @@ This module allows users to create their own notes inside OpenERP ================================================================= Use notes to write meeting minutes, organize ideas, organize personnal todo -lists, etc. Each user manages his own personnal memos. Notes are available to +lists, etc. Each user manages his own personnal Notes. Notes are available to their authors only, but they can share notes to others users so that several people can work on the same note in real time. It's very efficient to share meeting minutes. -Memos can be found in the 'Home' menu. +Notes can be found in the 'Home' menu. """, 'author': 'OpenERP SA', 'website': 'http://openerp.com', diff --git a/addons/note/note.py b/addons/note/note.py index a7bad7f6a55..fb3f0cee853 100644 --- a/addons/note/note.py +++ b/addons/note/note.py @@ -63,11 +63,8 @@ class note_note(osv.osv): 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.memo or '').strip().split('\n')[0] - text_note = re.sub(r'(\S?)(|<[/]?p>|<[/]?div>|)[\s\S]*',r'\1',text_note) - text_note = re.sub(r'<[^>]+>','',text_note) - text_note = html2plaintext(text_note) - res[note.id] = text_note + res[note.id] = (note.memo and html2plaintext(note.memo) or "").strip().replace('*','').split("\n")[0] + return res #unactivate a sticky note and record the date @@ -98,7 +95,8 @@ class note_note(osv.osv): def _set_stage_per_user(self, cr, uid, id, name, value, args=None, context=None): note = self.browse(cr, uid, id, context=context) if not value: return False - return self.write(cr, uid, [id], {'stage_ids': [(4, value)]}, context=context) + stage_ids = [value] + [stage.id for stage in note.stage_ids if stage.user_id.id != uid ] + return self.write(cr, uid, [id], {'stage_ids': [(6, 0, stage_ids)]}, context=context) def _get_stage_per_user(self, cr, uid, ids, name, args, context=None): result = dict.fromkeys(ids, False) diff --git a/addons/note/note_demo.xml b/addons/note/note_demo.xml index 1cc1b2fc790..16fa5a3f66b 100644 --- a/addons/note/note_demo.xml +++ b/addons/note/note_demo.xml @@ -28,7 +28,7 @@ Customer report #349872 - Customer report #349872

* Calendar app in Home
* The base_calendar module should create a menu in Home, like described above.
* This module should become a main application (in the first screen at installation) @@ -40,7 +40,7 @@
- Call Fabien

* Followed by the telephone conversation and mail about D.544.3 ]]>
@@ -48,21 +48,21 @@
- Call Marc

]]>
- Project N.947.5

]]>
- Shop for family dinner
* stuffed turkey
* wine ]]> @@ -71,7 +71,7 @@
- Idea to develop

* Create a module note_pad it transforms the html editable memo text field into widget='pad', similar to project_pad depends on 'memo' and 'pad' modules ]]> @@ -80,7 +80,7 @@
- Read some documentation about OpenERP before diving into the code

* Open ERP: a modern approach to integrated business management
* Open ERP for Retail and Industrial Management ]]> @@ -89,7 +89,7 @@
- New computer specs

* Motherboard according to processor
* Processor @@ -111,7 +111,7 @@
- Read those books

* Open ERP: a modern approach to integrated business management
* Open ERP for Retail and Industrial Management ]]> @@ -120,7 +120,7 @@
- Read some documentation about OpenERP before diving into the code

* Open ERP: a modern approach to integrated business management
* Open ERP for Retail and Industrial Management ]]> @@ -129,7 +129,7 @@
- Read some documentation about OpenERP before diving into the code

* Open ERP: a modern approach to integrated business management
* Open ERP for Retail and Industrial Management ]]> diff --git a/addons/note/note_view.xml b/addons/note/note_view.xml index ccb07544c09..8d943dde44d 100644 --- a/addons/note/note_view.xml +++ b/addons/note/note_view.xml @@ -1,8 +1,6 @@ - - note.stage.form @@ -38,8 +36,6 @@ [('user_id','=',uid)] - - note.note.kanban @@ -117,12 +113,10 @@
+
- - - @@ -185,7 +179,8 @@ {'search_default_open_true':True}
- + +
diff --git a/addons/note_pad/note_pad.py b/addons/note_pad/note_pad.py index 9864f0ae14f..d0c18a9f986 100644 --- a/addons/note_pad/note_pad.py +++ b/addons/note_pad/note_pad.py @@ -31,11 +31,5 @@ class note_pad_note(osv.osv): _pad_fields = ['note_pad'] _columns = { - 'note_pad_url': fields.char('Pad Url', - pad_content_field='memo', - size=250 ), - } - - #_defaults = { - # 'note_pad_url': lambda self, cr, uid, context: self.pad_generate_url(cr, uid, context), - #} + 'note_pad_url': fields.char('Pad Url', pad_content_field='memo'), + } \ No newline at end of file diff --git a/addons/pad/pad.py b/addons/pad/pad.py index d21ccd42d16..48ac940ccfa 100644 --- a/addons/pad/pad.py +++ b/addons/pad/pad.py @@ -21,7 +21,7 @@ class pad_common(osv.osv_memory): s = string.ascii_uppercase + string.digits 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, self._name, salt) + url = '%s/p/%s-%s-%s' % (pad_server, cr.dbname.replace('_','-'), self._name, salt) return url def pad_get_content(self, cr, uid, url, context=None): @@ -35,22 +35,21 @@ class pad_common(osv.osv_memory): # TODO # reverse engineer protocol to be setHtml without using the api key - # override read and copy to generate url and store the content if empty - - def default_get(self, cr, uid, fields, context=None): - data = super(pad_common, self).default_get(cr, uid, fields, context) - for k in fields: - field = self._all_columns[k].column - if hasattr(field,'pad_content_field'): - data[k] = self.pad_generate_url(cr, uid, context=context) - return data def write(self, cr, uid, ids, vals, context=None): + self._set_pad_value(cr, uid, vals, context) + return super(pad_common, self).write(cr, uid, ids, vals, context=context) + + def create(self, cr, uid, vals, context=None): + self._set_pad_value(cr, uid, vals, context) + return super(pad_common, self).create(cr, uid, vals, context=context) + + # Set the pad content in vals + def _set_pad_value(self, cr, uid, vals, context=None): for k,v in vals.items(): field = self._all_columns[k].column if hasattr(field,'pad_content_field'): - vals[field.pad_content_field] = self.pad_get_content(cr, uid, v, context=context) - return super(pad_common, self).write(cr, uid, ids, vals, context=context) + vals[field.pad_content_field] = self.pad_get_content(cr, uid, v, context=context) def copy(self, cr, uid, id, default=None, context=None): if not default: diff --git a/addons/pad/static/src/js/pad.js b/addons/pad/static/src/js/pad.js index 511400bcede..b7c13ba1b89 100644 --- a/addons/pad/static/src/js/pad.js +++ b/addons/pad/static/src/js/pad.js @@ -16,8 +16,15 @@ instance.web.form.FieldPad = instance.web.form.AbstractField.extend({ var self = this; 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.render_value(); + }); + } else { + self.render_value(); + } this._dirty_flag = true; - self.render_value(); }, render_value: function() { console.log("display");