This commit is contained in:
michel 2018-02-15 18:05:57 +01:00
parent 6043beb577
commit d6d265e7c5
2 changed files with 36 additions and 46 deletions

View File

@ -1,33 +0,0 @@
# -*- 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 odoo import models, fields
class GolemMember(models.Model):
_name = '.golem.member.report'
_description = 'Golem member Report'
_sql = """
CREATE OR REPLACE VIEW todo_task_report AS
SELECT *
FROM todo_task
WHERE active = True
"""
name = fields.Char('Description')
is_done = fields.Boolean('Done?')
active = fields.Boolean('Active?')
user_id = fields.Many2one('res.users', 'Responsible')
date_deadline = fields.Date('Deadline')

View File

@ -37,7 +37,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<field name="dpi">90</field>
</record>
<report id="action_todo_task_report"
<report id="golem_member_report"
string="Golem member report"
model="golem.member"
report_type="qweb-html"
@ -48,14 +48,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<t t-call="report.html_container">
<t t-call="report.external_layout">
<div class="page">
<!-- Report page content -->
<div class="col-xs-3">
<div t-field="res_company.partner_id"
t-field-options='{
"widget": "contact",
"fields": ["address", "name", "phone", "fax"],
"no_marker": true}' />
</div>
<table class="table table-striped">
<tr>
<th>Member</th>
@ -76,19 +68,50 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</t>
<span t-field="o.country_id" /><br></br>
</td>
<td class="col-xs-6">
<span t-field="o.season_ids[0].name" /><br></br>
<span t-field="o.season_ids[0].date_start" /><br></br>
<span t-field="o.season_ids[0].date_end" /><br></br>
</td>
</tr>
</t>
</table>
<table class="table table-striped">
<t t-foreach="docs" t-as="o">
<tr>
<td class="col-xs-6">
<span t-field="o.activity_registration_ids.activity_id" /><br></br>
</td>
<td class="col-xs-6">
<!-- <div t-field="golem_season.season_id"
t-field-option='{"fields": ["name"]}' /> -->
<span t-field="o.season_ids" /><br></br>
<span t-field="o.activity_registration_ids.activity_id.animator_id" /><br></br>
</td>
<td class="col-xs-6">
<span t-field="o.activity_registration_ids.activity_id.weekday" /><br></br>
</td>
<td class="col-xs-6">
<span t-field="o.activity_registration_ids.activity_id.hour_start" /><br></br>
</td>
<td class="col-xs-6">
<span t-field="o.activity_registration_ids.activity_id.hour_stop" /><br></br>
</td>
<td class="col-xs-6">
<t t-if="o.activity_registration_ids.activity_id.is_recurrent">
<span t-field="o.activity_registration_ids.activity_id.date_start" /><br></br>
<span t-field="o.activity_registration_ids.activity_id.date_stop" /><br></br>
</t>
</td>
</tr>
</t>
</table>
</div>
</t>
</t>
</template>
</odoo>