forked from Yaltik/golem
[TMP]Qweb report work in proges
This commit is contained in:
parent
680604aecc
commit
cec41edc7f
33
golem_member/report/golem_member_report.py
Normal file
33
golem_member/report/golem_member_report.py
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
# -*- 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')
|
@ -49,19 +49,42 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
<t t-call="report.external_layout">
|
<t t-call="report.external_layout">
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<!-- Report page content -->
|
<!-- 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">
|
<table class="table table-striped">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Title</th>
|
<th>Member</th>
|
||||||
<th>Owner</th>
|
<th>Season</th>
|
||||||
<th>Deadline</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
<t t-foreach="docs" t-as="o">
|
<t t-foreach="docs" t-as="o">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="col-xs-6">
|
<td class="col-xs-6">
|
||||||
<span t-field="o.name" />
|
<strong><span t-field="o.name" /></strong><br></br>
|
||||||
|
<span t-field="o.street" /><br></br>
|
||||||
|
<t t-if="o.street2">
|
||||||
|
<span t-field="o.street2" /><br></br>
|
||||||
|
</t>
|
||||||
|
<span t-field="o.zip" /><br></br>
|
||||||
|
<span t-field="o.city" /><br></br>
|
||||||
|
<t t-if="o.state">
|
||||||
|
<span t-field="o.state" /><br></br>
|
||||||
|
</t>
|
||||||
|
<span t-field="o.country_id" /><br></br>
|
||||||
</td>
|
</td>
|
||||||
<td class="col-xs-3">
|
|
||||||
<span t-field="o.user_id" />
|
<td class="col-xs-6">
|
||||||
|
<span class="" t-field="o.name" /><br></br>
|
||||||
|
<span t-field="o.street" /><br></br>
|
||||||
|
<span t-field="o.street2" /><br></br>
|
||||||
|
<span t-field="o.zip" /><br></br>
|
||||||
|
<span t-field="o.city" /><br></br>
|
||||||
|
<span t-field="o.state_id" /><br></br>
|
||||||
|
<span t-field="o.country_id" /><br></br>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</t>
|
</t>
|
||||||
|
Loading…
Reference in New Issue
Block a user