Julien Thewys has proposed merging
lp:~openerp-dev/openobject-addons/trunk-base_contact-last_name-jth into
lp:openobject-addons/6.1.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-base_contact-last_name-jth/+merge/93858
Fixes minor usability and consistency concerns about the new "last_name" field
in base_contact:
- the old "name" was used instead of "last_name"
- first_name should come first, last_name should come last (except in a few
cultures).
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-base_contact-last_name-jth/+merge/93858
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-base_contact-last_name-jth.
=== modified file 'base_contact/base_contact.py'
--- base_contact/base_contact.py 2012-02-15 13:22:13 +0000
+++ base_contact/base_contact.py 2012-02-20 15:12:46 +0000
@@ -29,9 +29,9 @@
_description = "Contact"
def _name_get_full(self, cr, uid, ids, prop, unknow_none, context=None):
- result = {}
+ result = dict.fromkeys(ids, "NONAME")
for rec in self.browse(cr, uid, ids, context=context):
- result[rec.id] = rec.last_name+' '+(rec.first_name or '')
+ result[rec.id] = '%s %s' % ((rec.first_name or ''), rec.last_name)
return result
_columns = {
@@ -73,7 +73,7 @@
if context is None:
context = {}
if name:
- ids = self.search(cr, uid, ['|',('name', operator, name),('first_name', operator, name)] + args, limit=limit, context=context)
+ ids = self.search(cr, uid, ['|',('last_name', operator, name),('first_name', operator, name)] + args, limit=limit, context=context)
else:
ids = self.search(cr, uid, args, limit=limit, context=context)
return self.name_get(cr, uid, ids, context=context)
=== modified file 'base_contact/base_contact_view.xml'
--- base_contact/base_contact_view.xml 2012-01-31 13:36:57 +0000
+++ base_contact/base_contact_view.xml 2012-02-20 15:12:46 +0000
@@ -10,8 +10,8 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Partner Contact">
- <field name="name"/>
<field name="first_name"/>
+ <field name="last_name"/>
<field name="mobile"/>
<field name="email"/>
<field name="lang_id"/>
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp