diff --git a/partner_firstname/__openerp__.py b/partner_firstname/__openerp__.py
index c407ab7d3..3a9163d1a 100644
--- a/partner_firstname/__openerp__.py
+++ b/partner_firstname/__openerp__.py
@@ -17,7 +17,6 @@
# along with this program. If not, see .
#
##############################################################################
-
{
'name': 'Partner first name, last name',
'description': """
@@ -35,8 +34,9 @@ Jonathan Nemry
Olivier Laurent
""",
- 'version': '1.2',
+ 'version': '7.0.1.2.0',
'author': "Camptocamp,Odoo Community Association (OCA)",
+ "license": "AGPL-3",
'maintainer': 'Camptocamp, Acsone',
'category': 'Extra Tools',
'website': 'http://www.camptocamp.com, http://www.acsone.eu',
diff --git a/partner_firstname/partner.py b/partner_firstname/partner.py
index 278848fab..bcb2cd600 100644
--- a/partner_firstname/partner.py
+++ b/partner_firstname/partner.py
@@ -142,7 +142,6 @@ class ResPartner(orm.Model):
readonly=True,
fnct_inv=_write_name
),
-
'firstname': fields.char("Firstname"),
- 'lastname': fields.char("Lastname", required=True),
+ 'lastname': fields.char("Lastname"),
}
diff --git a/partner_relations/model/res_partner_relation_all.py b/partner_relations/model/res_partner_relation_all.py
index a5ed94bcc..c248b2d26 100644
--- a/partner_relations/model/res_partner_relation_all.py
+++ b/partner_relations/model/res_partner_relation_all.py
@@ -98,17 +98,17 @@ class ResPartnerRelationAll(Model):
}
def name_get(self, cr, uid, ids, context=None):
- """Create name from both partners and relation."""
- return dict([
+ """Name of relation is names of partners involved + type."""
+ return [
(this.id, '%s %s %s' % (
this.this_partner_id.name,
this.type_selection_id.name_get()[0][1],
this.other_partner_id.name,
))
- for this in self.browse(cr, uid, ids, context=context)])
+ for this in self.browse(cr, uid, ids, context=context)]
def write(self, cr, uid, ids, vals, context=None):
- """divert non-problematic writes to underlying table"""
+ """Divert non-problematic writes to underlying table."""
# pylint: disable=W8106
return self.pool['res.partner.relation'].write(
cr, uid,
diff --git a/partner_relations/model/res_partner_relation_type_selection.py b/partner_relations/model/res_partner_relation_type_selection.py
index 5b5e29cb8..18bc2fbf1 100644
--- a/partner_relations/model/res_partner_relation_type_selection.py
+++ b/partner_relations/model/res_partner_relation_type_selection.py
@@ -133,6 +133,7 @@ class ResPartnerRelationTypeSelection(orm.Model):
def name_get(self, cr, uid, ids, context=None):
'translate name using translations from res.partner.relation.type'
+ context = context or {'lang': 'en_US'} # prevent crash later
result = super(ResPartnerRelationTypeSelection, self).name_get(
cr, uid, ids, context=context)
ir_translation = self.pool['ir.translation']
diff --git a/partner_relations/view/res_partner_relation_type.xml b/partner_relations/view/res_partner_relation_type.xml
index d0a3c0746..00b2ff7e9 100644
--- a/partner_relations/view/res_partner_relation_type.xml
+++ b/partner_relations/view/res_partner_relation_type.xml
@@ -2,7 +2,6 @@
res.partner.relation.type
- tree
@@ -14,7 +13,6 @@
res.partner.relation.type
- form