[DATABASE] +"newsletter" and "want_to_be_volunteer" fields
[burette/eturecup.git] / eturecup.py
diff --git a/eturecup.py b/eturecup.py
new file mode 100644 (file)
index 0000000..3648b47
--- /dev/null
@@ -0,0 +1,40 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    eturecup module for OpenERP, Custom module for Étu'Récup
+#    Copyright (C) 2014-2015 Étu'Récup (<http://www.eturecup.org/>)
+#
+#    This file is a part of eturecup
+#
+#    eturecup is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    eturecup is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from openerp.osv import osv
+from openerp.osv import orm
+from openerp.osv import fields
+
+
+class Partner(orm.Model):
+    _inherit = 'res.partner'
+
+    _columns = {
+        'newsletter': fields.boolean('Do you want to receive our monthly newsletter?'),
+        'want_to_be_volunteer': fields.boolean(
+            'Do you want to receive some informations about volunteer activities?',
+            help='… in company and its activities: bikecoop, events, …'),
+    }
+
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: