Merge lp:~camptocamp/partner-contact-management/7.0-fix-partner_firstname-user-form into lp:~partner-contact-core-editors/partner-contact-management/7.0

Proposed by Yannick Vaucher @ Camptocamp
Status: Superseded
Proposed branch: lp:~camptocamp/partner-contact-management/7.0-fix-partner_firstname-user-form
Merge into: lp:~partner-contact-core-editors/partner-contact-management/7.0
Diff against target: 61 lines (+24/-5)
3 files modified
partner_firstname/__openerp__.py (+5/-2)
partner_firstname/res_user.py (+4/-3)
partner_firstname/res_user_view.xml (+15/-0)
To merge this branch: bzr merge lp:~camptocamp/partner-contact-management/7.0-fix-partner_firstname-user-form
Reviewer Review Type Date Requested Status
Joël Grand-Guillaume @ camptocamp code review, no test Approve
Guewen Baconnier @ Camptocamp Needs Fixing
Review via email: mp+149546@code.launchpad.net

This proposal has been superseded by a proposal from 2013-02-20.

To post a comment you must log in.
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

l.39
    if not vals.get('name'):

review: Needs Fixing
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

l.56 I think that you have to use:
<attribute name="readonly" eval="False"/>

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

<attribute name="readonly" eval="False"/> fails.

As it is an attribute, I think it is ok to define it as a string.

18. By Yannick Vaucher @ Camptocamp

[IMP] partner_firstname - less steps in partner vals(e)

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

vals is fixed however launchpad failed to upload the diff...

I try to superseed the MP

Revision history for this message
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote :

LGTM

review: Approve (code review, no test)

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'partner_firstname/__openerp__.py'
2--- partner_firstname/__openerp__.py 2013-02-05 08:26:54 +0000
3+++ partner_firstname/__openerp__.py 2013-02-20 12:46:24 +0000
4@@ -23,12 +23,15 @@
5
6 The field 'name' becomes a stored function field concatenating lastname, firstname
7 """,
8- 'version': '1.0',
9+ 'version': '1.0.1',
10 'author': 'Camptocamp',
11 'category': 'MISC',
12 'website': 'http://www.camptocamp.com',
13 'depends': ['base'],
14- 'data': ['partner_view.xml'],
15+ 'data': [
16+ 'partner_view.xml',
17+ 'res_user_view.xml',
18+ ],
19 'demo': [],
20 'test': [],
21 'auto_install': False,
22
23=== modified file 'partner_firstname/res_user.py'
24--- partner_firstname/res_user.py 2013-02-05 20:58:07 +0000
25+++ partner_firstname/res_user.py 2013-02-20 12:46:24 +0000
26@@ -1,4 +1,4 @@
27-# -*- encoding: utf-8 -*-
28+# -*- coding: utf-8 -*-
29 ##############################################################################
30 #
31 # Author: Nicolas Bessi. Copyright Camptocamp SA
32@@ -27,5 +27,6 @@
33 _inherit = 'res.users'
34
35 def create(self, cursor, uid, vals, context=None):
36- vals['name'] = vals['login']
37- return super(ResUsers, self).create(cursor, uid, vals, context=context)
38\ No newline at end of file
39+ if not 'name' in vals or not vals['name']:
40+ vals['name'] = vals['login']
41+ return super(ResUsers, self).create(cursor, uid, vals, context=context)
42
43=== added file 'partner_firstname/res_user_view.xml'
44--- partner_firstname/res_user_view.xml 1970-01-01 00:00:00 +0000
45+++ partner_firstname/res_user_view.xml 2013-02-20 12:46:24 +0000
46@@ -0,0 +1,15 @@
47+<?xml version="1.0" encoding="utf-8"?>
48+<openerp>
49+ <data>
50+ <record id="view_users_form" model="ir.ui.view">
51+ <field name="name">res.users.form.firstname</field>
52+ <field name="model">res.users</field>
53+ <field name="inherit_id" ref="base.view_users_form"/>
54+ <field name="arch" type="xml">
55+ <field name="name" position="attributes">
56+ <attribute name="readonly">False</attribute>
57+ </field>
58+ </field>
59+ </record>
60+ </data>
61+</openerp>

Subscribers

People subscribed via source and target branches

to status/vote changes: