+13
-12
@@ -65,7 +65,7 @@ class crm_meeting(osv.osv):
|
||||
_defaults = {
|
||||
'state': lambda *a: 'draft',
|
||||
}
|
||||
|
||||
|
||||
def open_meeting(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
Open Crm Meeting Form for Crm Meeting.
|
||||
@@ -75,13 +75,14 @@ class crm_meeting(osv.osv):
|
||||
@param context: A standard dictionary for contextual values
|
||||
@return: Dictionary value which open Crm Meeting form.
|
||||
"""
|
||||
|
||||
if not context:
|
||||
context = {}
|
||||
|
||||
|
||||
data_obj = self.pool.get('ir.model.data')
|
||||
|
||||
|
||||
value = {}
|
||||
|
||||
|
||||
id2 = data_obj._get_id(cr, uid, 'crm', 'crm_case_form_view_meet')
|
||||
id3 = data_obj._get_id(cr, uid, 'crm', 'crm_case_tree_view_meet')
|
||||
id4 = data_obj._get_id(cr, uid, 'crm', 'crm_case_calendar_view_meet')
|
||||
@@ -93,17 +94,17 @@ class crm_meeting(osv.osv):
|
||||
id4 = data_obj.browse(cr, uid, id4, context=context).res_id
|
||||
for id in ids:
|
||||
value = {
|
||||
'name': _('Meeting'),
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form,tree',
|
||||
'res_model': 'crm.meeting',
|
||||
'view_id': False,
|
||||
'name': _('Meeting'),
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form,tree',
|
||||
'res_model': 'crm.meeting',
|
||||
'view_id': False,
|
||||
'views': [(id2, 'form'), (id3, 'tree'), (id4, 'calendar')],
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_id': base_calendar.base_calendar_id2real_id(id),
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_id': base_calendar.base_calendar_id2real_id(id),
|
||||
'nodestroy': True
|
||||
}
|
||||
|
||||
|
||||
return value
|
||||
|
||||
crm_meeting()
|
||||
|
||||
@@ -231,7 +231,7 @@ class crm_opportunity(osv.osv):
|
||||
}
|
||||
value = {
|
||||
'name': _('Meetings'),
|
||||
'domain': "[('user_id','=',%s)]" % (uid),
|
||||
'domain': "[('user_id','=',%s),('opportunity_id','=',%s)]" % (uid,opp.id),
|
||||
'context': context,
|
||||
'view_type': 'form',
|
||||
'view_mode': 'calendar,form,tree',
|
||||
@@ -242,7 +242,6 @@ class crm_opportunity(osv.osv):
|
||||
'search_view_id': res['res_id'],
|
||||
'nodestroy': True
|
||||
}
|
||||
|
||||
return value
|
||||
|
||||
crm_opportunity()
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
res_model="crm.phonecall"
|
||||
src_model="crm.opportunity"
|
||||
view_mode="calendar,tree,form"
|
||||
context="{'default_duration': 1.0}"
|
||||
domain="[('user_id','=',uid)]"
|
||||
context="{'default_duration': 1.0 ,'default_opportunity_id': active_id}"
|
||||
domain="[('user_id','=',uid),('opportunity_id', '=', active_id)]"
|
||||
view_type="form"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="crm_case_category_act_oppor11">
|
||||
|
||||
@@ -29,10 +29,10 @@ class crm_opportunity2phonecall(osv.osv_memory):
|
||||
_description = 'Opportunity to Phonecall'
|
||||
|
||||
_columns = {
|
||||
'name' : fields.char('Call summary', size=64, required=True, select=1),
|
||||
'user_id' : fields.many2one('res.users', "Assign To"),
|
||||
'date': fields.datetime('Date' , required=True),
|
||||
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
|
||||
'name' : fields.char('Call summary', size=64, required=True, select=1),
|
||||
'user_id' : fields.many2one('res.users', "Assign To"),
|
||||
'date': fields.datetime('Date' , required=True),
|
||||
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
|
||||
}
|
||||
|
||||
def default_get(self, cr, uid, fields, context=None):
|
||||
@@ -46,7 +46,6 @@ class crm_opportunity2phonecall(osv.osv_memory):
|
||||
|
||||
@return : default values of fields.
|
||||
"""
|
||||
|
||||
opp_obj = self.pool.get('crm.opportunity')
|
||||
record_ids = context and context.get('active_ids', []) or []
|
||||
res = super(crm_opportunity2phonecall, self).default_get(cr, uid, fields, context=context)
|
||||
@@ -93,7 +92,7 @@ class crm_opportunity2phonecall(osv.osv_memory):
|
||||
data_obj = self.pool.get('ir.model.data')
|
||||
categ_id = mod_obj._get_id(cr, uid, 'crm', 'categ_phone1')
|
||||
categ_id = data_obj.browse(cr, uid, categ_id, context=context).res_id
|
||||
|
||||
|
||||
# Select the view
|
||||
id2 = data_obj._get_id(cr, uid, 'crm', 'crm_case_phone_tree_view')
|
||||
id3 = data_obj._get_id(cr, uid, 'crm', 'crm_case_phone_form_view')
|
||||
@@ -105,31 +104,32 @@ class crm_opportunity2phonecall(osv.osv_memory):
|
||||
for this in self.browse(cr, uid, ids, context=context):
|
||||
for opp in opp_obj.browse(cr, uid, record_ids, context=context):
|
||||
new_case = phonecall_obj.create(cr, uid, {
|
||||
'name' : opp.name,
|
||||
'case_id' : opp.id ,
|
||||
'user_id' : this.user_id and this.user_id.id or False,
|
||||
'categ_id' : categ_id,
|
||||
'description' : opp.description or False,
|
||||
'date' : this.date,
|
||||
'section_id' : opp.section_id and opp.section_id.id or False,
|
||||
'partner_id': opp.partner_id and opp.partner_id.id or False,
|
||||
'partner_address_id': opp.partner_address_id and opp.partner_address_id.id or False,
|
||||
'partner_phone' : opp.phone or (opp.partner_address_id and opp.partner_address_id.phone or False),
|
||||
'partner_mobile' : opp.partner_address_id and opp.partner_address_id.mobile or False,
|
||||
'priority': opp.priority,
|
||||
'name' : opp.name,
|
||||
'case_id' : opp.id ,
|
||||
'user_id' : this.user_id and this.user_id.id or False,
|
||||
'categ_id' : categ_id,
|
||||
'description' : opp.description or False,
|
||||
'date' : this.date,
|
||||
'section_id' : opp.section_id and opp.section_id.id or False,
|
||||
'partner_id': opp.partner_id and opp.partner_id.id or False,
|
||||
'partner_address_id': opp.partner_address_id and opp.partner_address_id.id or False,
|
||||
'partner_phone' : opp.phone or (opp.partner_address_id and opp.partner_address_id.phone or False),
|
||||
'partner_mobile' : opp.partner_address_id and opp.partner_address_id.mobile or False,
|
||||
'priority': opp.priority,
|
||||
'opp_id': opp.id
|
||||
}, context=context)
|
||||
|
||||
phonecall_obj.case_open(cr, uid, [new_case])
|
||||
|
||||
value = {
|
||||
'name': _('Phone Call'),
|
||||
'view_type': 'form',
|
||||
'view_mode': 'tree,form',
|
||||
'res_model': 'crm.phonecall',
|
||||
'res_id' : new_case,
|
||||
'views': [(id3, 'form'), (id2, 'tree'), (False, 'calendar'), (False, 'graph')],
|
||||
'type': 'ir.actions.act_window',
|
||||
'name': _('Phone Call'),
|
||||
'domain': "[('user_id','=',%s),('opportunity_id','=',%s)]" % (uid,opp.id),
|
||||
'view_type': 'form',
|
||||
'view_mode': 'tree,form',
|
||||
'res_model': 'crm.phonecall',
|
||||
'res_id' : new_case,
|
||||
'views': [(id3, 'form'), (id2, 'tree'), (False, 'calendar'), (False, 'graph')],
|
||||
'type': 'ir.actions.act_window',
|
||||
'search_view_id': res['res_id']
|
||||
}
|
||||
return value
|
||||
|
||||
@@ -2058,7 +2058,6 @@ class olap_warehouse_wizard(osv.osv_memory):
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param context: A standard dictionary for contextual values
|
||||
"""
|
||||
|
||||
query_obj = self.pool.get('olap.query.logs')
|
||||
qry_ids = query_obj.search(cr, uid, [('user_id', '=', uid), ('count', '>=', 3)])
|
||||
|
||||
|
||||
@@ -33,17 +33,17 @@
|
||||
'depends': ['base'],
|
||||
'init_xml': [],
|
||||
'update_xml': [
|
||||
'wizard/wizard_view.xml',
|
||||
'wizard/wiki_wiki_page_open_view.xml',
|
||||
'wizard/wiki_create_menu_view.xml',
|
||||
'wizard/wiki_make_index_view.xml',
|
||||
'wizard/wiki_show_diff_view.xml',
|
||||
'wiki_view.xml',
|
||||
'data/wiki_quickstart.xml',
|
||||
'data/wiki_main.xml',
|
||||
'security/ir.model.access.csv'
|
||||
],
|
||||
'demo_xml': ['test/wiki_test00.yml'],
|
||||
# 'demo_xml': [],
|
||||
# 'test': ['test/wiki_test00.yml'],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '0086363630317',
|
||||
|
||||
@@ -7,20 +7,20 @@
|
||||
notes: I can Generate New Group for Select Display method = Tree.
|
||||
-
|
||||
Now I will create new wikipage and assign Group test to this page
|
||||
-
|
||||
-
|
||||
!record {model: wiki.wiki, id: wiki_wiki_openerpwikiediting0}:
|
||||
group_id: wiki.wiki_groups_wikigrouptest0
|
||||
name: OpenERP Wiki Test
|
||||
section: '1.1'
|
||||
text_area: '=The Open ERP wiki=
|
||||
|
||||
|
||||
The Open ERP wiki allows you to manage your enterprise contents using wiki
|
||||
|
||||
|
||||
restructured texts. This module provides a collaborative way to manage internal
|
||||
|
||||
|
||||
FAQs, quality manuals, technical references, etc.
|
||||
|
||||
'
|
||||
|
||||
'
|
||||
-
|
||||
I Get Help on this current page by clicking on "Basic wiki Editing" wizard
|
||||
-
|
||||
@@ -30,7 +30,7 @@
|
||||
I create Index on this current page by clicking on "Create Index" wizard
|
||||
-
|
||||
!python {model: wiki.make.index}: |
|
||||
ids = self.search(cr, uid, [])
|
||||
ids = self.search(cr, uid, [])
|
||||
self.wiki_do_index(cr, uid, ids , {'active_ids': [ref('wiki_wiki_openerpwikiediting0')]})
|
||||
-
|
||||
# Remaining Act window
|
||||
@@ -50,23 +50,21 @@
|
||||
-
|
||||
# Remaining beacuse of Act window (I search the page by clicking on the "search page".)
|
||||
In order to create a menu I will create wizard data
|
||||
-
|
||||
-
|
||||
!record {model: wiki.groups, id: wiki.wiki_groups_wikiformatting0}:
|
||||
home: wiki.wiki_wiki_main
|
||||
-
|
||||
I create a Menu by clicking on "create menu" button.
|
||||
# The folowing is not running properly because of osv memory problem
|
||||
-
|
||||
!record {model: wiki.create.menu, id: wiki_create_menu_0}:
|
||||
menu_name: Wiki Test menu
|
||||
menu_parent_id: base.menu_base_partner
|
||||
page: wiki.wiki_wiki_openerpwikiediting0
|
||||
-
|
||||
#I will check that menu is generated properly
|
||||
I will check that menu is generated properly
|
||||
-
|
||||
# Remaining because some problem occur
|
||||
#!python {model: wiki.create.menu}: |
|
||||
# ids = self.search(cr, uid, [])
|
||||
# self.wiki_menu_create(cr, uid, ids, context)
|
||||
|
||||
!python {model: wiki.create.menu}: |
|
||||
ids = self.search(cr, uid, [])
|
||||
self.wiki_menu_create(cr, uid, ids, context)
|
||||
|
||||
|
||||
|
||||
@@ -28,9 +28,9 @@ class wiki_create_menu(osv.osv_memory):
|
||||
_description = "Wizard Create Menu"
|
||||
|
||||
_columns = {
|
||||
'menu_name': fields.char('Menu Name', size=256, select=True, required=True),
|
||||
'menu_parent_id': fields.many2one('ir.ui.menu', 'Parent Menu', required=True),
|
||||
'page': fields.many2one('wiki.wiki', 'Group Home Page'),
|
||||
'menu_name': fields.char('Menu Name', size=256, select=True, required=True),
|
||||
'menu_parent_id': fields.many2one('ir.ui.menu', 'Parent Menu', required=True),
|
||||
'page': fields.many2one('wiki.wiki', 'Group Home Page'),
|
||||
}
|
||||
|
||||
def wiki_menu_create(self, cr, uid, ids, context):
|
||||
@@ -46,22 +46,22 @@ class wiki_create_menu(osv.osv_memory):
|
||||
|
||||
for menu in self.browse(cr, uid, ids):
|
||||
menu_id = self.pool.get('ir.ui.menu').create(cr, uid, {
|
||||
'name':menu.menu_name,
|
||||
'parent_id':menu.menu_parent_id.id,
|
||||
'icon': 'STOCK_DIALOG_QUESTION',
|
||||
'name': menu.menu_name,
|
||||
'parent_id':menu.menu_parent_id.id,
|
||||
'icon': 'STOCK_DIALOG_QUESTION',
|
||||
'action': 'ir.actions.act_window,'+ str(action_id)
|
||||
}, context)
|
||||
home = menu.page.id
|
||||
group_id = menu.id
|
||||
res = {
|
||||
'home':home,
|
||||
'home': home,
|
||||
}
|
||||
self.pool.get('wiki.groups').write(cr, uid, ids, res)
|
||||
self.pool.get('wiki.groups.link').create(cr, uid,
|
||||
self.pool.get('wiki.groups.link').create(cr, uid,
|
||||
{'group_id': group_id, 'action_id': menu_id})
|
||||
|
||||
return {}
|
||||
|
||||
|
||||
wiki_create_menu()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="view_wiki_history_diff" model="ir.ui.view">
|
||||
<field name="name">Differences</field>
|
||||
<field name="model">wizard.wiki.history.show_diff</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="History Differance">
|
||||
<separator string="Wiki Differance" colspan="4"/>
|
||||
<field name="diff" widget="text_html" nolabel="1" colspan="4"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<act_window
|
||||
id="act_view_diff"
|
||||
name="Differences"
|
||||
res_model="wizard.wiki.history.show_diff"
|
||||
src_model="wiki.wiki.history"
|
||||
target="new"
|
||||
view_mode="form"
|
||||
/>
|
||||
</data>
|
||||
</openerp>
|
||||
Reference in New Issue
Block a user