[MERGE] Merge from trunk addons
bzr revid: mra@mra-laptop-20100927045900-fyw8qn8qus690va4
This commit is contained in:
commit
b039a39418
|
@ -62,7 +62,7 @@
|
|||
</para>
|
||||
<para style="P6">[[o.artist2_id and 'Artist2: '+o.artist2_id.name or False]]</para>
|
||||
<para style="P8">
|
||||
<font face="Courier">[[o.artist_id2 and 'Biography: '+o.artist_id2.biography or False]]</font>
|
||||
<font face="Courier">[[o.artist2_id and 'Biography: '+o.artist2_id.biography or False]]</font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -1531,8 +1531,12 @@ true, it will allow you to hide the event alarm information without removing it.
|
|||
result = []
|
||||
if fields and 'date' not in fields:
|
||||
fields.append('date')
|
||||
|
||||
real_ids = [item2 for item1, item2 in select]
|
||||
event_values = dict([(res['id'], res) for res in super(calendar_event, self).read(cr, uid, real_ids, fields=fields, context=context, load=load)])
|
||||
|
||||
for base_calendar_id, real_id in select:
|
||||
res = super(calendar_event, self).read(cr, uid, real_id, fields=fields, context=context, load=load)
|
||||
res = event_values[real_id]
|
||||
ls = base_calendar_id2real_id(base_calendar_id, with_date=res and res.get('duration', 0) or 0)
|
||||
if not isinstance(ls, (str, int, long)) and len(ls) >= 2:
|
||||
res['date'] = ls[1]
|
||||
|
|
|
@ -61,7 +61,7 @@ class res_partner_contact(osv.osv):
|
|||
'function': fields.related('job_ids', 'function', type='char', \
|
||||
string='Main Function'),
|
||||
'job_id': fields.function(_main_job, method=True, type='many2one',\
|
||||
relation='res.partner.job', string='Main Job'),
|
||||
relation='res.partner.job', string='Main Job', store=True),
|
||||
'email': fields.char('E-Mail', size=240),
|
||||
'comment': fields.text('Notes', translate=True),
|
||||
'photo': fields.binary('Image'),
|
||||
|
@ -151,10 +151,15 @@ class res_partner_job(osv.osv):
|
|||
if not len(ids):
|
||||
return []
|
||||
res = []
|
||||
for r in self.browse(cr, uid, ids):
|
||||
funct = r.function and (", " + r.function) or ""
|
||||
res.append((r.id, self.pool.get('res.partner.contact').name_get(cr, uid, \
|
||||
[r.contact_id.id])[0][1] + funct))
|
||||
|
||||
jobs = self.browse(cr, uid, ids)
|
||||
contact_ids = [rec.contact_id.id for rec in jobs]
|
||||
contact_names = dict(self.pool.get('res.partner.contact').name_get(cr, uid, contact_ids, context=context))
|
||||
|
||||
for r in jobs:
|
||||
function_name = r.function
|
||||
funct = function_name and (", " + function_name) or ""
|
||||
res.append((r.id, contact_names.get(r.contact_id.id, '') + funct))
|
||||
return res
|
||||
|
||||
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False):
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
{
|
||||
"name" : "Email Integrated Document",
|
||||
"version" : "1.1",
|
||||
"depends" : ["base", "document", "mail_gateway"],
|
||||
"depends" : ["base", "document", "fetchmail","mail_gateway"],
|
||||
"author" : "Tiny",
|
||||
"description": """Email Integrated Document
|
||||
* Email based Document submission
|
||||
|
|
|
@ -36,11 +36,11 @@ class product_product(osv.osv):
|
|||
date_to = context.get('date_to', time.strftime('%Y-12-31'))
|
||||
invoice_state = context.get('invoice_state', 'open_paid')
|
||||
if 'date_from' in field_names:
|
||||
res[val.id]['date_from']=date_from
|
||||
res[val.id]['date_from']=date_from
|
||||
if 'date_to' in field_names:
|
||||
res[val.id]['date_to']=date_to
|
||||
if 'invoice_state' in field_names:
|
||||
res[val.id]['invoice_state']=invoice_state
|
||||
res[val.id]['invoice_state']=invoice_state
|
||||
invoice_types = ()
|
||||
states = ()
|
||||
if invoice_state=='paid':
|
||||
|
@ -114,4 +114,4 @@ class product_product(osv.osv):
|
|||
|
||||
product_product()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
Loading…
Reference in New Issue