Merge lp:~invitu/ocb-server/7.0 into lp:ocb-server

Proposed by invitu
Status: Rejected
Rejected by: Stefan Rijnhart (Opener)
Proposed branch: lp:~invitu/ocb-server/7.0
Merge into: lp:ocb-server
Diff against target: 12 lines (+1/-1)
1 file modified
openerp/addons/base/res/res_partner.py (+1/-1)
To merge this branch: bzr merge lp:~invitu/ocb-server/7.0
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) Disapprove
Stefan Rijnhart (Opener) functionally, migratory Disapprove
Review via email: mp+169658@code.launchpad.net

Description of the change

[IMP] fix-1191374 : birthdate field in res_partner should be "Date" instead of "Char"

To post a comment you must log in.
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Hi Invitu,

in practice, you do not need a year of birth to congratulate a partner/customer on his birthday. Having this a date field, you would always need a year of birth which makes it more awkward to harvest this kind of information. Incorrect years of birth in your database are also more likely to occur, as you would always need to enter something for the year. This could lead to slightly embarrassing situations.

I do not think this is a good idea functionally, sorry. Apart from that, this change is likely to lose existing birthdates in the database with no clear way how to handle the potentially unstructured character of the current data in a migration script. In this case, you probably should create a custom module that replaces this field in your own databases.

review: Disapprove (functionally, migratory)
Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

I agree with Stefan. Setting the MP to rejected then.

review: Disapprove
Revision history for this message
Ronald Portier (Therp) (rportier1962) wrote :

I think in this case I have to disagree with my estimated collegues Stefan and Holger.

IMHO there are many cases where a real birthdate is required.

I dont really don't know any real business case for just a birthday. Which company is really sending congratulations on birthdays?

But is if a partner is a employee, we are required to know the exact date of birth. Or there are special arrangement for employee's older then x years.

The same for consumers. We might be required to register their date of birth. For instance if we sell alcoholic drinks, or other things that might have an age limit.

Or our "customers" might be patients in a hospital application.

So I can think of many reasons to need an exact date of birth, but hardly any reason at all to register just the day and month.

Of course there is the legitimate concern on how to convert the existing data. In practice most dates can be recognized even from unstructured data, if only the most likely order for MM-DD or DD_MM is selected.

Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

very good points. unrejecting for further discussion

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Hi Ronald,

to clarify, I think replacing this field in OpenERP addons trunk is certainly an option (there are pros and cons) but I think this change is too disruptive to have a place in the backports. Do you think that having this change in the backports, with its inevitable and from a user perspective, unexpected data loss is warranted?

Revision history for this message
invitu (invitu) wrote :

ok, I tested your data loss idea and it works ;-) (I mean the existing data are lost)

I agree with your proposal to make a custom field

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Thanks for sharing your opinion, Invitu. Setting this MP to rejected (for lack of a status 'retracted') as per your comment.

Revision history for this message
Ronald Portier (Therp) (rportier1962) wrote :

I think it is OK this proposal is rejected for backports. But it will definitely be a good idea to have a real birthdate date field on trunk.

Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

the thing is, it is different to store a birthday (which should still be machine parseable) and a birthdate.

When the field is called birthdate, I expect a date.

Unmerged revisions

5023. By invitu

[IMP] fix-1191374 : birthdate field in res_partner should be "Date" instead of "Char"

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openerp/addons/base/res/res_partner.py'
2--- openerp/addons/base/res/res_partner.py 2013-06-12 09:53:00 +0000
3+++ openerp/addons/base/res/res_partner.py 2013-06-15 18:43:28 +0000
4@@ -255,7 +255,7 @@
5 'phone': fields.char('Phone', size=64),
6 'fax': fields.char('Fax', size=64),
7 'mobile': fields.char('Mobile', size=64),
8- 'birthdate': fields.char('Birthdate', size=64),
9+ 'birthdate': fields.date('Birthdate'),
10 'is_company': fields.boolean('Is a Company', help="Check if the contact is a company, otherwise it is a person"),
11 'use_parent_address': fields.boolean('Use Company Address', help="Select this if you want to set company's address information for this contact"),
12 # image: all image fields are base64 encoded and PIL-supported

Subscribers

People subscribed via source and target branches

to status/vote changes: