[MERGE]: Merge with lp:~openerp-dev/openobject-addons/trunk-dev-addons2
bzr revid: rpa@tinyerp.com-20100428050510-stjbb420dkox0iu4
This commit is contained in:
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-03-29 15:32+0000\n"
|
||||
"Last-Translator: Carlo Vettore <Unknown>\n"
|
||||
"PO-Revision-Date: 2010-04-26 07:46+0000\n"
|
||||
"Last-Translator: eLBati - albatos.com <lorenzo.battistini@albatos.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-04-17 04:06+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-04-28 03:44+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -1192,7 +1192,7 @@ msgstr "Report tassa"
|
||||
#: wizard_button:account.analytic.account.chart,init,open:0
|
||||
#: wizard_button:account.chart,init,open:0
|
||||
msgid "Open Charts"
|
||||
msgstr "Conti aperti"
|
||||
msgstr "Apri"
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.fiscalyear.close.state,init:0
|
||||
@@ -2301,6 +2301,8 @@ msgstr ""
|
||||
#: wizard_view:account.chart,init:0
|
||||
msgid "(If you do not select Fiscal year it will take all open fiscal years)"
|
||||
msgstr ""
|
||||
"Se non si seleziona un anno fiscale, verranno visualizzati tutti gli anni "
|
||||
"fiscali aperti"
|
||||
|
||||
#. module: account
|
||||
#: help:account.invoice.tax,base_code_id:0
|
||||
@@ -4429,7 +4431,7 @@ msgstr ""
|
||||
#. module: account
|
||||
#: wizard_view:account.wizard_paid_open,init:0
|
||||
msgid "Open Invoice"
|
||||
msgstr "Fattura aperta"
|
||||
msgstr "Apri fattura"
|
||||
|
||||
#. module: account
|
||||
#: model:process.node,note:account.process_node_draftstatement0
|
||||
|
||||
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-04-25 17:34+0000\n"
|
||||
"PO-Revision-Date: 2010-04-27 19:28+0000\n"
|
||||
"Last-Translator: Grzegorz Grzelak (Cirrus.pl) <Unknown>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-04-26 03:42+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-04-28 03:44+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -2087,7 +2087,7 @@ msgstr "Wydatki"
|
||||
#. module: account
|
||||
#: field:account.journal,invoice_sequence_id:0
|
||||
msgid "Invoice Sequence"
|
||||
msgstr "Numeracja faktury"
|
||||
msgstr "Numeracja faktur"
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.automatic.reconcile,init:0
|
||||
|
||||
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.4\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-04-25 21:20+0000\n"
|
||||
"PO-Revision-Date: 2010-04-26 09:10+0000\n"
|
||||
"Last-Translator: Martin Volf <Unknown>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-04-26 03:41+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-04-28 03:44+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_tax_include
|
||||
@@ -24,12 +24,12 @@ msgstr "Neplatný XML pro zobrazení architektury"
|
||||
#. module: account_tax_include
|
||||
#: field:account.invoice,price_type:0
|
||||
msgid "Price method"
|
||||
msgstr ""
|
||||
msgstr "Metoda určování cen"
|
||||
|
||||
#. module: account_tax_include
|
||||
#: model:ir.module.module,shortdesc:account_tax_include.module_meta_information
|
||||
msgid "Invoices and prices with taxes included"
|
||||
msgstr ""
|
||||
msgstr "Faktury a ceny včetně daní"
|
||||
|
||||
#. module: account_tax_include
|
||||
#: selection:account.invoice,price_type:0
|
||||
|
||||
@@ -30,19 +30,26 @@ import tools
|
||||
#objects_proxy = netsvc.ExportService.getService('object').__class__
|
||||
class recording_objects_proxy(osv_pool):
|
||||
def execute(self, *args, **argv):
|
||||
if len(args) >= 6 and isinstance(args[5], dict):
|
||||
if args[3] == 'create':
|
||||
_old_args = args[4].copy()
|
||||
elif args[3] == 'write':
|
||||
_old_args = args[5].copy()
|
||||
elif len(args) >= 5 and isinstance(args[4], dict):
|
||||
_old_args = args[4].copy()
|
||||
else:
|
||||
_old_args = None
|
||||
res = super(recording_objects_proxy, self).execute(*args, **argv)
|
||||
pool = pooler.get_pool(args[0])
|
||||
mod = pool.get('ir.module.record')
|
||||
|
||||
if mod and mod.recording:
|
||||
if args[3] not in ('default_get','read','fields_view_get','fields_get','search','search_count','name_search','name_get','get','request_get', 'get_sc', 'unlink'):
|
||||
if _old_args is not None:
|
||||
args[5].update(_old_args)
|
||||
if args[5]:
|
||||
mod.recording_data.append(('query', args, argv,res))
|
||||
if args[3] == 'create':
|
||||
args[4].update(_old_args)
|
||||
elif args[3] == 'write':
|
||||
args[5].update(_old_args)
|
||||
mod.recording_data.append(('query', args, argv,res))
|
||||
return res
|
||||
|
||||
def exec_workflow(self, *args, **argv):
|
||||
@@ -125,7 +132,8 @@ class base_module_record(osv.osv):
|
||||
name = filter(lambda x: x in string.letters, (data.get('name','') or '').lower())
|
||||
except:
|
||||
name=''
|
||||
val = model.replace('.','_')+'_'+name+ str(i)
|
||||
# name=data.get('name','') or ''.lower()
|
||||
val = model.replace('.','_')+'_'+ name + str(i)
|
||||
i+=1
|
||||
if val not in self.ids.values():
|
||||
break
|
||||
@@ -146,7 +154,6 @@ class base_module_record(osv.osv):
|
||||
|
||||
def _create_record(self, cr, uid, doc, model, data, record_id, noupdate=False):
|
||||
|
||||
data_pool = self.pool.get('ir.model.data')
|
||||
model_pool = self.pool.get(model)
|
||||
|
||||
record = doc.createElement('record')
|
||||
@@ -196,12 +203,26 @@ class base_module_record(osv.osv):
|
||||
fname = model_pool._columns[key]._fields_id
|
||||
else:
|
||||
fname = model_pool._inherit_fields[key][2]._fields_id
|
||||
valitem[2][fname] = record_id
|
||||
newid,update = self._get_id(cr, uid, fields[key]['relation'], valitem[1])
|
||||
if not newid:
|
||||
if valitem[0] == 0:
|
||||
newid = self._create_id(cr, uid, fields[key]['relation'], valitem[2])
|
||||
valitem[1]=newid
|
||||
else:
|
||||
newid,update = self._get_id(cr, uid, fields[key]['relation'], valitem[1])
|
||||
if not newid:
|
||||
newid = self._create_id(cr, uid, fields[key]['relation'], valitem[2])
|
||||
valitem[1]=newid
|
||||
self.ids[(fields[key]['relation'], valitem[1])] = newid
|
||||
|
||||
# if valitem[0] in (0,1):
|
||||
# if key in model_pool._columns:
|
||||
# fname = model_pool._columns[key]._fields_id
|
||||
# else:
|
||||
# fname = model_pool._inherit_fields[key][2]._fields_id
|
||||
# valitem[2][fname] = record_id
|
||||
# newid,update = self._get_id(cr, uid, fields[key]['relation'], valitem[1])
|
||||
# if not newid:
|
||||
# newid = self._create_id(cr, uid, fields[key]['relation'], valitem[2])
|
||||
# self.ids[(fields[key]['relation'], valitem[1])] = newid
|
||||
#
|
||||
childrecord, update = self._create_record(cr, uid, doc, fields[key]['relation'],valitem[2], newid)
|
||||
noupdate = noupdate or update
|
||||
record_list += childrecord
|
||||
@@ -245,7 +266,7 @@ class base_module_record(osv.osv):
|
||||
for key,val in data.items():
|
||||
if ((key in defaults[model]) and (val == defaults[model][key])) and not(fields[key].get('required',False)):
|
||||
continue
|
||||
if not (val or (fields[key]['type']=='boolean')):
|
||||
if not (val or (fields[key]['type']=='function')):
|
||||
continue
|
||||
elif fields[key]['type'] in ('boolean',):
|
||||
if not val:
|
||||
@@ -267,12 +288,9 @@ class base_module_record(osv.osv):
|
||||
fname = model_pool._columns[key]._fields_id
|
||||
else:
|
||||
fname = model_pool._inherit_fields[key][2]._fields_id
|
||||
valitem[2][fname] = record_id
|
||||
newid,update = self._get_id(cr, uid, fields[key]['relation'], valitem[1])
|
||||
if not newid:
|
||||
newid = self._create_id(cr, uid, fields[key]['relation'], valitem[2])
|
||||
self.ids[(fields[key]['relation'], valitem[1])] = newid
|
||||
childrecord = self._create_yaml_record(cr, uid, fields[key]['relation'],valitem[2], newid)
|
||||
del valitem[2][fname] #delete parent_field from child's fields list
|
||||
|
||||
childrecord = self._create_yaml_record(cr, uid, fields[key]['relation'],valitem[2], None)
|
||||
items[0].append(childrecord['attrs'])
|
||||
attrs[key] = items
|
||||
elif fields[key]['type'] in ('many2many',):
|
||||
@@ -289,11 +307,11 @@ class base_module_record(osv.osv):
|
||||
if m2m[0]:
|
||||
attrs[key] = m2m
|
||||
else:
|
||||
val=val.replace('"','\'')
|
||||
try:
|
||||
attrs[key]=str(val)
|
||||
except:
|
||||
attrs[key]=tools.ustr(val)
|
||||
attrs[key]=attrs[key].replace('"','\'')
|
||||
record['attrs'] = attrs
|
||||
return record
|
||||
|
||||
@@ -311,7 +329,7 @@ class base_module_record(osv.osv):
|
||||
for f in filter(lambda a: isinstance(obj._columns[a], fields.function)\
|
||||
and (not obj._columns[a].store),obj._columns):
|
||||
del data[f]
|
||||
|
||||
|
||||
for key,val in data.items():
|
||||
if result.has_key(key):
|
||||
continue
|
||||
@@ -361,16 +379,16 @@ class base_module_record(osv.osv):
|
||||
def _generate_object_xml(self, cr, uid, rec, recv, doc, result=None):
|
||||
record_list = []
|
||||
noupdate = False
|
||||
if rec[4]=='write':
|
||||
for id in rec[5]:
|
||||
id,update = self._get_id(cr, uid, rec[3], id)
|
||||
if rec[3]=='write':
|
||||
for id in rec[4]:
|
||||
id,update = self._get_id(cr, uid, rec[2], id)
|
||||
noupdate = noupdate or update
|
||||
if not id:
|
||||
continue
|
||||
record,update = self._create_record(cr, uid, doc, rec[3], rec[6], id)
|
||||
record,update = self._create_record(cr, uid, doc, rec[2], rec[5], id)
|
||||
noupdate = noupdate or update
|
||||
record_list += record
|
||||
|
||||
|
||||
elif rec[4] in ('menu_create',):
|
||||
for id in rec[5]:
|
||||
id,update = self._get_id(cr, uid, rec[3], id)
|
||||
@@ -487,7 +505,10 @@ class base_module_record(osv.osv):
|
||||
yaml_file += str(object) + '''\n\n'''
|
||||
else:
|
||||
record= self._generate_object_yaml(cr, uid, rec[1],rec[3])
|
||||
yaml_file+="!comment Creating an %s record"%(record['model']) + '''\n'''
|
||||
if self.mode == "create" or self.mode == "copy":
|
||||
yaml_file+="!comment Creating a %s record"%(record['model']) + '''\n'''
|
||||
else:
|
||||
yaml_file+="!comment Modifying a %s record"%(record['model']) + '''\n'''
|
||||
object= yaml.load(unicode('''\n !record %s \n'''%record,'iso-8859-1'))
|
||||
yaml_file += str(object) + '''\n'''
|
||||
attrs=yaml.dump(object.attrs, default_flow_style=False)
|
||||
|
||||
@@ -28,7 +28,7 @@ If you don't think you need any of these right now, you can easily install them
|
||||
<field name="account"/> <field name="purchase"/>
|
||||
<field name="hr"/> <field name="point_of_sale"/>
|
||||
<field name="marketing"/> <field name="misc_tools"/>
|
||||
<field name="report_designer"/>
|
||||
<field name="report_designer"/> <field name="thunderbird"/>
|
||||
<separator string="Vertical Modules" colspan="4"/>
|
||||
<field name="profile_association"/>
|
||||
<field name="profile_training"/>
|
||||
|
||||
@@ -73,6 +73,7 @@ class base_setup_installer(osv.osv_memory):
|
||||
'report_designer':fields.boolean('Advanced Reporting',
|
||||
help="Lets you install various tools to simplify and enhance "
|
||||
"OpenERP's report creation."),
|
||||
'thunderbird' :fields.boolean('Thunderbird'),
|
||||
# Vertical modules
|
||||
'profile_association':fields.boolean('Associations',
|
||||
help="Installs a preselected set of OpenERP "
|
||||
|
||||
@@ -70,8 +70,16 @@ between mails and Open ERP.""",
|
||||
'process/crm_configuration_process.xml',
|
||||
],
|
||||
'demo_xml': [
|
||||
'test/test_crm_meeting.yml',
|
||||
'crm_demo.xml',
|
||||
],
|
||||
'test': ['test/test_crm_lead.yml',
|
||||
'test/test_crm_opportunity.yml',
|
||||
'test/test_crm_phonecall.yml',
|
||||
'test/test_crm_fund.yml',
|
||||
'test/test_crm_claim.yml',
|
||||
'test/test_crm_helpdesk.yml',
|
||||
],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '0079056041421',
|
||||
|
||||
+7
-5
@@ -59,6 +59,7 @@ class crm_case_section(osv.osv):
|
||||
true, it will allow you to hide the sales team without removing it."),
|
||||
'allow_unlink': fields.boolean('Allow Delete', help="Allows to delete non draft cases"),
|
||||
'user_id': fields.many2one('res.users', 'Responsible User'),
|
||||
'member_ids':fields.many2many('res.users', 'sale_member_rel', 'section_id', 'member_id', 'Team Members'),
|
||||
'reply_to': fields.char('Reply-To', size=64, help="The email address put \
|
||||
in the 'Reply-To' of all emails sent by Open ERP about cases in this sales team"),
|
||||
'parent_id': fields.many2one('crm.case.section', 'Parent Team'),
|
||||
@@ -66,6 +67,7 @@ class crm_case_section(osv.osv):
|
||||
'resource_calendar_id': fields.many2one('resource.calendar', "Resource's Calendar"),
|
||||
'server_id':fields.many2one('email.smtpclient', 'Server ID'),
|
||||
'note': fields.text('Description'),
|
||||
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
@@ -79,14 +81,14 @@ class crm_case_section(osv.osv):
|
||||
|
||||
def _check_recursion(self, cr, uid, ids):
|
||||
"""
|
||||
Checks for recursion level for sections
|
||||
Checks for recursion level for sales team
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of section ids
|
||||
@param ids: List of Sales team ids
|
||||
"""
|
||||
level = 100
|
||||
|
||||
|
||||
while len(ids):
|
||||
cr.execute('select distinct parent_id from crm_case_section where id =ANY(%s)', (ids,))
|
||||
ids = filter(None, map(lambda x: x[0], cr.fetchall()))
|
||||
@@ -97,7 +99,7 @@ class crm_case_section(osv.osv):
|
||||
return True
|
||||
|
||||
_constraints = [
|
||||
(_check_recursion, 'Error ! You cannot create recursive sections.', ['parent_id'])
|
||||
(_check_recursion, 'Error ! You cannot create recursive Sales team.', ['parent_id'])
|
||||
]
|
||||
|
||||
def name_get(self, cr, uid, ids, context=None):
|
||||
@@ -105,7 +107,7 @@ class crm_case_section(osv.osv):
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of section ids
|
||||
@param ids: List of sales team ids
|
||||
"""
|
||||
if not context:
|
||||
context = {}
|
||||
|
||||
+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">
|
||||
|
||||
+10
-8
@@ -11,7 +11,7 @@
|
||||
<field name="model">crm.case.section</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Case Section">
|
||||
<form string="Sales Team">
|
||||
<group col="6" colspan="4">
|
||||
<field name="name" select="1" colspan="4"/>
|
||||
<field name="code" select="1"/>
|
||||
@@ -19,22 +19,24 @@
|
||||
<field name="resource_calendar_id" select="2"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Case section">
|
||||
<group col="2" colspan="2">
|
||||
<page string="Sales Team">
|
||||
<group col="2" colspan="1">
|
||||
<separator string="Responsible" colspan="2"/>
|
||||
<field name="parent_id" select="2" widget="selection"/>
|
||||
<field name="user_id" select="2"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<group col="2" colspan="1">
|
||||
<separator string="Contact Information" colspan="2"/>
|
||||
<field name="server_id" select="2"/>
|
||||
<field name="reply_to" select="2"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Section Property" colspan="2"/>
|
||||
<group col="2" colspan="1">
|
||||
<separator string="Sales Team Property" colspan="2"/>
|
||||
<field name="active" select="2"/>
|
||||
<field name="allow_unlink" select="2"/>
|
||||
</group>
|
||||
<separator string="Members List" colspan="4"/>
|
||||
<field name="member_ids" nolabel="1" colspan="4"/>
|
||||
<separator string="Note" colspan="4"/>
|
||||
<field name="note" select="1" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
@@ -51,7 +53,7 @@
|
||||
<field name="type">tree</field>
|
||||
<field name="field_parent">child_ids</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Case Section">
|
||||
<tree string="Sales Team">
|
||||
<field name="name" select="1"/>
|
||||
<field name="code" select="1"/>
|
||||
<field name="user_id" select="1"/>
|
||||
@@ -62,7 +64,7 @@
|
||||
<!-- Case Sections Action -->
|
||||
|
||||
<record id="crm_case_section_act" model="ir.actions.act_window">
|
||||
<field name="name">Sections</field>
|
||||
<field name="name">Sales Team</field>
|
||||
<field name="res_model">crm.case.section</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="crm_case_section_view_tree"/>
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
|
||||
<act_window domain="[('section_id', '=', active_id)]"
|
||||
id="act_crm_case_section_2_report_crm_case_categ"
|
||||
name="Monthly cases by section" res_model="crm.case.report"
|
||||
name="Monthly cases by Sales Team" res_model="crm.case.report"
|
||||
src_model="crm.case.section" />
|
||||
|
||||
<!-- Closed & Open CRM Case view for Random Activities dashboard Tree View -->
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
- |
|
||||
Now I check claims which contain customer claim information about document
|
||||
related problem, product related problem.
|
||||
- |
|
||||
I start by creating new claims for Damaged product as Value Claims with priority High and specify
|
||||
date of claim at which claim is created.
|
||||
-
|
||||
!record {model: crm.claim, id: crm_claim_damagedproduct0}:
|
||||
categ_id: crm.categ_claim2
|
||||
date: '2010-04-21 20:13:00'
|
||||
email_from: info@balmerinc.be
|
||||
name: 'Damaged product '
|
||||
partner_address_id: base.res_partner_address_1
|
||||
partner_id: base.res_partner_9
|
||||
priority: '2'
|
||||
section_id: crm.section_sales_department
|
||||
|
||||
- |
|
||||
I check that the claims is in 'draft' state.
|
||||
-
|
||||
!assert {model: crm.claim, id: crm_claim_damagedproduct0}:
|
||||
- state == 'draft'
|
||||
- |
|
||||
Now I make sure that claim is at "Accepted" stage.
|
||||
-
|
||||
!record {model: crm.claim, id: crm.crm_claim_damagedproduct0}:
|
||||
stage_id: crm.stage_claim1
|
||||
- |
|
||||
I can change that stage by next button right on it
|
||||
-
|
||||
!python {model: crm.claim}: |
|
||||
self.stage_next(cr, uid, [ref('crm_claim_damagedproduct0')])
|
||||
- |
|
||||
I make this claim as Open
|
||||
-
|
||||
!python {model: crm.claim}: |
|
||||
self.case_open(cr, uid, [ref('crm_claim_damagedproduct0')])
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
- |
|
||||
Now I start test Fund Raising which contain information about Donation or charity
|
||||
given by user.
|
||||
- |
|
||||
I start by creating new Funds entry for donation for books to poor school children
|
||||
with cost 500000.00 and category as "Learning And Education"
|
||||
I make payment by Cheque so I make sure that the mode on fund is selected as cheque
|
||||
-
|
||||
!record {model: crm.fundraising, id: crm_fundraising_donationforbookstopoorschoolchildren0}:
|
||||
categ_id: crm.categ_fund2
|
||||
email_from: info@balmerinc.be
|
||||
name: Donation for books to poor school children
|
||||
partner_address_id: base.res_partner_address_1
|
||||
partner_id: base.res_partner_9
|
||||
planned_cost: 500000.0
|
||||
section_id: crm.section_sales_department
|
||||
type_id: crm.type_fund2
|
||||
- |
|
||||
I check that the Funds is in 'draft' state.
|
||||
-
|
||||
!assert {model: crm.fundraising, id: crm_fundraising_donationforbookstopoorschoolchildren0}:
|
||||
- state == 'draft'
|
||||
- |
|
||||
Now I open Funds by click on "Open" button
|
||||
-
|
||||
!python {model: crm.fundraising}: |
|
||||
self.case_open(cr, uid, [ref('crm_fundraising_donationforbookstopoorschoolchildren0')])
|
||||
- |
|
||||
I can close Funds by click on "Done" button.
|
||||
-
|
||||
!python {model: crm.fundraising}: |
|
||||
self.case_close(cr, uid, [ref('crm_fundraising_donationforbookstopoorschoolchildren0')])
|
||||
@@ -0,0 +1,38 @@
|
||||
-
|
||||
|
|
||||
I start by creating New helpdesk request regarding some functional questions.
|
||||
I select Date at which helpdesk request is created.
|
||||
-
|
||||
!record {model: crm.helpdesk, id: crm_helpdesk_somefunctionalquestion0}:
|
||||
date: '2010-04-22 10:17:00'
|
||||
email_from: info@balmerinc.be
|
||||
name: Some functional question.
|
||||
partner_address_id: base.res_partner_address_1
|
||||
partner_id: base.res_partner_9
|
||||
section_id: crm.section_sales_department
|
||||
|
||||
- |
|
||||
I check that the Helpdesk request is in 'Draft' state.
|
||||
-
|
||||
!assert {model: crm.helpdesk, id: crm_helpdesk_somefunctionalquestion0}:
|
||||
- state == 'draft'
|
||||
- |
|
||||
In order to make this helpdesk request to be considered I make it "Open"
|
||||
-
|
||||
!python {model: crm.helpdesk}: |
|
||||
self.case_open(cr, uid, [ref('crm_helpdesk_somefunctionalquestion0')])
|
||||
- |
|
||||
I can see that "Send Reminder" button is visible, which is used to send reminder to partner from
|
||||
responsible person or send reminder to responsible person from partner.
|
||||
-
|
||||
#this is not work for yaml.
|
||||
-
|
||||
# !python {model: crm.helpdesk}: |
|
||||
# self.remind_user(cr, uid, [ref('crm_helpdesk_somefunctionalquestion0')], context={}, attach=False, destination=True)
|
||||
- |
|
||||
After a proper communication for the request via email I make sure that the request is fulfilled and
|
||||
I close this HelpDesk Request by clicking on "Close" button.
|
||||
-
|
||||
!python {model: crm.helpdesk}: |
|
||||
self.case_close(cr, uid, [ref('crm_helpdesk_somefunctionalquestion0')])
|
||||
-
|
||||
@@ -0,0 +1,113 @@
|
||||
- |
|
||||
In order to test the CRM in OpenERP,
|
||||
I will do a customer qualification process that
|
||||
starts with a fist contact with a customer (a lead), which will be converted to a
|
||||
business opportunity and a partner.
|
||||
- |
|
||||
In order to test the flow, I create a two new users "user_crm" and
|
||||
I assign the group "salesman".
|
||||
-
|
||||
!record {model: res.users, id: res_users_usercrm0}:
|
||||
company_id: base.main_company
|
||||
context_lang: en_US
|
||||
context_section_id: crm.section_sales_department
|
||||
groups_id:
|
||||
- crm.group_crm_user
|
||||
login: user_crm
|
||||
name: user_crm
|
||||
password: user_crm
|
||||
|
||||
|
||||
- |
|
||||
I start by creating a new lead "New Customer" and I provide an address to this
|
||||
new customer, as well as an email "info@mycustomer.com".
|
||||
-
|
||||
!record {model: crm.lead, id: crm_lead_newcustomer0}:
|
||||
email_from: info@mycustomer.com
|
||||
name: New Customer
|
||||
partner_name: Sandip zala
|
||||
phone: (855) 924-4364
|
||||
mobile: (333) 715-1450
|
||||
section_id: crm.section_sales_department
|
||||
referred: False
|
||||
title: M.
|
||||
- |
|
||||
I check that the lead is in 'draft' state,
|
||||
-
|
||||
!assert {model: crm.lead, id: crm_lead_newcustomer0, string: Lead in Draft}:
|
||||
- state == "draft"
|
||||
-
|
||||
I open lead by click on "Open" button,
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.case_open(cr, uid, [ref("crm_lead_newcustomer0")])
|
||||
|
||||
- |
|
||||
As the lead seems to be a real business opportunity, I will convert it to a
|
||||
partner
|
||||
and a business opportunity by clicking on the "Convert" button.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
lead = self.browse(cr, uid, ref('crm_lead_newcustomer0'))
|
||||
if not lead.partner_id:
|
||||
self.convert_opportunity(cr, uid, [ref("crm_lead_newcustomer0")], {'active_ids': [ref("crm_lead_newcustomer0")]})
|
||||
-
|
||||
|
|
||||
Now, select "create a new partner" option in this wizard.
|
||||
-
|
||||
!record {model: crm.lead2opportunity.partner, id: crm_lead2opportunity_partner_create_0}:
|
||||
action: 'create'
|
||||
-
|
||||
I click on "Continue" button of this wizard.
|
||||
-
|
||||
!python {model: crm.lead2opportunity.partner}: |
|
||||
self.make_partner(cr, uid, [ref("crm_lead2opportunity_partner_create_0")], {'active_ids': [ref("crm_lead_newcustomer0")]})
|
||||
-
|
||||
Now, I give value to this wizard field.
|
||||
-
|
||||
!record {model: crm.lead2opportunity, id: crm_lead2opportunity_stonage_0}:
|
||||
name: Sandip zala
|
||||
planned_revenue: 0.00
|
||||
probability: 0.00
|
||||
-
|
||||
Then, Click on "Create Opportunity" button of this wizard.
|
||||
-
|
||||
!python {model: crm.lead2opportunity}: |
|
||||
self.action_apply(cr, uid, [ref('crm_lead2opportunity_stonage_0')], {'active_id': ref('crm_lead_newcustomer0')})
|
||||
|
||||
- |
|
||||
I can check that a lead and a business opportunity is now assigned to this
|
||||
lead.
|
||||
-
|
||||
# !python {model: crm.lead, id: crm_lead_newcustomer0}:
|
||||
# - opportunity_id.id != False
|
||||
|
||||
- |
|
||||
I check that the partner associated to this lead as the same country, phone number
|
||||
and name than the opportunity.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
lead = self.browse(cr, uid, ref("crm_lead_newcustomer0"))
|
||||
print "lead", lead.partner_name
|
||||
obj_opportunity = self.pool.get('crm.opportunity')
|
||||
ids = obj_opportunity.search(cr, uid, [('name', '=', lead.partner_name)])
|
||||
opportunity = obj_opportunity.browse(cr, uid, ids)[0]
|
||||
assert lead.partner_name == opportunity.partner_id.name
|
||||
assert lead.phone == opportunity.phone
|
||||
-
|
||||
|
|
||||
# yaml is also not working smpt server and send new email.
|
||||
|
||||
- |
|
||||
I configure with smtp server.
|
||||
- |
|
||||
And I communicate with lead through send New mail to Lead using it email address from user which are loged.
|
||||
- |
|
||||
I check that communication history generated when send email to lead.
|
||||
- |
|
||||
Then, I add a cc which receive copy of future communication between partner and users by mail.
|
||||
|
||||
- |
|
||||
I Reply to last Email to lead with some document attached.and check that communication history generated or not.
|
||||
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
- |
|
||||
Now I will test Meetings which may be customer meeting or phonecall meeting or
|
||||
internal Meeting.
|
||||
- |
|
||||
I start by creating a new Meeting.
|
||||
-
|
||||
!record {model: crm.meeting, id: crm_meeting_regardingpresentation0}:
|
||||
categ_id: crm.categ_meet2
|
||||
date: '2010-04-21 16:04:00'
|
||||
date_deadline: '2010-04-22 00:04:00'
|
||||
duration: 8.0
|
||||
email_from: info@balmerinc.be
|
||||
location: Ahmedabad
|
||||
name: Regarding Presentation
|
||||
partner_address_id: base.res_partner_address_1
|
||||
partner_id: base.res_partner_9
|
||||
rrule_type: weekly
|
||||
section_id: crm.section_sales_department
|
||||
- |
|
||||
I check that the Meetings is in 'UnConfirmed' state.
|
||||
-
|
||||
!assert {model: crm.meeting, id: crm_meeting_regardingpresentation0}:
|
||||
- state == "draft"
|
||||
- |
|
||||
I can set reminder on meeting if I put reminder "40 minutes before"
|
||||
- |
|
||||
For that, I first create alarm.
|
||||
-
|
||||
!record {model: res.alarm, id: res_alarm_minituesbefore0}:
|
||||
name: 40 minutes before
|
||||
trigger_duration: 40
|
||||
trigger_interval: minutes
|
||||
trigger_occurs: before
|
||||
trigger_related: start
|
||||
- |
|
||||
Now I will assign this reminder.
|
||||
|
||||
- !python {model: crm.meeting}: |
|
||||
self.write(cr, uid, [ref('crm_meeting_regardingpresentation0')], {'alarm_id': ref("res_alarm_minituesbefore0")})
|
||||
- |
|
||||
In order to check recurrence on meetings I will set Recurrency to Custom
|
||||
and I set the fields so that the meeting will occure weekly on Monday and Friday 10 times
|
||||
-
|
||||
!python {model: crm.meeting}: |
|
||||
self.write(cr, uid, [ref("crm_meeting_regardingpresentation0")], {'fr': 1, 'mo': 1, 'th': 1, 'tu': 1, 'we':1, 'count':10, 'interval': 1, 'freq': 'weekly', 'rrule_type': 'custom'})
|
||||
|
||||
- |
|
||||
I can see from the calendar view that the meeting is scheduled on Monday and Friday
|
||||
for 10 times,
|
||||
|
||||
-
|
||||
!python {model: crm.meeting}: |
|
||||
self.fields_view_get(cr, uid, False, 'calendar', context)
|
||||
- |
|
||||
I will search for one of the recurrent event and count the number of meeting.
|
||||
-
|
||||
!python {model: crm.meeting}: |
|
||||
ids = self.search(cr, uid, [('date', '>=', '2010-05-21 00:00:00'), ('date', '<=', '2010-04-21 00:00:00')] )
|
||||
assert len(ids) == 9
|
||||
|
||||
- |
|
||||
Now If I want to edit meetings information for all occurence I click on "Edit All" button.
|
||||
-
|
||||
!python {model: crm.meeting}: |
|
||||
self.open_meeting(cr, uid, [ref('crm_meeting_regardingpresentation0')])
|
||||
- |
|
||||
I can see that new meeting form is opened with same value
|
||||
I change some data for meeting and save it
|
||||
I can see from meeting's calendar view that all meeting occurences are changed accordingly
|
||||
-
|
||||
!record {model: crm.meeting, id: crm.crm_meeting_regardingpresentation0}:
|
||||
alarm_id: base_calendar.alarm9
|
||||
rrule_type: weekly
|
||||
|
||||
- |
|
||||
In order to invite people for this meetings, I click on "Invite People" button
|
||||
I can invite internal user.
|
||||
-
|
||||
!record {model: base_calendar.invite.attendee, id: base_calendar_invite_attendee_0}:
|
||||
type: internal
|
||||
partner_id: base.res_partner_9
|
||||
user_ids:
|
||||
- base.user_demo
|
||||
- |
|
||||
If I set Send mail boolean as True I can see that an email is send to
|
||||
specified email address with proper meeting information.
|
||||
-
|
||||
#This is not working for send mail boolean as True.
|
||||
-
|
||||
I click on "Invite" button of "Invite attendee" wizard.
|
||||
-
|
||||
!python {model: base_calendar.invite.attendee}: |
|
||||
self.do_invite(cr, uid, [ref('base_calendar_invite_attendee_0')], {'active_id': ref('crm_meeting_regardingpresentation0'), 'model' : 'crm.meeting', 'attendee_field':'attendee_ids'})
|
||||
|
||||
- |
|
||||
After direct/indirect confirmation for meetings I can confirm meeting
|
||||
-
|
||||
!python {model: crm.meeting}: |
|
||||
self.case_open(cr, uid, [ref('crm_meeting_regardingpresentation0')])
|
||||
@@ -0,0 +1,81 @@
|
||||
- |
|
||||
I start by creating a new Opportunity. And I select partner for opportunity.
|
||||
I can see that after selecting partner his contact and email is automatically filled.
|
||||
-
|
||||
!record {model: crm.opportunity, id: crm_opportunity_abcfuelcounits0}:
|
||||
email_from: info@balmerinc.be
|
||||
name: 'ABC FUEL CO 829264 - 10002 units '
|
||||
partner_address_id: base.res_partner_address_1
|
||||
partner_id: base.res_partner_9
|
||||
probability: 1.0
|
||||
stage_id: crm.stage_oppor1
|
||||
categ_id: crm.categ_oppor2
|
||||
section_id: crm.section_sales_department
|
||||
|
||||
- |
|
||||
I check that the opportunity is in 'New' state.
|
||||
-
|
||||
!assert {model: crm.opportunity, id: crm_opportunity_abcfuelcounits0}:
|
||||
- state == "draft"
|
||||
- |
|
||||
I open opportunity by click on "Open" button,
|
||||
-
|
||||
!python {model: crm.opportunity}: |
|
||||
self.case_open(cr, uid, [ref("crm_opportunity_abcfuelcounits0")])
|
||||
|
||||
- |
|
||||
I schedule Meeting on this current opportunity by clicking on "schedule
|
||||
Meeting".
|
||||
-
|
||||
!python {model: crm.opportunity}: |
|
||||
self.action_makeMeeting(cr, uid, [ref("crm_opportunity_abcfuelcounits0")])
|
||||
|
||||
- |
|
||||
I can see that Meeting's calendar view is shown.
|
||||
then I click on the date on which I want schedule meeting.
|
||||
I fill proper data for that meeting and save it
|
||||
-
|
||||
!record {model: crm.meeting, id: crm_meeting_abcfuelcounits0}:
|
||||
alarm_id: base_calendar.alarm3
|
||||
date: '2010-04-16 00:00:00'
|
||||
date_deadline: '2010-04-16 08:00:00'
|
||||
duration: 8.0
|
||||
email_from: info@balmerinc.be
|
||||
name: 'ABC FUEL CO 829264 - 10002 units '
|
||||
opportunity_id: 'crm_opportunity_abcfuelcounits0'
|
||||
partner_address_id: base.res_partner_address_1
|
||||
partner_id: base.res_partner_9
|
||||
rrule_type: weekly
|
||||
section_id: crm.section_sales_department
|
||||
state: open
|
||||
- |
|
||||
In order to schedule a phonecall to the partner
|
||||
I click on "schedule call" button and select planned date for the call.
|
||||
-
|
||||
!record {model: crm.opportunity2phonecall, id: crm_opportunity2phonecall_abcfuelcounits0}:
|
||||
date: '2010-04-17 11:15:00'
|
||||
name: 'ABC FUEL CO 829264 - 10002 units '
|
||||
section_id: crm.section_sales_department
|
||||
user_id: base.user_demo
|
||||
- |
|
||||
schedule phonecall by apply (action_apply)function of opportunity2phoncall wizard
|
||||
-
|
||||
!python {model: crm.opportunity2phonecall}: |
|
||||
self.action_apply(cr, uid, [ref('crm_opportunity2phonecall_abcfuelcounits0')], {'active_ids': [ref("crm_opportunity_abcfuelcounits0")]})
|
||||
- |
|
||||
I check that phonecall record is created for that opportunity.
|
||||
-
|
||||
!python {model: crm.phonecall}: |
|
||||
ids = self.search(cr, uid, [('name', '=', 'ABC FUEL CO 829264 - 10002 units')])
|
||||
assert len(ids)
|
||||
- |
|
||||
I can see phonecall record after click on "Schedule call" wizard.
|
||||
-
|
||||
!record {model: crm.phonecall, id: crm_phonecall_abcfuelcounits0}:
|
||||
date: '2010-04-17 11:15:00'
|
||||
duration: 3.0
|
||||
name: 'ABC FUEL CO 829264 - 10002 units'
|
||||
partner_address_id: base.res_partner_address_1
|
||||
partner_id: base.res_partner_9
|
||||
section_id: crm.section_sales_department
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
- |
|
||||
I start by creating a new phonecall.
|
||||
-
|
||||
!record {model: crm.phonecall, id: crm_phonecall_interviewcall0}:
|
||||
date: '2010-04-21 18:59:00'
|
||||
name: Interview call
|
||||
partner_address_id: base.res_partner_address_1
|
||||
partner_id: base.res_partner_9
|
||||
partner_mobile: (+32)2 211 34 83
|
||||
section_id: crm.section_sales_department
|
||||
|
||||
- |
|
||||
As the success of phonecall seems to be a real business opportunity, I will convert
|
||||
it to opportunity by clicking on the "Convert to Opportunity" button.
|
||||
-
|
||||
# !python {model: crm.phonecall2opportunity}: |
|
||||
# self.action_apply(cr, uid, [1], {'active_id': ref('crm_phonecall_interviewcall0')})
|
||||
|
||||
-
|
||||
# This is not working, find a way to do that in YAML
|
||||
|
||||
- |
|
||||
I can see that a business opportunity is now assigned to this phonecall
|
||||
- |
|
||||
I check that the partner associated to this as the same country, phone number
|
||||
and name than the phonecall.
|
||||
- |
|
||||
In order to avoid the duplication of similar partner, OpenERP should be able to
|
||||
detect if the partner exists or if it should be created from the phonecall during the
|
||||
conversion.
|
||||
- |
|
||||
In order to test this, I log as the user "user_crm2"
|
||||
- |
|
||||
Then, I create the same phonecall than the preceeding one but I change the name
|
||||
of the phonecall. But this customer keeps the same email.
|
||||
- |
|
||||
This time OpenERP should detect that this customer already exists in the
|
||||
partner base and I check that in the wizard, proposes me to link to this existing
|
||||
partner instead of creating another one.
|
||||
- |
|
||||
I confirm the conversion wizard.
|
||||
- |
|
||||
And I check that the phonecall and the newly created business opportunity is linked
|
||||
to the partner
|
||||
- |
|
||||
I schedule Meeting on this current phonecall by clicking on "schedule
|
||||
Meeting"
|
||||
-
|
||||
!python {model: crm.phonecall}: |
|
||||
self.action_make_meeting(cr, uid, [ref('crm_phonecall_interviewcall0')])
|
||||
|
||||
- |
|
||||
I can see that Meeting's calendar view is shown.
|
||||
then I click on the date on which I want schedule meeting.
|
||||
I fill proper data for that meeting and save it
|
||||
-
|
||||
!record {model: crm.meeting, id: crm_meeting_interviewcall0}:
|
||||
alarm_id: base_calendar.alarm3
|
||||
date: '2010-04-20 00:00:00'
|
||||
date_deadline: '2010-04-20 08:00:00'
|
||||
duration: 8.0
|
||||
email_from: info@balmerinc.be
|
||||
name: Interview call
|
||||
partner_address_id: base.res_partner_address_1
|
||||
partner_id: base.res_partner_9
|
||||
phonecall_id: 'crm_phonecall_interviewcall0'
|
||||
rrule_type: weekly
|
||||
state: open
|
||||
|
||||
-
|
||||
#This is not working for yaml
|
||||
- |
|
||||
I can jump to this meeting by "Meetings" shortcut from my phonecall's form view
|
||||
-
|
||||
|
||||
- |
|
||||
In order to schedule other phonecall to the partner
|
||||
I click on "schedule other call" button. and plan for other call
|
||||
I can see that it will open other phonecall view with some data same as current
|
||||
phonecall.
|
||||
-
|
||||
!record {model: crm.phonecall2phonecall, id: crm_phonecall2phonecall_interviewcall0}:
|
||||
date: '2010-04-21 19:49:00'
|
||||
name: Interview call
|
||||
section_id: crm.section_sales_department
|
||||
user_id: base.user_root
|
||||
- |
|
||||
I click on "Schedule" button of this wizard.
|
||||
-
|
||||
!python {model: crm.phonecall2phonecall}: |
|
||||
self.action_apply(cr, uid, [ref('crm_phonecall2phonecall_interviewcall0')], {'active_id': ref('crm_phonecall_interviewcall0')})
|
||||
@@ -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
|
||||
|
||||
@@ -46,6 +46,9 @@
|
||||
'report/document_report_view.xml'
|
||||
],
|
||||
'demo_xml': [ 'document_demo.xml',],
|
||||
'test': [
|
||||
'test/document_test.yml',
|
||||
],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': None,
|
||||
|
||||
@@ -105,7 +105,11 @@ class document_directory(osv.osv):
|
||||
]
|
||||
def name_get(self, cr, uid, ids, context={}):
|
||||
res = []
|
||||
all_ids = self.search(cr,uid,[])
|
||||
for d in self.browse(cr, uid, ids, context=context):
|
||||
if d.id not in all_ids:
|
||||
continue
|
||||
|
||||
s = ''
|
||||
d2 = d
|
||||
while d2 and d2.parent_id:
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
- |
|
||||
In order to test the Document Management System In OpenERP.
|
||||
-
|
||||
In order to test behaviour of resource Directory I will make one resource Directory "Partner Labels" in OpenERP having type "Other Resources" and Directory mapped to object "Partner"
|
||||
-
|
||||
!record {model: 'document.directory', id: dir_partner_label}:
|
||||
name : "Partner Labels"
|
||||
storage_id : storage_default
|
||||
type : ressource
|
||||
content_ids:
|
||||
- name: "Label"
|
||||
report_id : base.res_partner_address_report
|
||||
-
|
||||
Assign "res.partner" object to ressource_type_id.
|
||||
-
|
||||
!python {model: document.directory}: |
|
||||
ids = self.pool.get('ir.model').search(cr, uid, [('model','=','res.partner')])
|
||||
id = self.write(cr, uid, [ref("dir_partner_label")], {'ressource_type_id' : ids[0]}, context)
|
||||
-
|
||||
In order to check static directory in OpenERP which is the real directory just like system's local folders,
|
||||
First I create a directory in OpenERP named "Directory 1" with storage as "Default File storage" and type as "Static Directory"
|
||||
-
|
||||
!record {model: 'document.directory', id: directory_1}:
|
||||
name : "Directory 1"
|
||||
storage_id : storage_default
|
||||
type : directory
|
||||
-
|
||||
In order to make a directory hierarchy in OpenERP I will make other static directory "Directory 2" and I put its Parent Item as "Directory 1",
|
||||
So I can see the directory hierarchy in OpenERP's client like :- Directory1 -> Directory2
|
||||
-
|
||||
!record {model: 'document.directory', id: directory_2}:
|
||||
name : "Directory 2"
|
||||
storage_id : storage_default
|
||||
type : directory
|
||||
parent_id : directory_1
|
||||
-
|
||||
I am create a one Document Attachment name "My document" and select "Directory 2" as its Directory,
|
||||
And in order to put a File content.
|
||||
-
|
||||
When I am creating the document then "Resource Title" is filled automatic with "My document".
|
||||
-
|
||||
!record {model: 'ir.attachment', id: document_1}:
|
||||
name : "My document"
|
||||
parent_id : directory_2
|
||||
-
|
||||
Attach a pdf file in "My document"
|
||||
-
|
||||
!python {model: ir.attachment}: |
|
||||
import tools
|
||||
import base64
|
||||
file = open(tools.config['addons_path'] + '/document/test/partner.pdf')
|
||||
id = self.write(cr, uid, [ref("document_1")], {'datas' : base64.encodestring(file.read())}, context)
|
||||
@@ -0,0 +1,118 @@
|
||||
%PDF-1.3
|
||||
%“Œ‹ž ReportLab Generated PDF document http://www.reportlab.com
|
||||
% 'BasicFonts': class PDFDictionary
|
||||
1 0 obj
|
||||
% The standard fonts dictionary
|
||||
<< /F1 2 0 R
|
||||
/F2 3 0 R
|
||||
/F3 4 0 R >>
|
||||
endobj
|
||||
% 'F1': class PDFType1Font
|
||||
2 0 obj
|
||||
% Font Helvetica
|
||||
<< /BaseFont /Helvetica
|
||||
/Encoding /WinAnsiEncoding
|
||||
/Name /F1
|
||||
/Subtype /Type1
|
||||
/Type /Font >>
|
||||
endobj
|
||||
% 'F2': class PDFType1Font
|
||||
3 0 obj
|
||||
% Font Helvetica-Bold
|
||||
<< /BaseFont /Helvetica-Bold
|
||||
/Encoding /WinAnsiEncoding
|
||||
/Name /F2
|
||||
/Subtype /Type1
|
||||
/Type /Font >>
|
||||
endobj
|
||||
% 'F3': class PDFType1Font
|
||||
4 0 obj
|
||||
% Font Times-Roman
|
||||
<< /BaseFont /Times-Roman
|
||||
/Encoding /WinAnsiEncoding
|
||||
/Name /F3
|
||||
/Subtype /Type1
|
||||
/Type /Font >>
|
||||
endobj
|
||||
% 'Page1': class PDFPage
|
||||
5 0 obj
|
||||
% Page dictionary
|
||||
<< /Contents 9 0 R
|
||||
/MediaBox [ 0
|
||||
0
|
||||
841.8898
|
||||
595.2756 ]
|
||||
/Parent 8 0 R
|
||||
/Resources << /Font 1 0 R
|
||||
/ProcSet [ /PDF
|
||||
/Text
|
||||
/ImageB
|
||||
/ImageC
|
||||
/ImageI ] >>
|
||||
/Rotate 0
|
||||
/Trans << >>
|
||||
/Type /Page >>
|
||||
endobj
|
||||
% 'R6': class PDFCatalog
|
||||
6 0 obj
|
||||
% Document Root
|
||||
<< /Outlines 10 0 R
|
||||
/PageMode /UseNone
|
||||
/Pages 8 0 R
|
||||
/Type /Catalog >>
|
||||
endobj
|
||||
% 'R7': class PDFInfo
|
||||
7 0 obj
|
||||
<< /Author (Generated by OpenERP, Fabien Pinckaers)
|
||||
/CreationDate (20100421145542)
|
||||
/Keywords ()
|
||||
/Producer (ReportLab http://www.reportlab.com)
|
||||
/Subject (\(unspecified\))
|
||||
/Title (Partner) >>
|
||||
endobj
|
||||
% 'R8': class PDFPages
|
||||
8 0 obj
|
||||
% page tree
|
||||
<< /Count 1
|
||||
/Kids [ 5 0 R ]
|
||||
/Type /Pages >>
|
||||
endobj
|
||||
% 'R9': class PDFStream
|
||||
9 0 obj
|
||||
% page stream
|
||||
<< /Filter [ /ASCII85Decode
|
||||
/FlateDecode ]
|
||||
/Length 524 >>
|
||||
stream
|
||||
Gat=(?#P<K'R_@f5MSc<`6.HPV2s@dQRlarfjrE>3i<Y4(hW<qY=/IHPo2nd;U2u=SpPc46=:icfCoF922oN\83q_*El(+<i)0C.\*qSa'orY`+p(cC^oTpn8t,B-+=I?_Q1#SGXQbKWJ5-M7"aXRSQCBTu'NHJF046Jno-.K&2kW+&Ddh9bXc1q%)-e?DSC(5(4%=lk+ql;XaX3m]F#7K:"]hph/QW?(0_J4kXQiP</;'9K=]Wd,jeGe.Ma6pqJ&iD]r%qkNclhVq5Q/gSmK+r&6mr`*Z[m8(n)Usu)MZo%TNta^h'I^g6m5Vp92+>e[>S,B2ME\)S7:@oo6@nF8`I+h##OY3a-n#Qm!>5jiD.9pQ@E1#Xj$=)27)F3RmD%fbqZh,T`gJd0/,?A3`0:_VVm`"l`>oOf9p&HGF7>WCGVJoD2&_+c#BDb)/&0>>rL5@]KY$9YOA<rrt#g)1a61mS([/:0_[`)!ctOhSA/p@bq]>qZHTJq8k]!o+?4a5\-KbB#NYJC'`~>endstream
|
||||
|
||||
endobj
|
||||
% 'R10': class PDFOutlines
|
||||
10 0 obj
|
||||
<< /Count 0
|
||||
/Type /Outlines >>
|
||||
endobj
|
||||
xref
|
||||
0 11
|
||||
0000000000 65535 f
|
||||
0000000113 00000 n
|
||||
0000000233 00000 n
|
||||
0000000398 00000 n
|
||||
0000000573 00000 n
|
||||
0000000740 00000 n
|
||||
0000001017 00000 n
|
||||
0000001152 00000 n
|
||||
0000001395 00000 n
|
||||
0000001500 00000 n
|
||||
0000002169 00000 n
|
||||
trailer
|
||||
<< /ID
|
||||
% ReportLab generated PDF document -- digest (http://www.reportlab.com)
|
||||
[(\210\344\006bE\230CUUi\010[\)Qif) (\210\344\006bE\230CUUi\010[\)Qif)]
|
||||
|
||||
/Info 7 0 R
|
||||
/Root 6 0 R
|
||||
/Size 11 >>
|
||||
startxref
|
||||
2221
|
||||
%%EOF
|
||||
@@ -37,6 +37,9 @@
|
||||
'security/ir.model.access.csv'
|
||||
],
|
||||
'demo_xml': [],
|
||||
'test': [
|
||||
'test/document_ftp_test.yml',
|
||||
],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': None,
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
- |
|
||||
In order to test the document_ftp module in OpenERP, I will try different operation on the FTP interface, and check their impacts on OpenERP's documents and vice-versa.
|
||||
-
|
||||
In order to test behaviour of resource Directory I will make one resource Directory "Labels" in OpenERP having type "Other Resources" and Directory mapped to object "Partner"
|
||||
-
|
||||
!record {model: 'document.directory', id: dir_label}:
|
||||
name : "Labels"
|
||||
storage_id : document.storage_default
|
||||
type : ressource
|
||||
content_ids:
|
||||
- name: "Label"
|
||||
report_id : base.res_partner_address_report
|
||||
-
|
||||
Assign "res.partner" object to ressource_type_id.
|
||||
-
|
||||
!python {model: document.directory}: |
|
||||
ids = self.pool.get('ir.model').search(cr, uid, [('model','=','res.partner')])
|
||||
id = self.write(cr, uid, [ref("dir_label")], {'ressource_type_id' : ids[0]}, context)
|
||||
-
|
||||
In order to check static directory in OpenERP which is the real directory just like system's local folders,
|
||||
First I create a directory in OpenERP named "Directory 1" with storage as "Default File storage" and type as "Static Directory"
|
||||
-
|
||||
!record {model: 'document.directory', id: directory_file}:
|
||||
name : "File"
|
||||
storage_id : document.storage_default
|
||||
type : directory
|
||||
-
|
||||
I am create a one Document name "Document" and select "File" as its Directory,
|
||||
-
|
||||
When I am creating the record then "Resource Title" is filled automatic with "Document".
|
||||
-
|
||||
!record {model: 'ir.attachment', id: document_1}:
|
||||
name : "Document"
|
||||
parent_id : directory_file
|
||||
-
|
||||
In order to connect FTP server and set "File" path.
|
||||
I create one directory "New" in "File" directory from FTP and check its effect in OpenERP
|
||||
-
|
||||
Also Rename the directory name "New" to "New Directory".
|
||||
-
|
||||
Remove directory "New Directory" and remove file "Document".
|
||||
-
|
||||
!python {model: ir.attachment}: |
|
||||
from ftplib import FTP
|
||||
from tools.misc import detect_ip_addr
|
||||
from tools import config
|
||||
ftp = FTP()
|
||||
if detect_ip_addr:
|
||||
host = config.get('ftp_server_host', detect_ip_addr())
|
||||
else:
|
||||
host = config.get('ftp_server_host', '127.0.0.1')
|
||||
port = config.get('ftp_server_port','8021')
|
||||
ftp.connect(host,port)
|
||||
user = self.pool.get('res.users').read(cr, uid, uid, context)
|
||||
ftp.login(user.get('login',''),user.get('password',''))
|
||||
ftp.cwd("/" + cr.dbname+"/Documents/File/")
|
||||
ftp.mkd("New")
|
||||
ftp.rename('New','New Directory')
|
||||
ftp.cwd("/" + cr.dbname+"/Documents/File/")
|
||||
ftp.rmd('New Directory')
|
||||
ftp.delete('Document')
|
||||
ftp.quit()
|
||||
-
|
||||
In order to check directory created from FTP is working perfectly
|
||||
-
|
||||
Now I will test the same for Resource directory which is mapped with OpenERP object.
|
||||
When you open this directory from FTP clients, it displays each records of mapped resource object as directory.
|
||||
-
|
||||
Now I test FTP client and Open the "Labels" Directory to check Resource Directory in FTP.
|
||||
I can see that all Label of OpenERP are shown as children of "Labels" in FTP client as Directories
|
||||
-
|
||||
!python {model: ir.attachment}: |
|
||||
from ftplib import FTP
|
||||
from tools.misc import detect_ip_addr
|
||||
from tools import config
|
||||
ftp = FTP()
|
||||
if detect_ip_addr:
|
||||
host = config.get('ftp_server_host', detect_ip_addr())
|
||||
else:
|
||||
host = config.get('ftp_server_host', '127.0.0.1')
|
||||
port = config.get('ftp_server_port','8021')
|
||||
ftp.connect(host,port)
|
||||
user = self.pool.get('res.users').read(cr, uid, uid, context)
|
||||
ftp.login(user.get('login',''),user.get('password',''))
|
||||
ftp.cwd("/" + cr.dbname+"/Documents/Labels/")
|
||||
-
|
||||
I make sure that I Open Labels Directory successfully.
|
||||
@@ -137,7 +137,8 @@ class email_server(osv.osv):
|
||||
('imap','IMAP Server'),
|
||||
],'State', select=True, readonly=False),
|
||||
'is_ssl':fields.boolean('SSL ?', required=False),
|
||||
'date': fields.date('Date'),
|
||||
'attach':fields.boolean('Add Attachments ?', required=False),
|
||||
'date': fields.date('Date', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'user' : fields.char('User Name', size=256, required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'password' : fields.char('Password', size=1024, invisible=True, required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'note': fields.text('Description'),
|
||||
@@ -292,17 +293,18 @@ class email_server(osv.osv):
|
||||
else:
|
||||
logger.notifyChannel('imap', netsvc.LOG_WARNING, 'method def message_new is not define in model %s' % (model_pool._name))
|
||||
return False
|
||||
|
||||
# for attactment in attachents or []:
|
||||
# data_attach = {
|
||||
# 'name': attactment,
|
||||
# 'datas':binascii.b2a_base64(str(attachents.get(attactment))),
|
||||
# 'datas_fname': attactment,
|
||||
# 'description': 'Mail attachment',
|
||||
# 'res_model': server.object_id.model,
|
||||
# 'res_id': res_id,
|
||||
# }
|
||||
# self.pool.get('ir.attachment').create(cr, uid, data_attach)
|
||||
|
||||
if server.attach:
|
||||
for attactment in attachents or []:
|
||||
data_attach = {
|
||||
'name': attactment,
|
||||
'datas':binascii.b2a_base64(str(attachents.get(attactment))),
|
||||
'datas_fname': attactment,
|
||||
'description': 'Mail attachment',
|
||||
'res_model': server.object_id.model,
|
||||
'res_id': res_id,
|
||||
}
|
||||
self.pool.get('ir.attachment').create(cr, uid, data_attach)
|
||||
|
||||
if server.action_id:
|
||||
action_pool = self.pool.get('ir.actions.server')
|
||||
@@ -319,10 +321,15 @@ class email_server(osv.osv):
|
||||
his_id = history_pool.create(cr, uid, res)
|
||||
|
||||
return res_id
|
||||
|
||||
def __fetch_mail(self, cr, uid, ids, context={}):
|
||||
sendmail_thread = threading.Thread(target=self.fetch_mail, args=(cr, uid, ids))
|
||||
sendmail_thread.start()
|
||||
|
||||
def set_draft(self, cr, uid, ids, context={}):
|
||||
self.write(cr, uid, ids , {'state':'draft'})
|
||||
return True
|
||||
|
||||
def button_fetch_mail(self, cr, uid, ids, context={}):
|
||||
self.fetch_mail(cr, uid, ids)
|
||||
# sendmail_thread = threading.Thread(target=self.fetch_mail, args=(cr, uid, ids))
|
||||
# sendmail_thread.start()
|
||||
return True
|
||||
|
||||
def _fetch_mails(self, cr, uid, ids=False, context={}):
|
||||
|
||||
@@ -26,15 +26,15 @@
|
||||
<group col="6" colspan="4">
|
||||
<field name="name" select="1" colspan="4"/>
|
||||
<field name="type" select="1" on_change="onchange_server_type(type, is_ssl)"/>
|
||||
|
||||
<field name="date" select="1"/>
|
||||
<field name="is_ssl" select="1" on_change="onchange_server_type(type, is_ssl)"/>
|
||||
<field name="attach"/>
|
||||
<field name="active" select="1"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Server & Login">
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Server Information" colspan="2"/>
|
||||
<field name="is_ssl" select="1" on_change="onchange_server_type(type, is_ssl)"/>
|
||||
<field name="server" />
|
||||
<field name="port" />
|
||||
</group>
|
||||
@@ -58,7 +58,8 @@
|
||||
</notebook>
|
||||
<group col="6" colspan="4">
|
||||
<field name="state" select="1"/>
|
||||
<button string="Fetch Emails" type="object" name="__fetch_mail"/>
|
||||
<button string="Fetch Emails" type="object" name="button_fetch_mail"/>
|
||||
<button string="Set to Draft" type="object" name="set_draft"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
'security/ir.model.access.csv',
|
||||
],
|
||||
'demo_xml': [],
|
||||
'test':['test/test_idea.yml'],
|
||||
'installable': True,
|
||||
'certificate': '0071515601309',
|
||||
}
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
- |
|
||||
In order to test the Idea module in OpenERP,
|
||||
we will create a full flow, from the idea definition up to the votes and discussions on the idea.
|
||||
- |
|
||||
Given that I have an Idea category "Technical".
|
||||
-
|
||||
!record {model: idea.category, id: idea_category_technical0}:
|
||||
name: Technical
|
||||
- |
|
||||
I create a New Idea of "Technical presentation for 1 hours in every day" and specify category "Technical".
|
||||
|
||||
-
|
||||
!record {model: idea.idea, id: idea_idea_0}:
|
||||
category_id: idea_category_technical0
|
||||
description: I want that Technical presentation are arranged for 1 hours in every
|
||||
day.\nso, on that presentation, we can know all things what improvement and development
|
||||
are done in our company.\n\n\n\n\n
|
||||
title: Technical presentation for 1 hours in every day
|
||||
user_id: base.user_root
|
||||
|
||||
- |
|
||||
I check that idea on draft state.
|
||||
-
|
||||
!assert {model: idea.idea, id: idea_idea_0}:
|
||||
- state == 'draft'
|
||||
|
||||
- |
|
||||
I open this idea by click on "Open" button.
|
||||
-
|
||||
!workflow {model: idea.idea, action: idea_open, ref: idea_idea_0}
|
||||
|
||||
- |
|
||||
In order to check voting statistics in real systems I will create 2 new Users "user1".
|
||||
-
|
||||
!record {model: res.users, id: res_users_user0}:
|
||||
company_id: base.main_company
|
||||
context_lang: en_US
|
||||
login: user1
|
||||
name: user1
|
||||
password: user1
|
||||
- |
|
||||
And I will also create user2.
|
||||
-
|
||||
!record {model: res.users, id: res_users_user1}:
|
||||
company_id: base.main_company
|
||||
context_lang: en_US
|
||||
login: user2
|
||||
name: user2
|
||||
password: user2
|
||||
|
||||
- |
|
||||
In order to post vote I connect as user1 and open the idea page
|
||||
I click on "Vote" wizard and vote the idea as "Normal"
|
||||
-
|
||||
!record {model: idea.post.vote, id: idea_post_vote_0}:
|
||||
vote: 50
|
||||
- |
|
||||
Now I click on "Post Vote" button of wizard.
|
||||
-
|
||||
!python {model: idea.post.vote}: |
|
||||
uid = ref('res_users_user0')
|
||||
self.do_vote(cr, uid, [ref("idea_post_vote_0")], {'active_id': ref('idea_idea_0')})
|
||||
|
||||
- |
|
||||
To add other vote I connect as user2 and open the idea page
|
||||
I click on "Vote" wizard and vote the idea as "Very Good"
|
||||
|
||||
-
|
||||
!record {model: idea.post.vote, id: idea_post_vote_1}:
|
||||
vote: 100
|
||||
|
||||
- |
|
||||
I click on "Post Vote" button of this wizard.
|
||||
-
|
||||
!python {model: idea.post.vote}: |
|
||||
uid = ref('res_users_user1')
|
||||
self.do_vote(cr, uid, [ref("idea_post_vote_1")], {'active_id': ref('idea_idea_0')})
|
||||
|
||||
- |
|
||||
I can see that the Average score changed in "Average score" field with value 75
|
||||
-
|
||||
!record {model: idea.idea, id: idea_idea_0}:
|
||||
vote_avg: 75
|
||||
|
||||
- |
|
||||
I put one comment "We can learn many things from technical presentation" for the idea.
|
||||
-
|
||||
!record {model: idea.idea, id: idea.idea_idea_0}:
|
||||
comment_ids:
|
||||
- content: We can learn many things from technical presentation
|
||||
idea_id: idea.idea_idea_0
|
||||
user_id: res_users_user1
|
||||
- |
|
||||
I connect as Manager and close this idea by click on "Close" button.
|
||||
-
|
||||
!workflow {model: idea.idea, action: idea_close, ref: idea_idea_0}
|
||||
|
||||
- |
|
||||
I check that the idea's state is now Accepted
|
||||
-
|
||||
!assert {model: idea.idea, id: idea_idea_0}:
|
||||
- state == 'close'
|
||||
|
||||
@@ -47,7 +47,10 @@
|
||||
'lunch_report.xml',
|
||||
#'process/lunch_process.xml'
|
||||
],
|
||||
"demo_xml": ['lunch_demo.xml'],
|
||||
"demo_xml": ['lunch_demo.xml',
|
||||
],
|
||||
"test": ['test/test_lunch.yml'
|
||||
],
|
||||
"installable": True,
|
||||
}
|
||||
|
||||
|
||||
+1
-13
@@ -42,21 +42,9 @@ class lunch_product(osv.osv):
|
||||
_name = 'lunch.product'
|
||||
_description = "Lunch Product"
|
||||
|
||||
def _category_name_get(self, cr, uid, context={}):
|
||||
|
||||
""" Get category name
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param context: A standard dictionary for contextual values"""
|
||||
|
||||
obj = self.pool.get('lunch.category')
|
||||
cat_ids = obj.search(cr, uid, [])
|
||||
res = obj.read(cr, uid, cat_ids, ['name', 'category'])
|
||||
return [(str(r['id']), r['name']) for r in res]+ [('0','')]
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Name', size=50, required=True),
|
||||
'category_id': fields.selection(_category_name_get, 'Category', size=32),
|
||||
'category_id': fields.many2one('lunch.category', 'Category'),
|
||||
'description': fields.char('Description', size=128, required=False),
|
||||
'price': fields.float('Price', digits=(16,2)),
|
||||
'active': fields.boolean('Active'),
|
||||
|
||||
@@ -195,7 +195,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Products">
|
||||
<field name="name" select="1"/>
|
||||
<field name="category_id" select="1"/>
|
||||
<field name="category_id" widget='selection' select="1"/>
|
||||
<field name="description" select="1"/>
|
||||
<field name="price" select="1"/>
|
||||
<field name="active" select="1"/>
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
- |
|
||||
In order to test the Lunch module in OpenERP,
|
||||
I will create one lunch order and then check the effect on cashboxes and cashmoves
|
||||
|
||||
- |
|
||||
Given that I have a category of lunch products "Burger".
|
||||
-
|
||||
!record {model: lunch.category, id: lunch_category_burger0}:
|
||||
name: Burger
|
||||
- |
|
||||
Given that I have a product "Club1" in this category with a price of "2.75".
|
||||
|
||||
-
|
||||
!record {model: lunch.product, id: lunch_product_club1}:
|
||||
category_id: lunch_category_burger0
|
||||
name: Club1
|
||||
price: 2.75
|
||||
- |
|
||||
Given that I have a cashbox "Employee Cashbox"
|
||||
-
|
||||
!record {model: lunch.cashbox, id: lunch_cashbox_cashbox0}:
|
||||
manager: base.user_root
|
||||
name: Employee Cashbox
|
||||
- |
|
||||
I create a lunch order "LU001" for the "Club1" product
|
||||
- |
|
||||
When I select the product "club1", the price of 2.75 is automatically proposed
|
||||
-
|
||||
!record {model: lunch.order, id: lunch_order_0}:
|
||||
date: '2010-04-19'
|
||||
product: 'lunch_product_club1'
|
||||
price: 2.75
|
||||
user_id: base.user_root
|
||||
|
||||
- |
|
||||
I check that lunch order is on draft state after having created it.
|
||||
-
|
||||
!assert {model: lunch.order, id: lunch_order_0}:
|
||||
- state == 'draft'
|
||||
- |
|
||||
I confirm the order "LU001" using the "Confirm Order" wizard.
|
||||
-
|
||||
!record {model: lunch.order.confirm, id: lunch_order_confirm_0}:
|
||||
confirm_cashbox: 'lunch_cashbox_cashbox0'
|
||||
-
|
||||
I click on "Confirm Order" button of this wizard.
|
||||
-
|
||||
!python {model: lunch.order.confirm}: |
|
||||
self.confirm(cr, uid, [ref('lunch_order_confirm_0')], {'active_ids': [ref('lunch_order_0')]})
|
||||
|
||||
- |
|
||||
I check that the Cash Moves have been generated with the right box
|
||||
name
|
||||
-
|
||||
!assert {model: lunch.order, id: lunch_order_0}:
|
||||
- cashmove.id != False
|
||||
|
||||
- |
|
||||
I check that the Total on the "Employee Cashbox" is -2.75
|
||||
|
||||
-
|
||||
!assert {model: lunch.cashbox, id: lunch_cashbox_cashbox0}:
|
||||
- sum_remain == -2.75
|
||||
|
||||
- |
|
||||
I create a new lunch order "LU002" for the "Club1" product, at another date.
|
||||
-
|
||||
!record {model: lunch.order, id: lunch_order_1}:
|
||||
date: '2010-04-22'
|
||||
product: 'lunch_product_club1'
|
||||
price: 2.75
|
||||
user_id: base.user_root
|
||||
|
||||
- |
|
||||
I confirm this order.open wizard and select "Employee Cashbox".
|
||||
-
|
||||
!record {model: lunch.order.confirm, id: lunch_order_confirm_1}:
|
||||
confirm_cashbox: 'lunch_cashbox_cashbox0'
|
||||
- |
|
||||
Now I click on "Confirm Order" button of this wizard.
|
||||
-
|
||||
!python {model: lunch.order.confirm}: |
|
||||
self.confirm(cr, uid, [ref('lunch_order_confirm_1')], {'active_ids': [ref('lunch_order_1')]})
|
||||
|
||||
- |
|
||||
I check that the Total on the "Employee Cashbox" is -5.50
|
||||
-
|
||||
!assert {model: lunch.cashbox, id: lunch_cashbox_cashbox0}:
|
||||
- sum_remain == -5.50
|
||||
- |
|
||||
I reset the "Employee Cashbox" to zero using the "Set CashBox to Zero" wizard.
|
||||
-
|
||||
!record {model: lunch.cashbox.clean, id: lunch_cashbox_clean_0}:
|
||||
{}
|
||||
-
|
||||
Now click on "Set to Zero" button of this wizard.
|
||||
-
|
||||
!python {model: lunch.cashbox.clean, id: lunch_cashbox_clean_0}: |
|
||||
self.set_to_zero(cr, uid, [ref('lunch_cashbox_clean_0')], {'active_ids': [ref('lunch_cashbox_cashbox0')]})
|
||||
|
||||
- |
|
||||
I check that the Total on the "Employee Cashbox" is 0.0
|
||||
-
|
||||
!assert {model: lunch.cashbox, id: lunch_cashbox_cashbox0}:
|
||||
- sum_remain == 0.00
|
||||
|
||||
- |
|
||||
I cancel the order "LU002"
|
||||
-
|
||||
!record {model: lunch.order.cancel, id: lunch_order_cancel_0}:
|
||||
{}
|
||||
- |
|
||||
I click on "Yes" button of this wizard for cancel order.
|
||||
|
||||
-
|
||||
!python {model: lunch.order.cancel}: |
|
||||
self.cancel(cr, uid, [ref('lunch_order_cancel_0')], {'active_ids': [ref('lunch_order_1')]})
|
||||
|
||||
- |
|
||||
I test that the Cash Moves revord have been removed for the order LU002.
|
||||
-
|
||||
!assert {model: lunch.order, id: lunch_order_1}:
|
||||
- cashmove.id == False
|
||||
|
||||
- |
|
||||
I check that the Total on the "Employee Cashbox" is -2.75
|
||||
-
|
||||
!assert {model: lunch.cashbox, id: lunch_cashbox_cashbox0}:
|
||||
- sum_remain == -2.75
|
||||
|
||||
@@ -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)])
|
||||
|
||||
|
||||
@@ -8,13 +8,13 @@ msgstr ""
|
||||
"Project-Id-Version: pt_BR\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-02-22 19:37+0000\n"
|
||||
"PO-Revision-Date: 2010-04-27 11:00+0000\n"
|
||||
"Last-Translator: Luiz Fernando M.França <Unknown>\n"
|
||||
"Language-Team: <pt@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-04-17 03:55+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-04-28 03:44+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: project
|
||||
@@ -461,7 +461,7 @@ msgstr "Tempo Planejado"
|
||||
#: view:project.task:0
|
||||
#: view:project.task.work:0
|
||||
msgid "Task Work"
|
||||
msgstr "Trabalho na Tarefa"
|
||||
msgstr "Tarefas realizadas"
|
||||
|
||||
#. module: project
|
||||
#: selection:res.company,project_time_mode:0
|
||||
|
||||
@@ -68,7 +68,9 @@ class smtpclient(osv.osv):
|
||||
_columns = {
|
||||
'name' : fields.char('Server Name', size=256, required=True),
|
||||
'from_email' : fields.char('Email From', size=256),
|
||||
'email' : fields.char('Email Address', size=256, required=True, readonly=True, states={'new':[('readonly',False)]}),
|
||||
'email':fields.char('Email Address', size=256, required=True, readonly=True, states={'new':[('readonly',False)]}),
|
||||
'cc_to':fields.char('Send copy to', size=256, readonly=True, states={'new':[('readonly',False)]}, help="use comma to supply multiple address. email@domain.com, email2@domain.com"),
|
||||
'bcc_to':fields.char('Send blind copy to', size=256, readonly=True, states={'new':[('readonly',False)]}, help="use comma to supply multiple address. email@domain.com, email2@domain.com"),
|
||||
'user' : fields.char('User Name', size=256, readonly=True, states={'new':[('readonly',False)]}),
|
||||
'password' : fields.char('Password', size=1024, invisible=True, readonly=True, states={'new':[('readonly',False)]}),
|
||||
'server' : fields.char('SMTP Server', size=256, required=True, readonly=True, states={'new':[('readonly',False)]}),
|
||||
@@ -386,7 +388,7 @@ class smtpclient(osv.osv):
|
||||
emailto = [emailto]
|
||||
|
||||
ir_pool = self.pool.get('ir.attachment')
|
||||
|
||||
|
||||
for to in emailto:
|
||||
msg = MIMEMultipart()
|
||||
msg['Subject'] = tools.ustr(subject)
|
||||
@@ -420,7 +422,13 @@ class smtpclient(osv.osv):
|
||||
msg['X-OpenERP-Server-Host'] = socket.gethostname()
|
||||
msg['X-OpenERP-Server-Version'] = release.version
|
||||
msg['Message-Id'] = "<%s-openerp-@%s>" % (time.time(), socket.gethostname())
|
||||
|
||||
|
||||
if smtp_server.cc_to:
|
||||
msg['Cc'] = smtp_server.cc_to
|
||||
|
||||
if smtp_server.bcc_to:
|
||||
msg['Bcc'] = smtp_server.bcc_to
|
||||
|
||||
#attach files from disc
|
||||
for file in attachments:
|
||||
part = MIMEBase('application', "octet-stream")
|
||||
@@ -442,8 +450,8 @@ class smtpclient(osv.osv):
|
||||
data = {
|
||||
'to':to,
|
||||
'server_id':server_id,
|
||||
'cc':False,
|
||||
'bcc':False,
|
||||
'cc':smtp_server.cc_to or False,
|
||||
'bcc':smtp_server.bcc_to or False,
|
||||
'name':subject,
|
||||
'body':body,
|
||||
'serialized_message':message,
|
||||
@@ -499,7 +507,7 @@ class smtpclient(osv.osv):
|
||||
self.open_connection(cr, uid, ids, email.server_id.id)
|
||||
|
||||
try:
|
||||
self.smtpServer[email.server_id.id].sendmail(email.server_id.email, email.to, tools.ustr(email.serialized_message))
|
||||
self.smtpServer[email.server_id.id].sendmail(email.server_id.email, [email.to, email.cc, email.bcc], tools.ustr(email.serialized_message))
|
||||
message = "message sent successfully to %s from %s server" % (email.to, email.server_id.name)
|
||||
logger.notifyChannel('smtp', netsvc.LOG_INFO, message)
|
||||
except Exception, e:
|
||||
@@ -539,6 +547,7 @@ class smtpclient(osv.osv):
|
||||
return result
|
||||
|
||||
def set_to_draft(self, cr, uid, ids, context={}):
|
||||
self.stop_process(cr, uid, ids, context)
|
||||
self.write(cr, uid, ids, {'state':'new', 'code':False})
|
||||
return True
|
||||
|
||||
@@ -555,17 +564,19 @@ class smtpclient(osv.osv):
|
||||
'interval_type':'minutes',
|
||||
'user_id':uid,
|
||||
'numbercall':-1,
|
||||
'doall':False
|
||||
'doall':False,
|
||||
'active':False
|
||||
}
|
||||
id = self.pool.get('ir.cron').create(cr, uid, res)
|
||||
self.write(cr, uid, ids, {'process_id':id})
|
||||
|
||||
return True
|
||||
|
||||
def start_process(self, cr, uid, ids, context={}):
|
||||
process = self.browse(cr, uid, ids[0], context)
|
||||
if not process.process_id:
|
||||
if not process.process_id or process.state != 'confirm':
|
||||
raise osv.except_osv(_('SMTP Server Error !'), _('Server is not Verified, Please Verify the Server !'))
|
||||
|
||||
|
||||
pid = process.process_id.id
|
||||
self.pool.get('ir.cron').write(cr, uid, [pid], {'active':True})
|
||||
self.write(cr, uid, ids, {'pstate':'running'})
|
||||
|
||||
@@ -77,6 +77,12 @@
|
||||
<field name="delete_queue" select="2" />
|
||||
<field name="delete_queue_period" select="2" attrs="{'readonly':[('delete_queue','not in',['content','all'])]}"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Email Copy Configuration" colspan="2" />
|
||||
<field name="cc_to" select="2" />
|
||||
<field name="bcc_to" select="2" />
|
||||
</group>
|
||||
|
||||
<newline/>
|
||||
<separator string="Server Information" colspan="4"/>
|
||||
<group col="3" colspan="4">
|
||||
|
||||
@@ -48,7 +48,7 @@ class verifycode(wizard.interface):
|
||||
if code == data['form']['code']:
|
||||
if server_pool.create_process(cr, uid, [data['id']], context={}):
|
||||
server_pool.write(cr, uid, [data['id']], {'state':'confirm', 'pstate':'running'})
|
||||
print 'process created'
|
||||
server_pool.start_process(cr, uid, [data['id']], context)
|
||||
else:
|
||||
raise osv.except_osv(_('Error'), _('Verification failed. Invalid Verification Code!'))
|
||||
|
||||
|
||||
@@ -47,4 +47,4 @@
|
||||
##############################################################################
|
||||
|
||||
import partner
|
||||
|
||||
import installer
|
||||
|
||||
@@ -39,7 +39,8 @@
|
||||
Select a section for which you want to create case.''',
|
||||
"init_xml" : [],
|
||||
"demo_xml" : [],
|
||||
"update_xml" : ['security/ir.model.access.csv'],
|
||||
"update_xml" : ['thunderbird_installer.xml',
|
||||
'security/ir.model.access.csv'],
|
||||
"active": False,
|
||||
"installable": True
|
||||
}
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import fields
|
||||
from osv import osv
|
||||
from tools import config
|
||||
|
||||
import base64
|
||||
|
||||
class thunderbird_installer(osv.osv_memory):
|
||||
_name = 'thunderbird.installer'
|
||||
_inherit = 'res.config.installer'
|
||||
|
||||
def process_plugin(self, cr, uid, ids, context):
|
||||
"""
|
||||
Default Attach Thunderbird Plug-in File.
|
||||
"""
|
||||
data = {}
|
||||
file = open(config['addons_path'] + "/thunderbird/plugin/tiny_plugin-2.0.xpi", 'r')
|
||||
data['plugin_file'] = base64.encodestring(file.read())
|
||||
self.write(cr, uid, ids, data)
|
||||
return False
|
||||
|
||||
_columns = {
|
||||
'name':fields.char('File name', size=34, required=True, help='Save Thunderbird plugin file.'),
|
||||
'thunderbird':fields.boolean('Thunderbird Module ', help="Allows you to select an object that you’d like to add to your email and its attachments."),
|
||||
'plugin_file':fields.binary('Thunderbird Plug-in', readonly=True, help="Thunderbird plug-in file. Save as this file and install this plug-in in thunderbir."),
|
||||
|
||||
}
|
||||
_defaults = {
|
||||
'thunderbird' : True,
|
||||
'name' : 'tiny_plugin-2.0.xpi',
|
||||
}
|
||||
|
||||
thunderbird_installer()
|
||||
@@ -92,9 +92,9 @@ class tinythunderbird_partner(osv.osv):
|
||||
partner=add_obj.read(cr,user,partner_ids,['partner_id'])
|
||||
if partner:
|
||||
dictcreate.update({'partner_id':partner[0]['partner_id'][0]})
|
||||
search_id = self.pool.get('res.request.link').search(cr,user,[('object','=',dictcreate['ref'].split(',')[0])])
|
||||
if not search_id:
|
||||
create_link_id = self.pool.get('res.request.link').create(cr,user,{'name':dictcreate['ref'].split(',')[0],'object':dictcreate['ref'].split(',')[0]})
|
||||
# search_id = self.pool.get('res.request.link').search(cr,user,[('object','=',dictcreate['ref'].split(',')[0])])
|
||||
# if not search_id:
|
||||
# create_link_id = self.pool.get('res.request.link').create(cr,user,{'name':dictcreate['ref'].split(',')[0],'object':dictcreate['ref'].split(',')[0]})
|
||||
create_id = self.pool.get(dictcreate.get('object','crm.case')).create(cr, user, dictcreate)
|
||||
cases=case_pool.browse(cr,user,[create_id])
|
||||
case_pool._history(cr, user, cases, _('Archive'), history=True, email=False)
|
||||
@@ -162,12 +162,15 @@ class tinythunderbird_partner(osv.osv):
|
||||
dictcreate = dict(vals)
|
||||
datas = [dictcreate['datas']]
|
||||
name = [dictcreate['name']]
|
||||
f_name = [dictcreate['datas_fname']]
|
||||
if(dictcreate['datas'].__contains__(',')):
|
||||
name = dictcreate['name'].split(',')
|
||||
datas = dictcreate['datas'].split(',')
|
||||
f_name = dictcreate['datas_fname'].split(',')
|
||||
for i in range(0,datas.__len__()):
|
||||
dictcreate['name'] = name[i]
|
||||
dictcreate['datas'] = datas[i]
|
||||
dictcreate['datas_fname'] = f_name[i]
|
||||
create_id = self.pool.get('ir.attachment').create(cr,user,dictcreate)
|
||||
return 0
|
||||
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,103 @@
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_thunderbird_installer" model="ir.ui.view">
|
||||
<field name="name">thunderbird.installer.view</field>
|
||||
<field name="model">thunderbird.installer</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="base.res_config_installer"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<form position="attributes">
|
||||
<attribute name="string">Thunderbird Module Installation</attribute>
|
||||
</form>
|
||||
<separator string="title" position="attributes">
|
||||
<attribute name="string">Configure Thunderbird Module</attribute>
|
||||
</separator>
|
||||
<xpath expr="//label[@string='description']" position="attributes">
|
||||
<attribute name="string">This module is required for the thuderbird plug-in to work properly.This allows you to select an object that you had like to add to your email and its attachments. You can select a partner, a task, a project, an analytical account, or any other object and attach selected mail as .eml file in attachment of selected record.</attribute>
|
||||
</xpath>
|
||||
<group colspan="8">
|
||||
<separator string="Thunderbird" colspan="4"/>
|
||||
<field name="thunderbird"/>
|
||||
<field name="name" invisible="1"/>
|
||||
<newline/>
|
||||
|
||||
<field name="plugin_file"/>
|
||||
<button name="process_plugin" icon="gtk-execute" string="Get Plugin File" type="object"/>
|
||||
<newline/>
|
||||
<separator string="Thunderbird plugin installation note." colspan="4"/>
|
||||
<label colspan="8" string="Save The thunderbird plugin Follow the following step to install thunderbird plugin ? 1. From Menu Bar, Open Tools > Add ons. 2. Now click on install button and a browser window will appear. 3. Just select the (.xpi) file from thunderbird/plugin directory and click ok, a new software installation window will appear and within a short time Install Now button will be enabled. 4. Click on Install Now and restart Thunderbird. 5. Now Thunderbird plugin is installed."/>
|
||||
</group>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_thunderbird_installer" model="ir.actions.act_window">
|
||||
<field name="name">Thunderbird Module Installation</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">thunderbird.installer</field>
|
||||
<field name="view_id" ref="view_thunderbird_installer"/>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record id="thunderbird_installer_todo" model="ir.actions.todo">
|
||||
<field name="action_id" ref="action_thunderbird_installer"/>
|
||||
<field name="sequence">3</field>
|
||||
</record>
|
||||
|
||||
<!-- Configuration wizard. -->
|
||||
|
||||
<record id="view_thunderbird_wizard" model="ir.ui.view">
|
||||
<field name="name">thunderbird.wizard</field>
|
||||
<field name="model">thunderbird.installer</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string= "Thunderbird Installation">
|
||||
<group colspan="4">
|
||||
<separator string="Configure Thunderbird Module" colspan="4"/>
|
||||
<group colspan="4" col="10">
|
||||
<group colspan="2">
|
||||
<image name="gtk-dialog-info"/>
|
||||
<newline/>
|
||||
<label align="0.0" string="This module is required for the thuderbird plug-in to work properly.This allows you to select an object that you had like to add to your email and its attachments. You can select a partner, a task, a project, an analytical account, or any other object and attach selected mail as .eml file in attachment of selected record." width="200"/>
|
||||
</group>
|
||||
<group colspan="8">
|
||||
<separator string="Thunderbird" colspan="4"/>
|
||||
<field name="thunderbird"/>
|
||||
<field name="name" invisible="1"/>
|
||||
<newline/>
|
||||
<field name="plugin_file"/>
|
||||
<button name="process_plugin" icon="gtk-execute" string="Get Plugin File" type="object"/>
|
||||
<newline/>
|
||||
<separator string="Thunderbird plugin installation note." colspan="4"/>
|
||||
<label colspan="8" string="Save The thunderbird plugin Follow the following step to install thunderbird plugin ? 1. From Menu Bar, Open Tools > Add ons. 2. Now click on install button and a browser window will appear. 3. Just select the (.xpi) file from thunderbird/plugin directory and click ok, a new software installation window will appear and within a short time Install Now button will be enabled. 4. Click on Install Now and restart Thunderbird. 5. Now Thunderbird plugin is installed."/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<separator string="" colspan="4"/>
|
||||
<group colspan="4">
|
||||
<label align="0.0" string="" colspan="3"/>
|
||||
<button colspan="1" icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_thunderbird_wizard" model="ir.actions.act_window">
|
||||
<field name="name">Thunderbird Module Installation</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">thunderbird.installer</field>
|
||||
<field name="view_id" ref="view_thunderbird_wizard"/>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_base_config_plugins" name="Plugins" parent="base.menu_base_config" sequence="10" />
|
||||
<menuitem id="menu_base_config_plugins_thunderbird" action="action_thunderbird_wizard" name="Thunderbird" parent="menu_base_config_plugins" sequence="10" />
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -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