diff options
| author | Fabien Pinckaers <fp@tinyerp.com> | 2012-09-19 16:44:49 +0200 |
|---|---|---|
| committer | Fabien Pinckaers <fp@tinyerp.com> | 2012-09-19 16:44:49 +0200 |
| commit | e4a91b4900a3d7e52cf72bc67c99279c7891e21c (patch) | |
| tree | 9ba9ba4543edc44ea23588b6f89df07836944cc4 /addons | |
| parent | 16f52fcdb8dcce2b2db24d506679729e31fc094e (diff) | |
| parent | 8e3aa494f183f6cc1354c822bc4e3c1c4429ea4b (diff) | |
merge
bzr revid: fp@tinyerp.com-20120919144449-au27d611umh2fr1w
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/base_calendar/__openerp__.py | 3 | ||||
| -rw-r--r-- | addons/base_calendar/base_calendar_view.xml | 1 | ||||
| -rw-r--r-- | addons/base_calendar/static/src/img/icon.png | bin | 0 -> 7726 bytes | |||
| -rw-r--r-- | addons/contacts/__init__.py | 21 | ||||
| -rw-r--r-- | addons/contacts/__openerp__.py | 44 | ||||
| -rw-r--r-- | addons/contacts/contacts_view.xml | 53 | ||||
| -rw-r--r-- | addons/contacts/static/src/img/icon.png | bin | 0 -> 51524 bytes | |||
| -rw-r--r-- | addons/mail/mail_thread_view.xml | 3 | ||||
| -rw-r--r-- | addons/note/__openerp__.py | 6 | ||||
| -rw-r--r-- | addons/note/note.py | 10 | ||||
| -rw-r--r-- | addons/note/note_demo.xml | 22 | ||||
| -rw-r--r-- | addons/note/note_view.xml | 11 | ||||
| -rw-r--r-- | addons/note_pad/note_pad.py | 10 | ||||
| -rw-r--r-- | addons/pad/pad.py | 23 | ||||
| -rw-r--r-- | addons/pad/static/src/js/pad.js | 9 |
15 files changed, 165 insertions, 51 deletions
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"/> + <menuitem name="Agenda" id="mail_menu_agenda" parent="mail.mail_my_stuff" sequence="10" action="action_view_event"/> </data> </openerp> diff --git a/addons/base_calendar/static/src/img/icon.png b/addons/base_calendar/static/src/img/icon.png Binary files differnew file mode 100644 index 00000000000..f612cd9ea4b --- /dev/null +++ b/addons/base_calendar/static/src/img/icon.png 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 (<http://tiny.be>). +# +# 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 <http://www.gnu.org/licenses/>. +# +############################################################################## + 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 (<http://tiny.be>). +# +# 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 <http://www.gnu.org/licenses/>. +# +############################################################################## + +{ + '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 @@ +<?xml version="1.0" ?> +<openerp> + <data> + + + <record id="action_contacts" model="ir.actions.act_window"> + <field name="name">Contacts</field> + <field name="type">ir.actions.act_window</field> + <field name="res_model">res.partner</field> + <field name="view_type">form</field> + <field name="view_mode">kanban,tree,form</field> + <field name="search_view_id" ref="base.view_res_partner_filter"/> + <field name="help" type="html"> + <p class="oe_view_nocontent_create"> + Click to add a contact in your address book. + </p><p> + OpenERP helps you easily track all activities related to + a customer; discussions, history of business opportunities, + documents, etc. + </p> + </field> + </record> + + <record id="action_contacts_view_kanban" model="ir.actions.act_window.view"> + <field eval="0" name="sequence"/> + <field name="view_mode">kanban</field> + <field name="view_id" ref="base.res_partner_kanban_view"/> + <field name="act_window_id" ref="action_contacts"/> + </record> + <record id="action_contacts_view_tree" model="ir.actions.act_window.view"> + <field name="sequence" eval="1"/> + <field name="view_mode">tree</field> + <field name="view_id" ref="base.view_partner_tree"/> + <field name="act_window_id" ref="action_contacts"/> + </record> + <record id="action_contacts_view_form" model="ir.actions.act_window.view"> + <field eval="2" name="sequence"/> + <field name="view_mode">form</field> + <field name="view_id" ref="base.view_partner_form"/> + <field name="act_window_id" ref="action_contacts"/> + </record> + + <menuitem name="Contacts" + id="menu_contacts" + parent="mail.mail_my_stuff" + sequence="11" + action="action_contacts" + groups="base.group_user,base.group_partner_manager"/> + + </data> +</openerp> + + diff --git a/addons/contacts/static/src/img/icon.png b/addons/contacts/static/src/img/icon.png Binary files differnew file mode 100644 index 00000000000..dc9f8ee3422 --- /dev/null +++ b/addons/contacts/static/src/img/icon.png 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"/> <!-- Left-side menu: Feeds --> - <menuitem id="mail_feeds" name="Feeds" parent="mail_feeds_main" groups="base.group_user" sequence="10"/> + <menuitem id="mail_feeds" name="Feeds" parent="mail.mail_feeds_main" groups="base.group_user" sequence="10"/> + <menuitem id="mail_my_stuff" name="Organizer" parent="mail.mail_feeds_main"/> <record id="mail_wallfeeds" model="ir.ui.menu"> <field name="name">My Feeds</field> 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?)(<br[ /]*>|<[/]?p>|<[/]?div>|<table>)[\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 @@ <record id="note_1" model="note.note"> <field name="name">Customer report #349872</field> - <field name="memo"><![CDATA[Customer report #349872 + <field name="memo"><![CDATA[<b>Customer report #349872</b> <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) @@ -40,7 +40,7 @@ </record> <record id="note_2" model="note.note"> - <field name="memo"><![CDATA[Call Fabien + <field name="memo"><![CDATA[<b>Call Fabien</b> <br/><br/>* Followed by the telephone conversation and mail about D.544.3 ]]> </field> @@ -48,21 +48,21 @@ </record> <record id="note_3" model="note.note"> - <field name="memo"><![CDATA[Call Marc + <field name="memo"><![CDATA[<b>Call Marc</b> <br/><br/>]]> </field> <field name="stage_id" ref="note_stage_01"/> </record> <record id="note_4" model="note.note"> - <field name="memo"><![CDATA[Project N.947.5 + <field name="memo"><![CDATA[<b>Project N.947.5</b> <br/><br/>]]> </field> <field name="stage_id" ref="note_stage_02"/> </record> <record id="note_5" model="note.note"> - <field name="memo"><![CDATA[Shop for family dinner + <field name="memo"><![CDATA[<b>Shop for family dinner</b> <br/>* stuffed turkey <br/>* wine ]]> @@ -71,7 +71,7 @@ </record> <record id="note_6" model="note.note"> - <field name="memo"><![CDATA[Idea to develop + <field name="memo"><![CDATA[<b>Idea to develop</b> <br/><br/>* 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 @@ </record> <record id="note_7" model="note.note"> - <field name="memo"><![CDATA[Read some documentation about OpenERP before diving into the code + <field name="memo"><![CDATA[<b>Read some documentation about OpenERP before diving into the code</b> <br/><br/>* Open ERP: a modern approach to integrated business management <br/>* Open ERP for Retail and Industrial Management ]]> @@ -89,7 +89,7 @@ </record> <record id="note_8" model="note.note"> - <field name="memo"><![CDATA[New computer specs + <field name="memo"><![CDATA[<b>New computer specs</b> <br/><br/>* Motherboard according to processor <br/>* Processor @@ -111,7 +111,7 @@ </record> <record id="note_9" model="note.note"> - <field name="memo"><![CDATA[Read those books + <field name="memo"><![CDATA[<b>Read those books</b> <br/><br/>* Open ERP: a modern approach to integrated business management <br/>* Open ERP for Retail and Industrial Management ]]> @@ -120,7 +120,7 @@ </record> <record id="note_10" model="note.note"> - <field name="memo"><![CDATA[Read some documentation about OpenERP before diving into the code + <field name="memo"><![CDATA[<b>Read some documentation about OpenERP before diving into the code</b> <br/><br/>* Open ERP: a modern approach to integrated business management <br/>* Open ERP for Retail and Industrial Management ]]> @@ -129,7 +129,7 @@ </record> <record id="note_12" model="note.note"> - <field name="memo"><![CDATA[Read some documentation about OpenERP before diving into the code + <field name="memo"><![CDATA[<b>Read some documentation about OpenERP before diving into the code</b> <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 ccb07544c09..8d943dde44d 100644 --- a/addons/note/note_view.xml +++ b/addons/note/note_view.xml @@ -1,8 +1,6 @@ <?xml version="1.0"?> <openerp> <data> - <menuitem name="Organizer" id="note_my_stuff" parent="mail.mail_feeds_main"/> - <!-- note Stage Form View --> <record model="ir.ui.view" id="view_note_stage_form"> <field name="name">note.stage.form</field> @@ -38,8 +36,6 @@ <field name="domain">[('user_id','=',uid)]</field> </record> - <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 --> <record model="ir.ui.view" id="view_note_note_kanban"> <field name="name">note.note.kanban</field> @@ -117,12 +113,10 @@ <field name="arch" type="xml"> <form string="Note" version="7.0"> <header> + <field name="tag_ids" widget="many2many_tags" class="oe_inline" placeholder="Tags"/> <field name="stage_id" domain="[('user_id','=',uid)]" widget="statusbar" clickable="1"/> </header> <field name="memo" widget="html"/><!-- editor_width="100%%" editor_height="60%%" --> - <group groups="note.group_note_tags" col="2"> - <field name="tag_ids" widget="many2many_tags"/> - </group> <field name="message_follower_ids" widget="mail_followers"/> <field class="oe_chatter" name="message_ids" widget="mail_thread"/> </form> @@ -185,7 +179,8 @@ <field name="context">{'search_default_open_true':True}</field> </record> - <menuitem name="Notes" id="note_notes" parent="note_my_stuff" sequence="20" action="action_note_note"/> + <menuitem name="Notes" id="menu_note_notes" parent="mail.mail_my_stuff" sequence="20" action="note.action_note_note"/> + <menuitem name="Categories" id="menu_notes_stage" parent="mail.mail_my_stuff" action="note.action_note_stage" sequence="21" groups="base.group_no_one"/> </data> </openerp> 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"); |
