[Partner] +birthdate_date field to fix birthdade conflict beetween date format and...
authorLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Tue, 14 Jan 2014 15:00:33 +0000 (16:00 +0100)
committerLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Tue, 14 Jan 2014 15:07:34 +0000 (16:07 +0100)
i18n/fr.po
i18n/velosenville.pot
res_partner.py
view/bikecoop.xml

index 8d8b4a8..00ded43 100644 (file)
@@ -6,8 +6,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: OpenERP Server 7.0alpha-20121206-000102\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-01-14 14:24+0000\n"
-"PO-Revision-Date: 2014-01-14 15:26+0100\n"
+"POT-Creation-Date: 2014-01-14 15:01+0000\n"
+"PO-Revision-Date: 2014-01-14 16:02+0100\n"
 "Last-Translator: Ludovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>\n"
 "Language-Team: \n"
 "Language: fr_FR\n"
@@ -92,7 +92,6 @@ msgstr "Étudiant"
 
 #. module: velosenville
 #: view:res.partner:0
-#, fuzzy
 msgid "Join membership"
 msgstr "Facturer une adhésion"
 
@@ -126,6 +125,11 @@ msgstr "Adhésion réduite"
 msgid "Partners control user"
 msgstr "Utilisateur de contrôle des Partenaires"
 
+#. module: velosenville
+#: field:res.partner,birthdate_date:0
+msgid "Birthdate"
+msgstr "Date de naissance"
+
 #. module: velosenville
 #: model:product.template,name:velosenville.product_standard_membership_product_template
 msgid "Standard membership"
index 3e7d802..90a91fb 100644 (file)
@@ -6,8 +6,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: OpenERP Server 7.0\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-01-14 14:24+0000\n"
-"PO-Revision-Date: 2014-01-14 14:24+0000\n"
+"POT-Creation-Date: 2014-01-14 15:01+0000\n"
+"PO-Revision-Date: 2014-01-14 15:01+0000\n"
 "Last-Translator: <>\n"
 "Language-Team: \n"
 "MIME-Version: 1.0\n"
@@ -120,6 +120,11 @@ msgstr ""
 msgid "Partners control user"
 msgstr ""
 
+#. module: velosenville
+#: field:res.partner,birthdate_date:0
+msgid "Birthdate"
+msgstr ""
+
 #. module: velosenville
 #: model:product.template,name:velosenville.product_standard_membership_product_template
 msgid "Standard membership"
index db7aa43..63ab834 100644 (file)
@@ -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
-        '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)
-        if obj.birthdate:
-            if obj.birthdate < '1900-01-01' or obj.birthdate > 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 = [
-        (_check_birthdate, 'Error: this birthdate is not valid.', ['birthdate']),
+        (_check_birthdate_date, 'Error: this birthdate is not valid.', ['birthdate']),
     ]
 res_partner()
 
index 2b346d0..1c554da 100644 (file)
@@ -7,7 +7,7 @@
             <field name="inherit_id" ref="bikecoop.view_bikecoop_members_form"/>
             <field name="arch" type="xml">
                 <xpath expr="//field[@name='year']" position="replace">
-                    <field name="birthdate" attrs="{'required': [('is_company','=', False)]}"/>
+                    <field name="birthdate_date" attrs="{'required': [('is_company','=', False)]}"/>
                 </xpath>
             </field>
         </record>