Browse Source

[ADD] Initial Commit

pull/81/head
SHEREEF PT 8 years ago
parent
commit
97c0db374a
  1. 24
      salon_report_pdf_xls/__init__.py
  2. 41
      salon_report_pdf_xls/__openerp__.py
  3. 24
      salon_report_pdf_xls/models/__init__.py
  4. 52
      salon_report_pdf_xls/models/salon_report_wizard.py
  5. 97
      salon_report_pdf_xls/models/salon_reports_parsers.py
  6. 23
      salon_report_pdf_xls/report/__init__.py
  7. 97
      salon_report_pdf_xls/report/salon_report_xls.py
  8. BIN
      salon_report_pdf_xls/static/description/banner.jpg
  9. BIN
      salon_report_pdf_xls/static/description/cybro_logo.png
  10. BIN
      salon_report_pdf_xls/static/description/icon.png
  11. 101
      salon_report_pdf_xls/static/description/index.html
  12. BIN
      salon_report_pdf_xls/static/description/screenshot_salon_report_1.png
  13. BIN
      salon_report_pdf_xls/static/description/screenshot_salon_report_2.png
  14. BIN
      salon_report_pdf_xls/static/description/screenshot_salon_report_3.png
  15. BIN
      salon_report_pdf_xls/static/description/screenshot_salon_report_4.png
  16. 6
      salon_report_pdf_xls/views/salon_report_menu.xml
  17. 69
      salon_report_pdf_xls/views/salon_report_pdf_view.xml
  18. 38
      salon_report_pdf_xls/views/salon_report_wizard.xml
  19. 24
      salon_report_pdf_xls/views/salon_reports_initialization.xml

24
salon_report_pdf_xls/__init__.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2015-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Avinash Nk(<http://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# It is forbidden to publish, distribute, sublicense, or sell copies
# of the Software or modified copies of the Software.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import models
import report

41
salon_report_pdf_xls/__openerp__.py

@ -0,0 +1,41 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2015-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Avinash Nk(<http://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# It is forbidden to publish, distribute, sublicense, or sell copies
# of the Software or modified copies of the Software.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Beauty Spa PDF and XLS',
'summary': """PDF and XLS Reports For Beauty Spa Management Module""",
'version': '9.0.1.0.0',
'author': 'Cybrosys Techno Solutions',
'website': "http://www.cybrosys.com",
'company': 'Cybrosys Techno Solutions',
"category": "Industries",
'depends': ['salon_management', 'report_xlsx'],
'data': ['views/salon_report_pdf_view.xml',
'views/salon_reports_initialization.xml',
'views/salon_report_wizard.xml',
'views/salon_report_menu.xml',
],
'images': ['static/description/banner.jpg'],
'license': 'LGPL-3',
'installable': True,
'application': False,
}

24
salon_report_pdf_xls/models/__init__.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2015-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Avinash Nk(<http://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# It is forbidden to publish, distribute, sublicense, or sell copies
# of the Software or modified copies of the Software.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import salon_report_wizard
import salon_reports_parsers

52
salon_report_pdf_xls/models/salon_report_wizard.py

@ -0,0 +1,52 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2015-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Avinash Nk(<http://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# It is forbidden to publish, distribute, sublicense, or sell copies
# of the Software or modified copies of the Software.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from openerp import models, fields, api, _
class SalonReportMenu(models.TransientModel):
_name = 'wizard.salon.report'
chair_select = fields.Many2many('salon.chair', string="Chair")
user_select = fields.Many2many('res.users', string="User")
stage_select = fields.Many2many('salon.stages', string="Stage")
@api.multi
def print_salon_report_pdf(self):
record = self.env['salon.order'].search([])
return self.env['report'].get_action(record, "salon_report_pdf_xls.salon_report_pdf_details")
@api.multi
def print_salon_report_xls(self):
context = self._context
datas = {'ids': context.get('active_ids', [])}
datas['model'] = 'salon.order'
datas['form'] = self.read()[0]
for field in datas['form'].keys():
if isinstance(datas['form'][field], tuple):
datas['form'][field] = datas['form'][field][0]
return {'type': 'ir.actions.report.xml',
'report_name': 'salon_report_pdf_xls.salon_report_xls.xlsx',
'datas': datas,
'name': 'Salon Report',
}

97
salon_report_pdf_xls/models/salon_reports_parsers.py

@ -0,0 +1,97 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2015-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Avinash Nk(<http://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# It is forbidden to publish, distribute, sublicense, or sell copies
# of the Software or modified copies of the Software.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from openerp.report import report_sxw
from openerp.osv import osv
from openerp.http import request
class SalonReportParser(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context=None):
super(SalonReportParser, self).__init__(cr, uid, name, context=context)
self.localcontext.update({
'get_salon_order_model': self.get_filtered_order_model,
'get_total': self.get_total_sum,
})
self.context = context
def get_filtered_order_model(self):
wizard_record = request.env['wizard.salon.report'].search([])[-1]
chairs = wizard_record.chair_select
stages = wizard_record.stage_select
users = wizard_record.user_select
chairs_selected = []
user_selected = []
stage_selected = []
for records in chairs:
chairs_selected.append(records.id)
for records in stages:
stage_selected.append(records.id)
for records in users:
user_selected.append(records.id)
if len(stage_selected) == 0:
if len(user_selected) == 0:
if len(chairs_selected) == 0:
salon_orders = wizard_record.env['salon.order'].search([])
else:
salon_orders = wizard_record.env['salon.order'].search([('chair_id', 'in', chairs_selected)])
else:
if len(chairs_selected) == 0:
salon_orders = wizard_record.env['salon.order'].search([('chair_user', 'in', user_selected)])
else:
salon_orders = wizard_record.env['salon.order'].search([('chair_id', 'in', chairs_selected),
('chair_user', 'in', user_selected)])
else:
if len(user_selected) == 0:
if len(chairs_selected) == 0:
salon_orders = wizard_record.env['salon.order'].search([('stage_id', 'in', stage_selected)])
else:
salon_orders = wizard_record.env['salon.order'].search([('chair_id', 'in', chairs_selected),
('stage_id', 'in', stage_selected)])
else:
if len(chairs_selected) == 0:
salon_orders = wizard_record.env['salon.order'].search([('chair_user', 'in', user_selected),
('stage_id', 'in', stage_selected)])
else:
salon_orders = wizard_record.env['salon.order'].search([('chair_id', 'in', chairs_selected),
('chair_user', 'in', user_selected),
('stage_id', 'in', stage_selected)])
return salon_orders
def get_total_sum(self, salon_orders):
sum = 0.0
for records in salon_orders:
sum += records.price_subtotal
return sum
class PrintReportProject(osv.AbstractModel):
_name = 'report.salon_report_pdf_xls.salon_report_pdf_details'
_inherit = 'report.abstract_report'
_template = 'salon_report_pdf_xls.salon_report_pdf_details'
_wrapped_report_class = SalonReportParser

23
salon_report_pdf_xls/report/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2015-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Avinash Nk(<http://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# It is forbidden to publish, distribute, sublicense, or sell copies
# of the Software or modified copies of the Software.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import salon_report_xls

97
salon_report_pdf_xls/report/salon_report_xls.py

@ -0,0 +1,97 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2015-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Avinash Nk(<http://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# It is forbidden to publish, distribute, sublicense, or sell copies
# of the Software or modified copies of the Software.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from openerp.addons.report_xlsx.report.report_xlsx import ReportXlsx
class SalonReportXls(ReportXlsx):
def generate_xlsx_report(self, workbook, data, lines):
company_details = lines.env['res.company'].browse(1)
chairs_selected = data['form']['chair_select']
user_selected = data['form']['user_select']
stage_selected = data['form']['stage_select']
if len(stage_selected) == 0:
if len(user_selected) == 0:
if len(chairs_selected) == 0:
salon_orders = lines.env['salon.order'].search([])
else:
salon_orders = lines.env['salon.order'].search([('chair_id', 'in', chairs_selected)])
else:
if len(chairs_selected) == 0:
salon_orders = lines.env['salon.order'].search([('chair_user', 'in', user_selected)])
else:
salon_orders = lines.env['salon.order'].search([('chair_id', 'in', chairs_selected),
('chair_user', 'in', user_selected)])
else:
if len(user_selected) == 0:
if len(chairs_selected) == 0:
salon_orders = lines.env['salon.order'].search([('stage_id', 'in', stage_selected)])
else:
salon_orders = lines.env['salon.order'].search([('chair_id', 'in', chairs_selected),
('stage_id', 'in', stage_selected)])
else:
if len(chairs_selected) == 0:
salon_orders = lines.env['salon.order'].search([('chair_user', 'in', user_selected),
('stage_id', 'in', stage_selected)])
else:
salon_orders = lines.env['salon.order'].search([('chair_id', 'in', chairs_selected),
('chair_user', 'in', user_selected),
('stage_id', 'in', stage_selected)])
sheet = workbook.add_worksheet()
format1 = workbook.add_format({'font_size': 22, 'bold': True, 'bg_color': '#D3D3D3'})
format2 = workbook.add_format({'font_size': 12, 'bold': True, 'bg_color': '#D3D3D3'})
format3 = workbook.add_format({'font_size': 10})
format5 = workbook.add_format({'font_size': 10, 'bg_color': '#FFFFFF'})
format1.set_align('center')
sheet.merge_range('A1:B1', company_details.name, format5)
sheet.merge_range('A2:B2', company_details.street, format5)
sheet.write('A3', company_details.city, format5)
sheet.write('B3', company_details.zip, format5)
sheet.merge_range('A4:B4', company_details.state_id.name, format5)
sheet.merge_range('A5:B5', company_details.country_id.name, format5)
sheet.merge_range('G1:H1', company_details.rml_header1, format5)
sheet.merge_range(5, 0, 6, 7, "Salon Orders", format1)
sheet.merge_range(7, 0, 7, 7, "", format3)
sheet.merge_range(8, 0, 8, 1, "Order", format2)
sheet.write(8, 2, "Chair", format2)
sheet.merge_range(8, 3, 8, 4, "User", format2)
sheet.write(8, 5, "Stage", format2)
sheet.merge_range(8, 6, 8, 7, "Total", format2)
row_number = 8
sum = 0.0
for records in salon_orders:
sum += records.price_subtotal
row_number += 1
sheet.merge_range(row_number, 0, row_number, 1, records.name, format3)
sheet.write(row_number, 2, records.chair_id.name, format3)
sheet.merge_range(row_number, 3, row_number, 4, records.chair_user.name, format3)
sheet.write(row_number, 5, records.stage_id.name, format3)
sheet.merge_range(row_number, 6, row_number, 7, records.price_subtotal, format3)
sheet.merge_range(row_number+1, 0, row_number+1, 7, "", format3)
sheet.merge_range(row_number+2, 0, row_number+3, 3, "", format3)
sheet.merge_range(row_number+2, 4, row_number+3, 5, "Total", format2)
sheet.merge_range(row_number+2, 6, row_number+3, 7, sum, format2)
sheet.merge_range(0, 2, 4, 5, "", format5)
sheet.merge_range(1, 6, 4, 7, "", format5)
SalonReportXls('report.salon_report_pdf_xls.salon_report_xls.xlsx', 'salon.order')

BIN
salon_report_pdf_xls/static/description/banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

BIN
salon_report_pdf_xls/static/description/cybro_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
salon_report_pdf_xls/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

101
salon_report_pdf_xls/static/description/index.html

@ -0,0 +1,101 @@
<section class="oe_container">
<div class="oe_spaced">
<h2 class="oe_slogan">Beauty Spa Report PDF and XLS</h2>
<h3 class="oe_slogan">XLS and PDF reports for Beauty Spa Management System.</h3>
<h4 class="oe_slogan" style="font-size: 23px;">Author : Cybrosys Techno Solutions , www.cybrosys.com</h4>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_spaced">
<h3 class="oe_slogan">Overview</h3>
<p class="oe_mt32" style="text-align: center">
Beauty Spa Report PDF and XLS module is an extension of the Beauty Spa Management module
developed by Cybrosys Technologies. Beauty Spa Report PDF and XLS completely depends on
the Beauty spa Management module. When you install Beauty Spa Report PDF and XLS, New Menu 'Reports' is
created under Salon menu. When you click the 'Report' Menu, A wizard will open.
You can filter your report by Chair, User, and Stages.
</p>
<div class="" style="text-align: center">
<div class="oe_demo oe_picture oe_screenshot">
<img style="border:10px solid white;height: 400px;" src="screenshot_salon_report_1.png">
</div>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_spaced">
<h3 class="oe_slogan">PDF Report</h3>
<div class="" style="text-align: center">
<div class="oe_demo oe_picture oe_screenshot">
<img style="border:10px solid white;height: 400px;" src="screenshot_salon_report_2.png">
</div>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_spaced">
<h3 class="oe_slogan">XLS Report</h3>
<div class="" style="text-align: center">
<div class="oe_demo oe_picture oe_screenshot">
<img style="border:10px solid white;" src="screenshot_salon_report_3.png">
</div>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_spaced">
<h3 class="oe_slogan">Filtered XLS Report</h3>
<div class="" style="text-align: center">
<div class="oe_demo oe_picture oe_screenshot">
<img style="border:10px solid white;" src="screenshot_salon_report_4.png">
</div>
<span>&#9755; Here you can see only the orders related to 'Chair-1'</span>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<div class="oe_span12">
<div class="col-md-12"> <p class='oe_mt32' style="text-align:center;">
If you want to analyze the working of Beauty spa Management Module, Click Here:</p>
</div>
<div class="col-md-12"> <a class="btn btn-info btn-lg mt8 center-block"
style="color: #FFFFFF !important; width: 55%;" href="https://www.odoo.com/apps/modules/9.0/salon_management/"><i
class="fa fa-scissors"></i> Beauty Spa Management </a>
</div>
</div>
</div>
</section>
<section class="oe_container">
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2>
<div class="oe_slogan" style="margin-top:10px !important;">
<div>
<a class="btn btn-primary btn-lg mt8"
style="color: #FFFFFF !important;border-radius: 0;" href="http://www.cybrosys.com"><i
class="fa fa-envelope"></i> Email </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="http://www.cybrosys.com/contact/"><i
class="fa fa-phone"></i> Contact Us </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="http://www.cybrosys.com/odoo-customization-and-installation/"><i
class="fa fa-check-square"></i> Request Customization </a>
</div>
<br>
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block">
<div>
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;"></i></a></td>
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;"></i></a></td>
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px;padding-left: 8px;"></i></a></td>
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;"></i></a></td>
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;"></i></a></td>
</div>
</div>
</section>

BIN
salon_report_pdf_xls/static/description/screenshot_salon_report_1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
salon_report_pdf_xls/static/description/screenshot_salon_report_2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
salon_report_pdf_xls/static/description/screenshot_salon_report_3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

BIN
salon_report_pdf_xls/static/description/screenshot_salon_report_4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

6
salon_report_pdf_xls/views/salon_report_menu.xml

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<openerp>
<data>
<menuitem id="salon_management_reports" name="Reports" parent="salon_management.salon_management_salon" action="salon_report_open_wizard"/>
</data>
</openerp>

69
salon_report_pdf_xls/views/salon_report_pdf_view.xml

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<template id="salon_report_template">
<t t-call="report.html_container">
<t t-set="doc" t-value="get_salon_order_model()"/>
<t t-set="doc2" t-value="get_total(doc)"/>
<div class="page" >
<t t-call="report.external_layout">
<table class="table table-condensed">
<thead>
<tr >
<th style="background-color:#9b9da0 !important;">Order</th>
<th style="background-color:#9b9da0 !important;">Chair</th>
<th style="background-color:#9b9da0 !important;">User</th>
<th style="background-color:#9b9da0 !important;">Stage</th>
<th style="background-color:#9b9da0 !important;">Total</th>
</tr>
</thead>
<tbody>
<t t-foreach="doc" t-as="b">
<tr>
<td>
<span t-att-style="style" t-esc="b.name"/>
</td>
<td>
<span t-att-style="style" t-esc="b.chair_id.name"/>
</td>
<td>
<span t-att-style="style" t-esc="b.chair_user.name"/>
</td>
<td>
<span t-att-style="style" t-esc="b.stage_id.name"/>
</td>
<td>
<span t-att-style="style" t-esc="b.price_subtotal"/>
</td>
</tr>
</t>
<tr>
<td style="background-color:#9b9da0 !important;"></td>
<td style="background-color:#9b9da0 !important;"></td>
<td style="background-color:#9b9da0 !important;"></td>
<td style="background-color:#9b9da0 !important;"></td>
<td style="background-color:#9b9da0 !important;"></td>
</tr>
<tr>
<td style="background-color:#9b9da0 !important;">
<span t-att-style="style"></span>
</td>
<td style="background-color:#9b9da0 !important;">
<span t-att-style="style"></span>
</td>
<td style="background-color:#9b9da0 !important;">
<span t-att-style="style"></span>
</td>
<td style="background-color:#9b9da0 !important;">
<span t-att-style="style">Total</span>
</td>
<td style="background-color:#9b9da0 !important;">
<span t-att-style="style" t-esc="doc2"/>
</td>
</tr>
</tbody>
</table>
</t>
</div>
</t>
</template>
</openerp>

38
salon_report_pdf_xls/views/salon_report_wizard.xml

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" ?>
<openerp>
<data>
<record id="report_wizard_view_form" model="ir.ui.view">
<field name="name">report_wizard_view_form.form</field>
<field name="model">wizard.salon.report</field>
<field name="arch" type="xml">
<form string="Select period">
<group>
<group>
<group>
<field name="chair_select" widget="many2many_tags" options="{'no_create': True}"/>
<field name="user_select" widget="many2many_tags" options="{'no_create': True}"/>
</group>
<group>
<field name="stage_select" widget="many2many_tags" options="{'no_create': True}"/>
</group>
</group>
</group>
<footer>
<button name="print_salon_report_pdf" type="object" string="Print PDF" class="oe_highlight"/>
or
<button name="print_salon_report_xls" type="object" string="Print XLS" class="oe_highlight"/>
or
<button special="cancel" string="Cancel"/>
</footer>
</form>
</field>
</record>
<act_window
id="salon_report_open_wizard"
name="Beauty Spa Report"
res_model="wizard.salon.report"
view_mode="form"
view_id="report_wizard_view_form"
target="new"/>
</data>
</openerp>

24
salon_report_pdf_xls/views/salon_reports_initialization.xml

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<report id="report_salon_pdf"
string="Beauty Spa Report"
model="salon.order"
report_type="qweb-pdf"
file="salon_report_pdf_xls.salon_report_pdf_details"
name="salon_report_pdf_xls.salon_report_pdf_details"/>
<template id="salon_report_pdf_details">
<t t-call="report.html_container">
<t t-call="salon_report_pdf_xls.salon_report_template"/>
</t>
</template>
<report id="salon_xlsx"
model="salon.order"
string="Beauty Spa Report"
report_type="xlsx"
name="salon_report_pdf_xls.salon_report_xls.xlsx"
file="salon_report_pdf_xls.salon_report_xls.xlsx"
attachment_use="False"/>
</data>
</openerp>
Loading…
Cancel
Save