dépôts
/
burette
/
velosenville.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[DATA] ~maj bikecoop partner themes
[burette/velosenville.git]
/
res_partner.py
diff --git
a/res_partner.py
b/res_partner.py
index
db7aa43
..
0ab6805
100644
(file)
--- a/
res_partner.py
+++ b/
res_partner.py
@@
-2,7
+2,7
@@
##############################################################################
#
# velosenville module for OpenERP, Vélos en Ville specificities
##############################################################################
#
# velosenville module for OpenERP, Vélos en Ville specificities
-# Copyright (C) 2012-201
3
Vélos en Ville (<http://www.velosenville.org>)
+# Copyright (C) 2012-201
6
Vélos en Ville (<http://www.velosenville.org>)
#
# This file is a part of velosenville
#
#
# This file is a part of velosenville
#
@@
-30,18
+30,18
@@
class res_partner(osv.osv):
_columns = {
#Overload birthdate field to have date format. Don't know why it's char type in mainstream version
_columns = {
#Overload birthdate field to have date format. Don't know why it's char type in mainstream version
- 'birthdate': fields.date('Birthdate'),
+ 'birthdate
_date
': fields.date('Birthdate'),
}
}
- def _check_birthdate(self, cr, uid, ids, context=None):
+ def _check_birthdate
_date
(self, cr, uid, ids, context=None):
obj = self.browse(cr, uid, ids[0], context=context)
obj = self.browse(cr, uid, ids[0], context=context)
- if obj.birthdate:
- if obj.birthdate
< '1900-01-01' or obj.birth
date > str(date.today()):
+ if obj.birthdate
_date
:
+ if obj.birthdate
_date < '1900-01-01' or obj.birthdate_
date > str(date.today()):
return False
return True
_constraints = [
return False
return True
_constraints = [
- (_check_birthdate, 'Error: this birthdate is not valid.', ['birthdate']),
+ (_check_birthdate
_date
, 'Error: this birthdate is not valid.', ['birthdate']),
]
res_partner()
]
res_partner()