[TMP][ADD]GOLEM Activity Session Registration and link to invoice
This commit is contained in:
parent
a292fd13b0
commit
6091683c75
@ -27,6 +27,5 @@
|
|||||||
'installable': True,
|
'installable': True,
|
||||||
'auto_install': True,
|
'auto_install': True,
|
||||||
'depends': ['product', 'mail', 'golem_activity', 'golem_member'],
|
'depends': ['product', 'mail', 'golem_activity', 'golem_member'],
|
||||||
'data': ['security/ir.model.access.csv',
|
'data': ['security/ir.model.access.csv', 'views/golem_activity_view.xml']
|
||||||
'views/golem_activity_view.xml', 'views/golem_member_view.xml']
|
|
||||||
}
|
}
|
||||||
|
@ -18,13 +18,6 @@
|
|||||||
from openerp import models, fields, api, _
|
from openerp import models, fields, api, _
|
||||||
|
|
||||||
|
|
||||||
class GolemMember(models.Model):
|
|
||||||
_inherit = 'golem.member'
|
|
||||||
|
|
||||||
activity_session_ids = fields.Many2many('golem.activity.session',
|
|
||||||
string='Activities')
|
|
||||||
|
|
||||||
|
|
||||||
class GolemActivity(models.Model):
|
class GolemActivity(models.Model):
|
||||||
_inherit = 'golem.activity'
|
_inherit = 'golem.activity'
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
groups="golem_base.group_golem_user"
|
groups="golem_base.group_golem_user"
|
||||||
sequence="10" />
|
sequence="10" />
|
||||||
<menuitem id="activity_categ" name="Categories"
|
<menuitem id="activity_categ" name="Categories"
|
||||||
parent="golem_activity.activity_menu" sequence="10"
|
parent="golem_activity.activity_menu" sequence="20"
|
||||||
groups="golem_base.group_golem_manager"
|
groups="golem_base.group_golem_manager"
|
||||||
action="category_action" />
|
action="category_action" />
|
||||||
|
|
||||||
|
@ -27,8 +27,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
<page name="other_page" position="before">
|
<page name="other_page" position="before">
|
||||||
<page name="sessions" string="Activities">
|
<page name="sessions" string="Activities">
|
||||||
<p>Default season activities</p>
|
<p>Default season activities</p>
|
||||||
<field name="activity_session_ids"
|
<field name="activity_session_registration_ids">
|
||||||
context="{'search_default_season_default': True}" />
|
<tree>
|
||||||
|
<field name="season_id" />
|
||||||
|
<field name="member_id" />
|
||||||
|
<field name="session_id" />
|
||||||
|
<field name="invoice_id" />
|
||||||
|
<field name="invoice_line_id" />
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
<!--<field name="activity_session_ids"
|
||||||
|
context="{'search_default_season_default': True}" />-->
|
||||||
</page>
|
</page>
|
||||||
</page>
|
</page>
|
||||||
</field>
|
</field>
|
||||||
|
18
golem_activity_session_registration/__init__.py
Normal file
18
golem_activity_session_registration/__init__.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
|
||||||
|
#
|
||||||
|
# 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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from . import models
|
32
golem_activity_session_registration/__openerp__.py
Normal file
32
golem_activity_session_registration/__openerp__.py
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
|
||||||
|
#
|
||||||
|
# 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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
{
|
||||||
|
'name': 'GOLEM Activity Session Member Registrations',
|
||||||
|
'summary': 'GOLEM Activities Session Member Registrations management',
|
||||||
|
'description': ''' Non-profit french MJC activities session member
|
||||||
|
registrations management ''',
|
||||||
|
'version': '0.1',
|
||||||
|
'category': 'GOLEM',
|
||||||
|
'author': 'Fabien Bourgeois',
|
||||||
|
'license': 'AGPL-3',
|
||||||
|
'application': False,
|
||||||
|
'installable': True,
|
||||||
|
'depends': ['golem_activity_session', 'golem_member'],
|
||||||
|
'data': ['views/golem_activity_session_registration_view.xml',
|
||||||
|
'views/golem_member_view.xml']
|
||||||
|
}
|
18
golem_activity_session_registration/models/__init__.py
Normal file
18
golem_activity_session_registration/models/__init__.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
|
||||||
|
#
|
||||||
|
# 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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from . import golem_activity_session_registration
|
@ -0,0 +1,42 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# copyright 2016 fabien bourgeois <fabien@yaltik.com>
|
||||||
|
#
|
||||||
|
# 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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from openerp import models, fields
|
||||||
|
|
||||||
|
|
||||||
|
class GolemMember(models.Model):
|
||||||
|
_inherit = 'golem.member'
|
||||||
|
|
||||||
|
activity_session_registration_ids = fields.One2many(
|
||||||
|
'golem.activity.session.registration', 'member_id', 'Activities')
|
||||||
|
|
||||||
|
|
||||||
|
class GolemActivitySessionRegistration(models.Model):
|
||||||
|
_name = 'golem.activity.session.registration'
|
||||||
|
_description = 'GOLEM Activity Session Registration'
|
||||||
|
|
||||||
|
member_id = fields.Many2one('golem.member', string='Member', required=True,
|
||||||
|
ondelete='cascade')
|
||||||
|
session_id = fields.Many2one('golem.activity.session', required=True,
|
||||||
|
string='Activity session', ondelete='cascade')
|
||||||
|
invoice_id = fields.Many2one('account.invoice', string='Invoice',
|
||||||
|
ondelete='set null')
|
||||||
|
invoice_line_id = fields.Many2one('account.invoice.line',
|
||||||
|
string='Invoice line',
|
||||||
|
ondelete='set null')
|
||||||
|
season_id = fields.Many2one(string='Season',
|
||||||
|
related='session_id.season_id')
|
@ -0,0 +1,47 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
|
||||||
|
|
||||||
|
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 <http://www.gnu.org/licenses/>.
|
||||||
|
-->
|
||||||
|
<openerp>
|
||||||
|
<data>
|
||||||
|
<!-- Tree -->
|
||||||
|
<record id="registration_tree" model="ir.ui.view">
|
||||||
|
<field name="name">Session registration list</field>
|
||||||
|
<field name="model">golem.activity.session.registration</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<tree create="false" edit="false" delete="false">
|
||||||
|
<field name="season_id" />
|
||||||
|
<field name="member_id" />
|
||||||
|
<field name="session_id" />
|
||||||
|
<field name="invoice_id" />
|
||||||
|
<field name="invoice_line_id" />
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
<!-- Search -->
|
||||||
|
<!-- Action -->
|
||||||
|
<record id="registration_action_list" model="ir.actions.act_window">
|
||||||
|
<field name="name">GOLEM Activity Session Registration List</field>
|
||||||
|
<field name="res_model">golem.activity.session.registration</field>
|
||||||
|
<field name="view_mode">tree</field>
|
||||||
|
</record>
|
||||||
|
<!-- Menu -->
|
||||||
|
<menuitem id="registration_menu_list" name="Session registrations"
|
||||||
|
parent="golem_activity.activity_menu" action="registration_action_list"
|
||||||
|
groups="golem_base.group_golem_user"
|
||||||
|
sequence="20" />
|
||||||
|
</data>
|
||||||
|
</openerp>
|
@ -0,0 +1,47 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
|
||||||
|
|
||||||
|
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 <http://www.gnu.org/licenses/>.
|
||||||
|
-->
|
||||||
|
<openerp>
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<!-- Form -->
|
||||||
|
<record model="ir.ui.view" id="sessions_inscription">
|
||||||
|
<field name="name">Add sessions inscriptions to member form</field>
|
||||||
|
<field name="model">golem.member</field>
|
||||||
|
<field name="inherit_id" ref="golem_member.view_form" />
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<page name="other_page" position="before">
|
||||||
|
<page name="sessions" string="Activities">
|
||||||
|
<p>Default season activities</p>
|
||||||
|
<field name="activity_session_registration_ids">
|
||||||
|
<tree>
|
||||||
|
<field name="season_id" />
|
||||||
|
<field name="member_id" />
|
||||||
|
<field name="session_id" />
|
||||||
|
<field name="invoice_id" />
|
||||||
|
<field name="invoice_line_id" />
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
<!--<field name="activity_session_ids"
|
||||||
|
context="{'search_default_season_default': True}" />-->
|
||||||
|
</page>
|
||||||
|
</page>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</openerp>
|
Loading…
Reference in New Issue
Block a user