[MERGE] lp:~openerp-dev/openobject-addons/trunk-view_improvements-pza

bzr revid: psi@tinyerp.com-20131108125525-j8082quu1q1452zf
This commit is contained in:
Purnendu Singh (OpenERP)
2013-11-08 18:25:25 +05:30
5 changed files with 13 additions and 8 deletions
+6 -4
View File
@@ -129,16 +129,18 @@ class mail_alias(osv.Model):
]
def name_get(self, cr, uid, ids, context=None):
"""Return the mail alias display alias_name, inclusing the implicit
mail catchall domain from config.
e.g. `jobs@openerp.my.openerp.com` or `sales@openerp.my.openerp.com`
"""Return the mail alias display alias_name, including the implicit
mail catchall domain if exists from config otherwise "New Alias".
e.g. `jobs@openerp.my.openerp.com` or `jobs` or 'New Alias'
"""
res = []
for record in self.browse(cr, uid, ids, context=context):
if record.alias_name and record.alias_domain:
res.append((record['id'], "%s@%s" % (record.alias_name, record.alias_domain)))
elif record.alias_name:
res.append((record['id'], "%s" % (record.alias_name)))
else:
res.append((record['id'], False))
res.append((record['id'], "New Alias"))
return res
def _find_unique(self, cr, uid, name, context=None):
+3
View File
@@ -68,6 +68,9 @@ class mail_mail(osv.Model):
'state': 'outgoing',
}
def name_get(self, cr, uid, ids, context=None):
return [(mail["id"], "%s" % (mail['subject'] or "New Mail")) for mail in self.read(cr, uid, ids, ['subject'], context=context)]
def default_get(self, cr, uid, fields, context=None):
# protection for `default_type` values leaking from menu action context (e.g. for invoices)
# To remove when automatic context propagation is removed in web client
+1 -1
View File
@@ -10,6 +10,7 @@
<button name="send" string="Send Now" type="object" states='outgoing' class="oe_highlight"/>
<button name="mark_outgoing" string="Retry" type="object" states='exception,cancel'/>
<button name="cancel" string="Cancel" type="object" states='outgoing'/>
<field name="state" widget="statusbar" statusbar_visible="outgoing,sent,received,exception,cancel"/>
</header>
<sheet>
<label for="subject" class="oe_edit_only"/>
@@ -36,7 +37,6 @@
<group string="Status">
<field name="auto_delete"/>
<field name="type"/>
<field name="state"/>
<field name="mail_server_id"/>
<field name="model"/>
<field name="res_id"/>
+1 -1
View File
@@ -179,7 +179,7 @@ class mail_message(osv.Model):
string='Notifications', auto_join=True,
help='Technical field holding the message notifications. Use notified_partner_ids to access notified partners.'),
'subject': fields.char('Subject'),
'date': fields.datetime('Date'),
'date': fields.datetime('Date', readonly=1),
'message_id': fields.char('Message-Id', help='Message unique identifier', select=1, readonly=1),
'body': fields.html('Contents', help='Automatically sanitized HTML contents'),
'to_read': fields.function(_get_to_read, fnct_search=_search_to_read,
+2 -2
View File
@@ -5,12 +5,12 @@
<field name="model">ir.header_img</field>
<field name="arch" type="xml">
<form string="Header Image" version="7.0">
<field name="img" widget="image" class="oe_left"/>
<group>
<field name="name"/>
<field name="type"/>
<field name='company_id' />
<field name="company_id"/>
</group>
<field name="img" widget="image" class="oe_right"/>
</form>
</field>
</record>