From 850aeb51cee463691903dc0aea694e1177496cb7 Mon Sep 17 00:00:00 2001 From: youssef Date: Thu, 18 Oct 2018 10:07:03 +0100 Subject: [PATCH] create golem_member_history model --- .../models/golem_member_history.py | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 golem_member_history/models/golem_member_history.py diff --git a/golem_member_history/models/golem_member_history.py b/golem_member_history/models/golem_member_history.py new file mode 100644 index 0000000..8781659 --- /dev/null +++ b/golem_member_history/models/golem_member_history.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- + +# Copyright 2018 Youssef El Ouahby +# Copyright 2018 Fabien Bourgeois +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program 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 Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +""" GOLEM Member History Management """ + +from odoo import models, fields, api, _ + +class GolemMemberHistory(models.Model): + """ GOLEM Member History """ + _name = 'golem.member.history' + _description = 'GOLEM Member History Management' + + member_id = fields.Many2one('golem.member', required=True, auto_join=True, + ondelete="cascade") + season_id = fields.Many2one('golem.season', required=True, auto_join=True, + ondelete="cascade") + gender = fields.Selection([('male', _('Male')), ('female', _('Female'))]) + area_id = fields.Many2one('golem.partner.area', index=True, auto_join=True, + string='Area', ondelete="cascade") + city = fields.Char()