commit
e4a91b4900
|
@ -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',],
|
||||
|
|
|
@ -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>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 7.5 KiB |
|
@ -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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
|
@ -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:
|
|
@ -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>
|
||||
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 50 KiB |
|
@ -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>
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
]]>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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'),
|
||||
}
|
|
@ -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:
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue