[WIP] Refactoring Code
@@ -1,28 +0,0 @@
|
||||
============================================================================================================================
|
||||
Version Change Log (hotel)
|
||||
============================================================================================================================
|
||||
0.07 on 2013-10-31 by Murtuza Saleh
|
||||
*Improved hotel.room kanban view as per in v9.
|
||||
|
||||
0.06 on 2013-10-29 by Ashish Thakkar
|
||||
*Set the product_category_tree_view in the hotel_view.xml file.
|
||||
*Improved the code to get the hierarchy in rooms,amenities and services.
|
||||
|
||||
0.05 on 2013-10-28 by Anu Patel
|
||||
* Set the default value of check in date and check out date.
|
||||
* Improved calculation of duration for hotel check in - checkout.
|
||||
|
||||
0.04 on 2013-10-28 by Anu Patel
|
||||
* Improved ir.sequence for hotel.folio.
|
||||
* Improved hotel folio line one2many field as faced problem because of product_uos field.
|
||||
|
||||
0.03 on 2013-10-25 by Anu Patel
|
||||
* Improved on_change in hotel folio line where product_id onchange is not working.
|
||||
* Removed on_chage from .xml file as there is no need to define there.
|
||||
|
||||
0.02 on 2013-10-26 by Anu Patel
|
||||
* Improved the code for removed the workflow in hotel folio as workflow is no longer used in v9.
|
||||
* Improved states used in hotel folio from sale order as per in v9.
|
||||
|
||||
0.01 on 2013-10-16 by Ashish Thakkar
|
||||
* Made the module installable in v9.
|
||||
@@ -4,5 +4,4 @@
|
||||
|
||||
from . import models
|
||||
from . import wizard
|
||||
from . import report
|
||||
from . import date_utils
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2018 Alexandre Díaz
|
||||
# Copyright 2018 Alexandre Díaz
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
'name': 'Hotel Management',
|
||||
'version': '0.07',
|
||||
'version': '11.0.2.0.0',
|
||||
'author': 'Odoo Community Association (OCA),\
|
||||
Darío Lodeiros,\
|
||||
Jose Luis Algara,\
|
||||
Alexandre Díaz',
|
||||
'images': [],
|
||||
Alexandre Díaz,\
|
||||
Q. Barriuso,',
|
||||
'category': 'Generic Modules/Hotel Management',
|
||||
'website': '',
|
||||
'website': 'https://github.com/hootel/hootel',
|
||||
'depends': [
|
||||
'sale_stock',
|
||||
'account_payment_return',
|
||||
],
|
||||
'license': "",
|
||||
'license': "AGPL-3",
|
||||
'demo': ['data/hotel_data.xml'],
|
||||
'data': [
|
||||
'security/hotel_security.xml',
|
||||
@@ -26,38 +26,29 @@
|
||||
'wizard/duplicate_reservation.xml',
|
||||
'views/res_config.xml',
|
||||
'data/menus.xml',
|
||||
'views/inherit_account_payment_views.xml',
|
||||
'views/inherit_account_invoice_views.xml',
|
||||
'wizard/hotel_wizard.xml',
|
||||
'views/inherited_account_payment_views.xml',
|
||||
'views/inherited_account_invoice_views.xml',
|
||||
'wizard/checkinwizard.xml',
|
||||
'wizard/massive_price_reservation_days.xml',
|
||||
'wizard/folio_make_invoice_advance_views.xml',
|
||||
'views/hotel_sequence.xml',
|
||||
'views/hotel_report.xml',
|
||||
'views/report_hotel_management.xml',
|
||||
'views/currency_exchange.xml',
|
||||
'views/hotel_floor.xml',
|
||||
'views/hotel_folio.xml',
|
||||
'views/inherit_res_partner.xml',
|
||||
# 'views/hotel_service_type.xml',
|
||||
# 'views/hotel_service_line.xml',
|
||||
'views/hotel_room_type.xml',
|
||||
'views/hotel_room.xml',
|
||||
'views/hotel_room_type_class.xml',
|
||||
'data/hotel_sequence.xml',
|
||||
'views/hotel_floor_views.xml',
|
||||
'views/hotel_folio_views.xml',
|
||||
'views/inherited_res_partner_views.xml',
|
||||
'views/hotel_room_type_views.xml',
|
||||
'views/hotel_room_views.xml',
|
||||
'views/hotel_room_type_class_views.xml',
|
||||
'views/general.xml',
|
||||
# 'views/hotel_service.xml',
|
||||
'views/inherit_product_template.xml',
|
||||
'views/hotel_room_amenities_type.xml',
|
||||
'views/hotel_room_amenities.xml',
|
||||
'views/inherited_product_template_views.xml',
|
||||
'views/hotel_room_amenities_type_views.xml',
|
||||
'views/hotel_room_amenities_views.xml',
|
||||
'views/hotel_room_type_restriction_views.xml',
|
||||
'views/hotel_room_type_restriction_item_views.xml',
|
||||
'views/hotel_reservation.xml',
|
||||
'views/room_closure_reason.xml',
|
||||
'views/hotel_board_service.xml',
|
||||
# 'views/room_type_views.xml',
|
||||
'views/cardex.xml',
|
||||
'views/hotel_room_type_availability.xml',
|
||||
# 'views/hotel_dashboard.xml',
|
||||
'views/hotel_reservation_views.xml',
|
||||
'views/hotel_room_closure_reason_views.xml',
|
||||
'views/hotel_board_service_views.xml',
|
||||
'views/hotel_checkin_partner_views.xml',
|
||||
'views/hotel_room_type_availability_views.xml',
|
||||
'data/cron_jobs.xml',
|
||||
'data/records.xml',
|
||||
'data/email_template_cancel.xml',
|
||||
@@ -65,7 +56,5 @@
|
||||
'data/email_template_exit.xml',
|
||||
'wizard/wizard_reservation.xml',
|
||||
],
|
||||
'css': ['static/src/css/room_kanban.css'],
|
||||
'auto_install': False,
|
||||
'installable': True
|
||||
}
|
||||
|
||||
@@ -3,20 +3,7 @@
|
||||
|
||||
<data noupdate="1">
|
||||
|
||||
<record id="daily_plan_checkin_out" model="ir.cron">
|
||||
<field name="name">Daily Plan</field>
|
||||
<field name="active" eval="True" />
|
||||
<field name="user_id" ref="base.user_root" />
|
||||
<field name="interval_number">1</field>
|
||||
<field name="interval_type">days</field>
|
||||
<field name="numbercall">-1</field>
|
||||
<field name="doall">0</field>
|
||||
<field name="nextcall" eval="(DateTime.now() + timedelta(days=1)).strftime('%Y-%m-%d 05:00:00')"/>
|
||||
<field name="model_id" ref="model_hotel_reservation" />
|
||||
<field name="code">model.daily_plan()</field>
|
||||
</record>
|
||||
|
||||
<!-- Scheduler For To Inform Guest About Reservation Before 24 Hours -->
|
||||
<!-- Scheduler For To Inform Guest About Reservation Before 24 Hours -->
|
||||
<record model="ir.cron" id="Guest_reservation_reminder_24hrs">
|
||||
<field name="name">Inform Guest About Reservation Before 24 Hours</field>
|
||||
<field name="interval_number">1</field>
|
||||
|
||||
|
Before Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
@@ -116,6 +116,7 @@
|
||||
<field name="floor_id" search="[('name', '=', 'Second Floor')]"/>
|
||||
<field name="list_price">25.00</field>
|
||||
<field name="capacity">3</field>
|
||||
</record>
|
||||
</record
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
@@ -13,13 +13,15 @@
|
||||
sequence="15" parent="hotel_management_menu"
|
||||
groups="hotel.group_hotel_user"/>
|
||||
|
||||
<menuitem id="menu_account_finance_xls_reports" name="XLS Reports" parent="hotel.hotel_reports_menu" sequence="50"/>
|
||||
<menuitem id="menu_account_finance_xls_reports" name="XLS Reports"
|
||||
parent="hotel.hotel_reports_menu" sequence="50"/>
|
||||
|
||||
<menuitem id="configuration_others" name="Configuration"
|
||||
parent="hotel.hotel_configuration_menu" sequence="10"
|
||||
groups="hotel.group_hotel_manager" />
|
||||
groups="hotel.group_hotel_manager" />
|
||||
|
||||
<menuitem id="hotel_massive_change" parent="hotel.configuration_others"
|
||||
sequence="10" action="action_hotel_massive_change" name="Massive Changes"/>
|
||||
<menuitem id="hotel_massive_change" name="Massive Changes"
|
||||
parent="hotel.configuration_others"
|
||||
sequence="10" action="action_hotel_massive_change"/>
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
</record>
|
||||
|
||||
|
||||
<function id="default_generate_parity_pricelist_id"
|
||||
<function id="default_pricelist_id"
|
||||
model="ir.default" name="set"
|
||||
eval="('res.config.settings', 'parity_pricelist_id', 1)"/>
|
||||
|
||||
<function id="default_generate_parity_restrictions_id"
|
||||
<function id="default_restrictions_id"
|
||||
model="ir.default" name="set"
|
||||
eval="('res.config.settings', 'parity_restrictions_id', 1)"/>
|
||||
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
# Copyright 2018 Dario Lodeiros
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import currency_exchange
|
||||
#~ from . import folio_room_line
|
||||
from . import inherit_payment_return
|
||||
from . import inherited_payment_return
|
||||
from . import hotel_floor
|
||||
from . import hotel_folio
|
||||
from . import hotel_reservation
|
||||
@@ -13,23 +11,20 @@ from . import hotel_room_amenities
|
||||
from . import hotel_room_amenities_type
|
||||
from . import hotel_room_type
|
||||
from . import hotel_service
|
||||
from . import inherit_account_invoice
|
||||
# from . import inherit_product_category
|
||||
from . import inherit_product_template
|
||||
from . import inherit_res_company
|
||||
# from . import room_type
|
||||
from . import inherit_account_payment
|
||||
from . import inherited_account_invoice
|
||||
from . import inherited_product_template
|
||||
from . import inherited_res_company
|
||||
from . import inherited_account_payment
|
||||
from . import hotel_room_type_restriction
|
||||
from . import hotel_room_type_restriction_item
|
||||
from . import hotel_reservation_line
|
||||
from . import cardex
|
||||
from . import hotel_checkin_partner
|
||||
from . import hotel_room_type_availability
|
||||
from . import inherit_product_pricelist
|
||||
from . import inherited_product_pricelist
|
||||
from . import res_config
|
||||
from . import inherit_res_partner
|
||||
from . import inherited_res_partner
|
||||
from . import inherited_mail_compose_message
|
||||
from . import hotel_room_type_class
|
||||
from . import room_closure_reason
|
||||
from . import hotel_room_closure_reason
|
||||
from . import hotel_service_line
|
||||
from . import hotel_board_service
|
||||
#~ from . import hotel_dashboard
|
||||
|
||||
@@ -1,151 +0,0 @@
|
||||
# Copyright 2018 Dario Lodeiros
|
||||
# Copyright 2018 Alexandre Díaz
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
from decimal import Decimal
|
||||
import time
|
||||
# For Python 3.0 and later
|
||||
from urllib.request import urlopen
|
||||
from openerp import models, fields, api, _
|
||||
from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT
|
||||
|
||||
|
||||
class CurrencyExchangeRate(models.Model):
|
||||
_name = "currency.exchange"
|
||||
_description = "currency"
|
||||
|
||||
name = fields.Char('Reg Number', readonly=True, default='New')
|
||||
today_date = fields.Datetime('Date Ordered',
|
||||
required=True,
|
||||
default=(lambda *a:
|
||||
time.strftime
|
||||
(DEFAULT_SERVER_DATETIME_FORMAT)))
|
||||
input_curr = fields.Many2one('res.currency', string='Input Currency',
|
||||
track_visibility='always')
|
||||
in_amount = fields.Float('Amount Taken', size=64, default=1.0)
|
||||
out_curr = fields.Many2one('res.currency', string='Output Currency',
|
||||
track_visibility='always')
|
||||
out_amount = fields.Float('Subtotal', size=64)
|
||||
folio_no = fields.Many2one('hotel.folio', 'Folio Number')
|
||||
guest_name = fields.Many2one('res.partner', string='Guest Name')
|
||||
room_number = fields.Char(string='Room Number')
|
||||
state = fields.Selection([('draft', 'Draft'), ('done', 'Done'),
|
||||
('cancel', 'Cancel')], 'State', default='draft')
|
||||
rate = fields.Float('Rate(per unit)', size=64)
|
||||
hotel_id = fields.Many2one('stock.warehouse', 'Hotel Name')
|
||||
type = fields.Selection([('cash', 'Cash')], 'Type', default='cash')
|
||||
tax = fields.Selection([('2', '2%'), ('5', '5%'), ('10', '10%')],
|
||||
'Service Tax', default='2')
|
||||
total = fields.Float('Amount Given')
|
||||
|
||||
@api.model
|
||||
def create(self, vals):
|
||||
"""
|
||||
Overrides orm create method.
|
||||
@param self: The object pointer
|
||||
@param vals: dictionary of fields value.
|
||||
"""
|
||||
if not vals:
|
||||
vals = {}
|
||||
if self._context is None:
|
||||
self._context = {}
|
||||
seq_obj = self.env['ir.sequence']
|
||||
vals['name'] = seq_obj.next_by_code('currency.exchange') or 'New'
|
||||
return super(CurrencyExchangeRate, self).create(vals)
|
||||
|
||||
@api.onchange('folio_no')
|
||||
def get_folio_no(self):
|
||||
'''
|
||||
When you change folio_no, based on that it will update
|
||||
the guest_name,hotel_id and room_number as well
|
||||
---------------------------------------------------------
|
||||
@param self: object pointer
|
||||
'''
|
||||
for rec in self:
|
||||
self.guest_name = False
|
||||
self.hotel_id = False
|
||||
self.room_number = False
|
||||
if rec.folio_no and len(rec.folio_no.room_lines) != 0:
|
||||
self.guest_name = rec.folio_no.partner_id.id
|
||||
self.hotel_id = rec.folio_no.warehouse_id.id
|
||||
self.room_number = rec.folio_no.room_lines[0].product_id.name
|
||||
|
||||
@api.multi
|
||||
def act_cur_done(self):
|
||||
"""
|
||||
This method is used to change the state
|
||||
to done of the currency exchange
|
||||
---------------------------------------
|
||||
@param self: object pointer
|
||||
"""
|
||||
self.write({'state': 'done'})
|
||||
return True
|
||||
|
||||
@api.multi
|
||||
def act_cur_cancel(self):
|
||||
"""
|
||||
This method is used to change the state
|
||||
to cancel of the currency exchange
|
||||
---------------------------------------
|
||||
@param self: object pointer
|
||||
"""
|
||||
self.write({'state': 'cancel'})
|
||||
return True
|
||||
|
||||
@api.multi
|
||||
def act_cur_cancel_draft(self):
|
||||
"""
|
||||
This method is used to change the state
|
||||
to draft of the currency exchange
|
||||
---------------------------------------
|
||||
@param self: object pointer
|
||||
"""
|
||||
self.write({'state': 'draft'})
|
||||
return True
|
||||
|
||||
@api.model
|
||||
def get_rate(self, a, b):
|
||||
'''
|
||||
Calculate rate between two currency
|
||||
-----------------------------------
|
||||
@param self: object pointer
|
||||
'''
|
||||
try:
|
||||
url = 'http://finance.yahoo.com/d/quotes.csv?s=%s%s=X&f=l1' % (a,
|
||||
b)
|
||||
rate = urllib2.urlopen(url).read().rstrip()
|
||||
return Decimal(rate)
|
||||
except:
|
||||
return Decimal('-1.00')
|
||||
|
||||
@api.onchange('input_curr', 'out_curr', 'in_amount')
|
||||
def get_currency(self):
|
||||
'''
|
||||
When you change input_curr, out_curr or in_amount
|
||||
it will update the out_amount of the currency exchange
|
||||
------------------------------------------------------
|
||||
@param self: object pointer
|
||||
'''
|
||||
self.out_amount = 0.0
|
||||
if self.input_curr:
|
||||
for rec in self:
|
||||
result = rec.get_rate(self.input_curr.name,
|
||||
self.out_curr.name)
|
||||
if self.out_curr:
|
||||
self.rate = result
|
||||
if self.rate == Decimal('-1.00'):
|
||||
raise except_orm(_('Warning'),
|
||||
_('Please Check Your \
|
||||
Network Connectivity.'))
|
||||
self.out_amount = (float(result) * float(self.in_amount))
|
||||
|
||||
@api.onchange('out_amount', 'tax')
|
||||
def tax_change(self):
|
||||
'''
|
||||
When you change out_amount or tax
|
||||
it will update the total of the currency exchange
|
||||
-------------------------------------------------
|
||||
@param self: object pointer
|
||||
'''
|
||||
if self.out_amount:
|
||||
ser_tax = ((self.out_amount) * (float(self.tax))) / 100
|
||||
self.total = self.out_amount - ser_tax
|
||||
@@ -1,260 +0,0 @@
|
||||
# Copyright 2018 Dario Lodeiros
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
import json
|
||||
from datetime import datetime, timedelta
|
||||
from babel.dates import format_datetime, format_date
|
||||
from odoo import models, api, _, fields
|
||||
from odoo.tools import DEFAULT_SERVER_DATE_FORMAT as DF
|
||||
from odoo.tools.misc import formatLang
|
||||
|
||||
class HotelDashboard(models.Model):
|
||||
_name = "hotel.dashboard"
|
||||
|
||||
# FIXME
|
||||
def _get_count(self):
|
||||
resevations_count = self.env['hotel.reservation'].search_count(
|
||||
[('sate', '=', 'confirm')])
|
||||
folios_count = self.env['hotel.folio'].search_count(
|
||||
[('sate', '=', 'sales_order')])
|
||||
next_arrivals_count = self.env['hotel.reservation'].search_count(
|
||||
[('is_checkin', '=', True)])
|
||||
|
||||
self.orders_count = len(orders_count)
|
||||
self.quotations_count = len(quotations_count)
|
||||
self.orders_done_count = len(orders_done_count)
|
||||
|
||||
@api.one
|
||||
def _kanban_dashboard(self):
|
||||
if self.graph_type == 'bar':
|
||||
self.kanban_dashboard_graph = json.dumps(self.get_bar_graph_datas())
|
||||
elif self.graph_type == 'line':
|
||||
self.kanban_dashboard_graph = json.dumps(self.get_line_graph_datas())
|
||||
|
||||
@api.one
|
||||
def _kanban_dashboard_graph(self):
|
||||
self.kanban_dashboard_graph = json.dumps(self.get_bar_graph_datas())
|
||||
#~ if (self.type in ['sale', 'purchase']):
|
||||
#~ self.kanban_dashboard_graph = json.dumps(self.get_bar_graph_datas())
|
||||
#~ elif (self.type in ['cash', 'bank']):
|
||||
#~ self.kanban_dashboard_graph = json.dumps(self.get_line_graph_datas())
|
||||
|
||||
color = fields.Integer(string='Color Index')
|
||||
name = fields.Char(string="Name")
|
||||
type = fields.Char(default="sale")
|
||||
graph_type = fields.Selection([
|
||||
('line', 'Line'),
|
||||
('bar', 'Bar'),
|
||||
('none', 'None')])
|
||||
reservations_count = fields.Integer(compute='_get_count')
|
||||
folios_count = fields.Integer(compute='_get_count')
|
||||
next_arrivals_count = fields.Integer(compute='_get_count')
|
||||
kanban_dashboard = fields.Text(compute='_kanban_dashboard')
|
||||
kanban_dashboard_graph = fields.Text(compute='_kanban_dashboard_graph')
|
||||
show_on_dashboard = fields.Boolean(
|
||||
string='Show journal on dashboard',
|
||||
help="Whether this journal should be displayed on the dashboard or not",
|
||||
default=True)
|
||||
|
||||
@api.multi
|
||||
def get_bar_graph_datas(self):
|
||||
data = []
|
||||
today = datetime.strptime(fields.Date.context_today(self), DF)
|
||||
day_of_week = int(format_datetime(today, 'e', locale=self._context.get('lang') or 'en_US'))
|
||||
for i in range(0, 15):
|
||||
if i == 0:
|
||||
label = _('Today')
|
||||
else:
|
||||
label = format_date(today + timedelta(days=i),
|
||||
'd',
|
||||
locale=self._context.get('lang') or 'en_US')
|
||||
data.append({'label':label, 'value':0.0, 'type': 'past' if i < 0 else 'future'})
|
||||
# Build SQL query to find amount aggregated by week
|
||||
select_sql_clause = """SELECT count(id) as total from hotel_reservation where state != 'cancelled'"""
|
||||
query = "("+select_sql_clause+" and date(checkin) = '"+today.strftime(DF)+"')"
|
||||
for i in range(1,15):
|
||||
next_date = today + timedelta(days=i)
|
||||
query += " UNION ALL ("+select_sql_clause+" and date(checkin) = '"+next_date.strftime(DF)+"')"
|
||||
|
||||
self.env.cr.execute(query)
|
||||
query_results = self.env.cr.dictfetchall()
|
||||
for index_k, index_v in enumerate(query_results):
|
||||
data[index_k]['value'] = index_v.get('total')
|
||||
return [{'values': data}]
|
||||
|
||||
@api.multi
|
||||
def get_journal_dashboard_datas(self):
|
||||
#~ currency = self.currency_id or self.company_id.currency_id
|
||||
#~ number_to_reconcile = last_balance = account_sum = 0
|
||||
#~ ac_bnk_stmt = []
|
||||
#~ title = ''
|
||||
#~ number_draft = number_waiting = number_late = 0
|
||||
#~ sum_draft = sum_waiting = sum_late = 0.0
|
||||
#~ if self.type in ['bank', 'cash']:
|
||||
#~ last_bank_stmt = self.env['account.bank.statement'].search([('journal_id', 'in', self.ids)], order="date desc, id desc", limit=1)
|
||||
#~ last_balance = last_bank_stmt and last_bank_stmt[0].balance_end or 0
|
||||
#~ #Get the number of items to reconcile for that bank journal
|
||||
#~ self.env.cr.execute("""SELECT COUNT(DISTINCT(statement_line_id))
|
||||
#~ FROM account_move where statement_line_id
|
||||
#~ IN (SELECT line.id
|
||||
#~ FROM account_bank_statement_line AS line
|
||||
#~ LEFT JOIN account_bank_statement AS st
|
||||
#~ ON line.statement_id = st.id
|
||||
#~ WHERE st.journal_id IN %s and st.state = 'open')""", (tuple(self.ids),))
|
||||
#~ already_reconciled = self.env.cr.fetchone()[0]
|
||||
#~ self.env.cr.execute("""SELECT COUNT(line.id)
|
||||
#~ FROM account_bank_statement_line AS line
|
||||
#~ LEFT JOIN account_bank_statement AS st
|
||||
#~ ON line.statement_id = st.id
|
||||
#~ WHERE st.journal_id IN %s and st.state = 'open'""", (tuple(self.ids),))
|
||||
#~ all_lines = self.env.cr.fetchone()[0]
|
||||
#~ number_to_reconcile = all_lines - already_reconciled
|
||||
#~ # optimization to read sum of balance from account_move_line
|
||||
#~ account_ids = tuple(filter(None, [self.default_debit_account_id.id, self.default_credit_account_id.id]))
|
||||
#~ if account_ids:
|
||||
#~ amount_field = 'balance' if (not self.currency_id or self.currency_id == self.company_id.currency_id) else 'amount_currency'
|
||||
#~ query = """SELECT sum(%s) FROM account_move_line WHERE account_id in %%s AND date <= %%s;""" % (amount_field,)
|
||||
#~ self.env.cr.execute(query, (account_ids, fields.Date.today(),))
|
||||
#~ query_results = self.env.cr.dictfetchall()
|
||||
#~ if query_results and query_results[0].get('sum') != None:
|
||||
#~ account_sum = query_results[0].get('sum')
|
||||
#~ #TODO need to check if all invoices are in the same currency than the journal!!!!
|
||||
#~ elif self.type in ['sale', 'purchase']:
|
||||
#~ title = _('Bills to pay') if self.type == 'purchase' else _('Invoices owed to you')
|
||||
#~ # optimization to find total and sum of invoice that are in draft, open state
|
||||
#~ query = """SELECT state, amount_total, currency_id AS currency, type FROM account_invoice WHERE journal_id = %s AND state NOT IN ('paid', 'cancel');"""
|
||||
#~ self.env.cr.execute(query, (self.id,))
|
||||
#~ query_results = self.env.cr.dictfetchall()
|
||||
#~ today = datetime.today()
|
||||
#~ query = """SELECT amount_total, currency_id AS currency, type FROM account_invoice WHERE journal_id = %s AND date < %s AND state = 'open';"""
|
||||
#~ self.env.cr.execute(query, (self.id, today))
|
||||
#~ late_query_results = self.env.cr.dictfetchall()
|
||||
#~ for result in query_results:
|
||||
#~ if result['type'] in ['in_refund', 'out_refund']:
|
||||
#~ factor = -1
|
||||
#~ else:
|
||||
#~ factor = 1
|
||||
#~ cur = self.env['res.currency'].browse(result.get('currency'))
|
||||
#~ if result.get('state') in ['draft', 'proforma', 'proforma2']:
|
||||
#~ number_draft += 1
|
||||
#~ sum_draft += cur.compute(result.get('amount_total'), currency) * factor
|
||||
#~ elif result.get('state') == 'open':
|
||||
#~ number_waiting += 1
|
||||
#~ sum_waiting += cur.compute(result.get('amount_total'), currency) * factor
|
||||
#~ for result in late_query_results:
|
||||
#~ if result['type'] in ['in_refund', 'out_refund']:
|
||||
#~ factor = -1
|
||||
#~ else:
|
||||
#~ factor = 1
|
||||
#~ cur = self.env['res.currency'].browse(result.get('currency'))
|
||||
#~ number_late += 1
|
||||
#~ sum_late += cur.compute(result.get('amount_total'), currency) * factor
|
||||
|
||||
#~ difference = currency.round(last_balance-account_sum) + 0.0
|
||||
return {
|
||||
'graph': self.graph_type,
|
||||
'number_to_reconcile': 11,
|
||||
'account_balance': 4314,
|
||||
'last_balance': 252,
|
||||
'difference': 432,
|
||||
'number_draft': 32,
|
||||
'number_waiting': 44,
|
||||
'number_late': 23,
|
||||
'sum_draft': 2424245,
|
||||
'sum_waiting': 3124312,
|
||||
'sum_late': 23123,
|
||||
'currency_id': 1,
|
||||
'bank_statements_source': 'fonte',
|
||||
'title': 'titulo',
|
||||
}
|
||||
|
||||
@api.multi
|
||||
def get_line_graph_datas(self):
|
||||
data = []
|
||||
today = datetime.strptime(fields.Date.context_today(self), DF)
|
||||
days=30
|
||||
|
||||
for i in range(-1, days + 1):
|
||||
ndate = today + timedelta(days=i)
|
||||
ndate_str = ndate.strftime(DF)
|
||||
day_onboard = self.env['hotel.reservation.line'].search_count([('date','=',ndate)])
|
||||
locale = self._context.get('lang') or 'en_US'
|
||||
short_name = format_date(ndate, 'd', locale=locale)
|
||||
name = format_date(ndate, 'd LLLL Y', locale=locale)
|
||||
data.append({'x':short_name,'y':day_onboard, 'name':name})
|
||||
return [{'values': data, 'area': True}]
|
||||
|
||||
@api.multi
|
||||
def action_create_new(self):
|
||||
#~ ctx = self._context.copy()
|
||||
#~ model = 'account.invoice'
|
||||
#~ if self.type == 'sale':
|
||||
#~ ctx.update({'journal_type': self.type, 'default_type': 'out_invoice', 'type': 'out_invoice', 'default_journal_id': self.id})
|
||||
#~ if ctx.get('refund'):
|
||||
#~ ctx.update({'default_type':'out_refund', 'type':'out_refund'})
|
||||
#~ view_id = self.env.ref('account.invoice_form').id
|
||||
#~ elif self.type == 'purchase':
|
||||
#~ ctx.update({'journal_type': self.type, 'default_type': 'in_invoice', 'type': 'in_invoice', 'default_journal_id': self.id})
|
||||
#~ if ctx.get('refund'):
|
||||
#~ ctx.update({'default_type': 'in_refund', 'type': 'in_refund'})
|
||||
#~ view_id = self.env.ref('account.invoice_supplier_form').id
|
||||
#~ else:
|
||||
#~ ctx.update({'default_journal_id': self.id})
|
||||
#~ view_id = self.env.ref('account.view_move_form').id
|
||||
#~ model = 'account.move'
|
||||
model = "hotel.folio"
|
||||
view_id = self.env.ref('hotel.view_hotel_folio1_form').id
|
||||
ctx=''
|
||||
return {
|
||||
'name': _('Create invoice/bill'),
|
||||
'type': 'ir.actions.act_window',
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
'res_model': model,
|
||||
'view_id': view_id,
|
||||
'context': ctx,
|
||||
}
|
||||
|
||||
@api.multi
|
||||
def open_action(self):
|
||||
"""return action based on type for related journals"""
|
||||
#~ action_name = self._context.get('action_name', False)
|
||||
#~ if not action_name:
|
||||
#~ if self.type == 'bank':
|
||||
#~ action_name = 'action_bank_statement_tree'
|
||||
#~ elif self.type == 'cash':
|
||||
#~ action_name = 'action_view_bank_statement_tree'
|
||||
#~ elif self.type == 'sale':
|
||||
#~ action_name = 'action_invoice_tree1'
|
||||
#~ elif self.type == 'purchase':
|
||||
#~ action_name = 'action_invoice_tree2'
|
||||
#~ else:
|
||||
#~ action_name = 'action_move_journal_line'
|
||||
|
||||
#~ _journal_invoice_type_map = {
|
||||
#~ ('sale', None): 'out_invoice',
|
||||
#~ ('purchase', None): 'in_invoice',
|
||||
#~ ('sale', 'refund'): 'out_refund',
|
||||
#~ ('purchase', 'refund'): 'in_refund',
|
||||
#~ ('bank', None): 'bank',
|
||||
#~ ('cash', None): 'cash',
|
||||
#~ ('general', None): 'general',
|
||||
#~ }
|
||||
#~ invoice_type = _journal_invoice_type_map[(self.type, self._context.get('invoice_type'))]
|
||||
|
||||
#~ ctx = self._context.copy()
|
||||
#~ ctx.pop('group_by', None)
|
||||
#~ ctx.update({
|
||||
#~ 'journal_type': self.type,
|
||||
#~ 'default_journal_id': self.id,
|
||||
#~ 'search_default_journal_id': self.id,
|
||||
#~ 'default_type': invoice_type,
|
||||
#~ 'type': invoice_type
|
||||
#~ })
|
||||
|
||||
#~ [action] = self.env.ref('account.%s' % action_name).read()
|
||||
#~ action['context'] = ctx
|
||||
#~ action['domain'] = self._context.get('use_domain', [])
|
||||
#~ if action_name in ['action_bank_statement_tree', 'action_view_bank_statement_tree']:
|
||||
#~ action['views'] = False
|
||||
#~ action['view_id'] = False
|
||||
return False
|
||||
@@ -352,11 +352,12 @@ class HotelReservation(models.Model):
|
||||
@api.model
|
||||
def _autoassign(self, values):
|
||||
res = {}
|
||||
checkin = values.get('checkin')
|
||||
checkin = values.get('checkin')
|
||||
checkout = values.get('checkout')
|
||||
room_type = values.get('room_type_id')
|
||||
if checkin and checkout and room_type:
|
||||
room_chosen = self.env['hotel.room.type'].check_availability_room(checkin, checkout, room_type)[0]
|
||||
# Check room_chosen exist
|
||||
res.update({
|
||||
'room_id': room_chosen.id
|
||||
})
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2017 Alexandre Díaz
|
||||
# Copyright 2017 Dario Lodeiros
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import hotel_report
|
||||
@@ -1,41 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2017 Alexandre Díaz
|
||||
# Copyright 2017 Dario Lodeiros
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
import time
|
||||
from openerp import models
|
||||
|
||||
# Old SXW engine was removed already in v11. You should update your code with
|
||||
# current engine tools.
|
||||
# class FolioReport():
|
||||
# def __init__(self, cr, uid, name, context):
|
||||
# super(FolioReport, self).__init__(cr, uid, name, context)
|
||||
# self.localcontext.update({'time': time,
|
||||
# 'get_data': self.get_data,
|
||||
# 'get_Total': self.getTotal,
|
||||
# 'get_total': self.gettotal,
|
||||
# })
|
||||
# self.temp = 0.0
|
||||
#
|
||||
# def get_data(self, date_start, date_end):
|
||||
# folio_obj = self.pool.get('hotel.folio')
|
||||
# tids = folio_obj.search(self.cr, self.uid,
|
||||
# [('checkin_date', '>=', date_start),
|
||||
# ('checkout_date', '<=', date_end)])
|
||||
# res = folio_obj.browse(self.cr, self.uid, tids)
|
||||
# return res
|
||||
#
|
||||
# def gettotal(self, total):
|
||||
# self.temp = self.temp + float(total)
|
||||
# return total
|
||||
#
|
||||
# def getTotal(self):
|
||||
# return self.temp
|
||||
#
|
||||
#
|
||||
# class ReportLunchorder(models.AbstractModel):
|
||||
# _name = 'report.hotel.report_hotel_folio'
|
||||
# _inherit = 'report.report_xlsx.abstract'
|
||||
# _template = 'hotel.report_hotel_folio'
|
||||
# _wrapped_report_class = FolioReport
|
||||
@@ -1,13 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
<!--Report for hotel folio -->
|
||||
<report id="hotel_folio_details"
|
||||
string="Folio Total"
|
||||
model="hotel.folio"
|
||||
name="folio.total"
|
||||
rml="hotel/report/total_folio.rml"
|
||||
menu="False"
|
||||
auto="False"/>
|
||||
|
||||
</odoo>
|
||||
@@ -1,19 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
<report
|
||||
id="action_report_viajero"
|
||||
model="cardex"
|
||||
string="Parte de Viajero"
|
||||
report_type="qweb-pdf"
|
||||
name="report.viajero"
|
||||
file="report.viajero" />
|
||||
<record id="action_report_viajero" model="ir.actions.report.xml">
|
||||
<field name="paperformat_id" ref="report_viajero_paperformat"/>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="pdfjs_enabled">1</field>
|
||||
<field name="pdfjs_auto_print">1</field>
|
||||
<field name="pdfjs_print_dpi">201</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -1 +0,0 @@
|
||||
,slimbook,slimbook-PRO,26.07.2018 11:51,file:///home/slimbook/.config/libreoffice/4;
|
||||
|
Before Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 87 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 9.9 KiB |
|
Before Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 10 KiB |
@@ -1,56 +0,0 @@
|
||||
<section class="oe_container">
|
||||
<div class="oe_row oe_spaced">
|
||||
<div class="oe_span12">
|
||||
<h1 style="font-size:200%; font-family:courier; color:black; text-align:center;"> HOTEL MANAGEMENT SYSTEM </h1>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="oe_container">
|
||||
<div class="oe_row oe_spaced">
|
||||
<div class="oe_span12" style = "background-color: #009688; height:200px;">
|
||||
<h1 style="font-family:courier; color:white ; text-align:right ; margin-right:1cm; margin-top: 35px"> HOTEL BOOKING </h1>
|
||||
<p style="font-size:120%; font-family:courier; color:white ; text-align:right; margin-right: 2cm"> Book your room. </p>
|
||||
<img style="position:relative;top:-120px; width: 200px; height:200px" src= "hotel1.png">
|
||||
<img style="top:35px; width: 80px; height:80px; margin-right:2cm" src= "room.png" align="right">
|
||||
<img style="position:relative; top:-170px; width:75px; height:75px;" src="book.png">
|
||||
<img style="position:relative; top:-170px; width:70px; height:70px;" src="checkin.png">
|
||||
<img style="position:relative; top:-170px; width:70px; height:70px;" src="key.png">
|
||||
</div>
|
||||
<div class="oe_span12" style = "background-color: #f1c40f; height:200px;">
|
||||
<h1 style="font-family:courier; color:white ; text-align:left ; margin-top: 35px"> ALL INCLUSIVE </h1>
|
||||
<p style="font-size:120%; font-family:courier; color:white ; text-align: left;"> Facilities provided </p>
|
||||
<img style="top:35px;" src= "inc1.png">
|
||||
<img style="top:35px; width: 50px; height: 50px;" src= "inc2.png" align="right">
|
||||
<img style="top:35px; width: 50px; height: 50px;" src= "inc3.png" align="right">
|
||||
<img style="top:35px; width: 50px; height: 50px;" src= "inc4.png" align="right">
|
||||
<img style="top:50px; width: 50px; height: 50px;" src= "inc5.png" align="right">
|
||||
</div>
|
||||
<div class="oe_span12" style = "background-color: #f44336; height:200px;" >
|
||||
<h1 style="font-family:courier; color:white ; text-align:right ; margin-right: 5cm; margin-top: 35px"> AMENITIES </h1>
|
||||
<p style="font-size:120%; font-family:courier; color:white ; text-align:right; margin-right:2cm"> Extra class hotel service </p>
|
||||
<img style="width:100px; height: 100px; margin-right:2cm" src="star_icon.png" align="right" >
|
||||
<img style="top:35px; width:50px; height:50px; left:200px" src="gym.png">
|
||||
<img style="width:80px; height:60px;" src="pool_icon.png" align="left">
|
||||
<img style="width:60px; height:60px;" src="car.png">
|
||||
</div>
|
||||
<div class="oe_span12" style = "background-color: #cddc39; height:200px;" >
|
||||
<h1 style="font-family:courier; color:white; text-align:left ; margin-top: 35px"> RESTURANTS </h1>
|
||||
<p style="font-size:120%; font-family:courier; color:white ; text-align:left;"> Bon Appetite ! </p>
|
||||
<img style="bottom:20px; width:250px; height: 150px" src="menu_waitor.png">
|
||||
<img style="top:35px; width: 60px; height: 60px;" src= "plate.png" align="right">
|
||||
<img style="top:35px; width: 60px; height: 60px;" src= "menu.png" align="right">
|
||||
</div>
|
||||
<div class="oe_span12" style = "background-color: #3ed37d; height:200px;" >
|
||||
<h1 style="font-family:courier; color:white ; text-align:right ; margin-right:1cm; margin-top: 35px"> Currency Exchange </h1>
|
||||
<p style="font-size:120%; font-family:courier; color:white ; text-align:right; margin-right:3cm"> Exchange currency on the go </p>
|
||||
<img style="position:relative; top:-90px; width:110px; heigth:110px" src= "currency.png">
|
||||
<img style="position:relative; top:-20px; width: 80px; height:80px; margin-right:1cm" src= "money.png" align="right">
|
||||
</div>
|
||||
<div class="oe_span12" style = "background-color: #34495e; height:200px;" >
|
||||
<h1 style="font-family:courier; color:white ; text-align:left ; margin-right: 5cm; margin-top: 35px"> REPORTS </h1>
|
||||
<p style="font-size:120%; font-family:courier; color:white ; text-align:left; margin-right:3cm"> Manage and Analyze </p>
|
||||
<img style="position:relative; top:-80px; width: 150px; height:150px" src= "report1.png" align="right">
|
||||
<img style="position:relative; top:-50px; width:100px; height:100px;" src="report.png" align="right">
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 201 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 128 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 27 KiB |
@@ -1,28 +0,0 @@
|
||||
// Copyright 2018 Alexandre Díaz <dev@redneboa.es>
|
||||
// License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
odoo.define('hotel_calendar.listview_button_open_reservation_wizard', function(require) {
|
||||
'use strict';
|
||||
|
||||
var ListView = require('web.ListView'),
|
||||
Core = require('web.core'),
|
||||
|
||||
_t = Core._t;
|
||||
|
||||
|
||||
ListView.include({
|
||||
render_buttons: function () {
|
||||
var self = this;
|
||||
this._super.apply(this, arguments); // Sets this.$buttons
|
||||
|
||||
if (this.dataset.model == 'hotel.reservation') {
|
||||
this.$buttons.append("<button class='oe_button oe_open_reservation_wizard oe_highlight' type='button'>"+_t('Open Wizard')+"</button>");
|
||||
this.$buttons.find('.oe_open_reservation_wizard').on('click', function(){
|
||||
self.do_action('hotel_calendar.open_wizard_reservations');
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return ListView;
|
||||
|
||||
});
|
||||
28
hotel/static/src/js/views/list/list_controller.js
Normal file
@@ -0,0 +1,28 @@
|
||||
odoo.define('hotel.ListController', function(require) {
|
||||
'use strict';
|
||||
/*
|
||||
* Hotel
|
||||
* GNU Public License
|
||||
* Alexandre Díaz <dev@redneboa.es>
|
||||
*/
|
||||
|
||||
var ListController = require('web.ListController');
|
||||
var Core = require('web.core');
|
||||
|
||||
var _t = Core._t;
|
||||
|
||||
ListController.include({
|
||||
|
||||
renderButtons: function () {
|
||||
this._super.apply(this, arguments); // Sets this.$buttons
|
||||
var self = this;
|
||||
if (this.modelName === 'hotel.reservation') {
|
||||
this.$buttons.append("<button class='btn btn-sm oe_open_reservation_wizard oe_highlight' type='button'>"+_t('Open Wizard')+"</button>");
|
||||
this.$buttons.find('.oe_open_reservation_wizard').on('click', function(){
|
||||
self.do_action('hotel.open_wizard_reservations');
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
@@ -1,86 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!--==================================================== Currency ==================================================== -->
|
||||
<!-- Form view of currency exchange -->
|
||||
<record model="ir.ui.view" id="view_currency_exchange_form">
|
||||
<field name="name">currency.exchange.form</field>
|
||||
<field name="model">currency.exchange</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string=" Currency Exchange">
|
||||
<header>
|
||||
<button name="cur_confirm" string="Done" states='draft' icon="gtk-ok" />
|
||||
<button name="cur_cancel" string="Cancel" states='draft' icon="gtk-cancel" />
|
||||
<button name="cur_cancel_draft" string="do_draft" states='cancel' icon="gtk-ok" />
|
||||
<button name="%(report_hotel_currency)d" states='done' type="action" string="Print" class="oe_highlight" />
|
||||
<field name="state" widget="statusbar" statusbar_visible="draft,done" />
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_title ">
|
||||
<label for="name" string="Name" />
|
||||
<h1>
|
||||
<field name="name" select="1" />
|
||||
</h1>
|
||||
</div>
|
||||
<separator string="Details" />
|
||||
<newline />
|
||||
<group colspan="2" col="4">
|
||||
<field name="today_date" />
|
||||
<newline />
|
||||
</group>
|
||||
<group colspan="2" col="4">
|
||||
<field name="folio_no" required="1" />
|
||||
<field name="guest_name" required="1" />
|
||||
<field name="room_number" required="1" />
|
||||
<field name="hotel_id" />
|
||||
<field name="type" />
|
||||
</group>
|
||||
<separator string="Currency Exchange" />
|
||||
<newline />
|
||||
<group colspan="2" col="4">
|
||||
<field name="input_curr" />
|
||||
<field name="in_amount" select="1" widget="monetary"
|
||||
options="{'currency_field': 'input_curr'}" />
|
||||
<field name="out_curr" />
|
||||
<field name="rate" />
|
||||
</group>
|
||||
<group colspan="2" col="4">
|
||||
<field name="out_amount" widget="monetary"
|
||||
options="{'currency_field': 'out_curr'}" />
|
||||
<newline />
|
||||
<field name="tax" style="width:15%%;" />
|
||||
</group>
|
||||
<separator string="Total Amount" />
|
||||
<newline />
|
||||
<h1>
|
||||
<field name="total" widget="monetary" options="{'currency_field': 'out_curr'}" />
|
||||
</h1>
|
||||
<group colspan="2" col="4"></group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Tree view of currency exchange -->
|
||||
<record model="ir.ui.view" id="view_currency_exchange_tree">
|
||||
<field name="name">currency.exchange.tree</field>
|
||||
<field name="model">currency.exchange</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string=" Currency Exchange">
|
||||
<field name="name" />
|
||||
<field name="today_date" />
|
||||
<field name="guest_name" />
|
||||
<field name="total" sum="Total" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Action of currency exchange -->
|
||||
<record model="ir.actions.act_window" id="open_currency_exchange_tree">
|
||||
<field name="name">Currency Exchange</field>
|
||||
<field name="res_model">currency.exchange</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -4,7 +4,7 @@
|
||||
<!-- Backend stuff -->
|
||||
<template id="assets_backend" inherit_id="web.assets_backend">
|
||||
<xpath expr="." position="inside">
|
||||
<script type="text/javascript" src="/hotel/static/src/js/open_reservation_wizard_listview_button.js"></script>
|
||||
<script type="text/javascript" src="/hotel/static/src/js/views/list/list_controller.js"></script>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -1,210 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="dashboard_sales_action_id" model="ir.actions.act_window">
|
||||
<field name="name">Folios</field>
|
||||
<field name="res_model">hotel.dashboard</field>
|
||||
</record>
|
||||
|
||||
<record id="dashboard_sales_order_action_id" model="ir.actions.act_window">
|
||||
<field name="name">Folios</field>
|
||||
<field name="res_model">hotel.dashboard</field>
|
||||
</record>
|
||||
|
||||
<record id="dashboard_sales_done_action_id" model="ir.actions.act_window">
|
||||
<field name="name">Folios</field>
|
||||
<field name="res_model">hotel.dashboard</field>
|
||||
</record>
|
||||
|
||||
<record id="dashboard_sales_cancel_action_id" model="ir.actions.act_window">
|
||||
<field name="name">Folios</field>
|
||||
<field name="res_model">hotel.dashboard</field>
|
||||
</record>
|
||||
|
||||
<record id="hotel_dashboard_kanban_view" model="ir.ui.view">
|
||||
<field name="name">hotel.dashboard.view</field>
|
||||
<field name="model">hotel.dashboard</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban create="false" class="oe_background_grey o_kanban_dashboard o_account_kanban">
|
||||
<field name="id"/>
|
||||
<field name="name"/>
|
||||
<field name="graph_type"/>
|
||||
<field name="show_on_dashboard"/>
|
||||
<field name="kanban_dashboard"/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div t-attf-class="#{kanban_color(0)}">
|
||||
<t t-value="JSON.parse(record.kanban_dashboard.raw_value)" t-set="dashboard"/>
|
||||
<t t-value="record.type.raw_value" t-set="journal_type"/>
|
||||
<t t-value="record.name.raw_value" t-set="dashboard_name"/>
|
||||
<t t-value="record.graph_type.raw_value" t-set="graph_type"/>
|
||||
<t t-call="JournalTop"/>
|
||||
<div class="container o_kanban_card_content o_visible">
|
||||
<div class="row">
|
||||
<t t-if="dashboard_name == 'Chekins Dashboard'" t-call="JournalBodySalePurchase"/>
|
||||
<t t-if="dashboard_name != 'Chekins Dashboard'" t-call="JournalBodySalePurchase"/>
|
||||
</div>
|
||||
<t t-call="JournalBodyGraph"/>
|
||||
</div><div class="container o_kanban_card_manage_pane o_invisible">
|
||||
<t t-call="JournalManage"/>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<t t-name="JournalTop">
|
||||
<div class="o_kanban_card_header">
|
||||
<div class="o_kanban_card_header_title">
|
||||
<div class="o_primary">
|
||||
<a type="object" name="open_action"><field name="name"/></a>
|
||||
</div>
|
||||
<div class="o_secondary" t-att-title="dashboard.title">
|
||||
<field name="type"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="o_kanban_manage_button_section">
|
||||
<a class="o_kanban_manage_toggle_button" href="#">More <i class="fa fa-caret-down"/></a>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<t t-name="JournalManage">
|
||||
<div class="row">
|
||||
<div class="col-xs-4 o_kanban_card_manage_section o_kanban_manage_view">
|
||||
<div class="o_kanban_card_manage_title">
|
||||
<span>View</span>
|
||||
</div>
|
||||
<div>
|
||||
<a>
|
||||
<span>Invoices</span>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a>
|
||||
<span>Refunds</span>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a>Payments Matching</a>
|
||||
</div>
|
||||
<div>
|
||||
<a>Journal Items</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-4 o_kanban_card_manage_section o_kanban_manage_new">
|
||||
<div class="o_kanban_card_manage_title">
|
||||
<span>New</span>
|
||||
</div>
|
||||
<div>
|
||||
<a>
|
||||
<span>Invoice</span>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a>
|
||||
<span>Refund</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-4 o_kanban_card_manage_section o_kanban_manage_reports">
|
||||
<div class="o_kanban_card_manage_title">
|
||||
<span>Reports</span>
|
||||
</div>
|
||||
<div>
|
||||
<a>Invoices Analysis</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row o_kanban_card_settings">
|
||||
<div class="col-xs-6">
|
||||
<a><i t-attf-class="fa o_dashboard_star #{record.show_on_dashboard.raw_value ? 'fa-star' : 'fa-star-o'}" title="Click to add/remove from favorite"/> Favorite</a>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<a type="edit">Settings</a>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
|
||||
<t t-name="JournalBodySalePurchase">
|
||||
<div class="col-xs-6 o_kanban_primary_left">
|
||||
<t>
|
||||
<button type="object" name="action_create_new" class="btn btn-primary btn-sm o_invoice_new">
|
||||
<span>New</span>
|
||||
</button>
|
||||
</t>
|
||||
</div>
|
||||
<div class="col-xs-6 o_kanban_primary_right">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<a type="object" name="open_action" context="{'search_default_draft': '1', 'search_default_proforma': '1'}">
|
||||
<span> Draft</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span><t t-esc="dashboard.sum_draft"/></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<a type="object" name="open_action" context="{'search_default_unpaid': '1'}">
|
||||
<span> Payments to do</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span><t t-esc="dashboard.sum_waiting"/></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
<t t-name="JournalBodyGraph">
|
||||
|
||||
<div class="o_kanban_graph_section">
|
||||
<span t-if="graph_type == 'line'">
|
||||
<field name="kanban_dashboard_graph" t-att-graph_type="'line'" widget="dashboard_graph"/>
|
||||
</span>
|
||||
<span t-if="graph_type == 'bar'">
|
||||
<field name="kanban_dashboard_graph" t-att-graph_type="'bar'" widget="dashboard_graph"/>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="hotel_dashboard_action" model="ir.actions.act_window">
|
||||
<field name="name">Hotel Dashboard</field>
|
||||
<field name="res_model">hotel.dashboard</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="context">{}</field>
|
||||
<field name="view_mode">kanban</field>
|
||||
<field name="view_id" ref="hotel_dashboard_kanban_view"/>
|
||||
</record>
|
||||
|
||||
<menuitem id="employees_dashboard_menu"
|
||||
parent="hotel_management_menu"
|
||||
sequence="1"
|
||||
name="Dashboard"
|
||||
action="hotel_dashboard_action"/>
|
||||
|
||||
|
||||
<data noupdate="0">
|
||||
<record model="hotel.dashboard" id="chekins_dashboard">
|
||||
<field name="name">Chekins Dashboard</field>
|
||||
<field name="type">sales</field>
|
||||
<field name="graph_type">bar</field>
|
||||
<field name="show_on_dashboard">1</field>
|
||||
</record>
|
||||
<record model="hotel.dashboard" id="onboard_dashboard">
|
||||
<field name="name">On Board</field>
|
||||
<field name="type">sales</field>
|
||||
<field name="graph_type">line</field>
|
||||
<field name="show_on_dashboard">1</field>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
</odoo>
|
||||
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!--Report for hotel folio -->
|
||||
<report
|
||||
id="report_hotel_management"
|
||||
string="Hotel Folio"
|
||||
model="hotel.folio"
|
||||
report_type="qweb-pdf"
|
||||
file="hotel.report_hotel_folio"
|
||||
name="hotel.report_hotel_folio"
|
||||
menu="False" />
|
||||
|
||||
<!--Report for currency exchange -->
|
||||
<report
|
||||
id="report_hotel_currency"
|
||||
string="Encashment Certificate"
|
||||
model="currency.exchange"
|
||||
report_type="qweb-pdf"
|
||||
file="hotel.report_currency_exchange"
|
||||
name="hotel.report_currency_exchange"
|
||||
menu="False" />
|
||||
|
||||
</odoo>
|
||||
@@ -1,89 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
<record model="workflow" id="wkf_reservation">
|
||||
<field name="name">hotel.reservation.basic</field>
|
||||
<field name="osv">hotel.reservation</field>
|
||||
<field name="on_create">True</field>
|
||||
</record>
|
||||
|
||||
#----------------------------------------------
|
||||
# Activity
|
||||
#----------------------------------------------
|
||||
|
||||
<record model="workflow.activity" id="act_draft">
|
||||
<field name="wkf_id" ref="wkf_reservation"/>
|
||||
<field name="flow_start">True</field>
|
||||
<field name="name">draft</field>
|
||||
</record>
|
||||
<record model="workflow.activity" id="act_confirm">
|
||||
<field name="wkf_id" ref="wkf_reservation"/>
|
||||
<field name="name">confirm</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">confirmed_reservation()</field>
|
||||
</record>
|
||||
<record model="workflow.activity" id="act_done">
|
||||
<field name="wkf_id" ref="wkf_reservation"/>
|
||||
<field name="name">done</field>
|
||||
<field name="flow_stop">True</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">_create_folio()</field>
|
||||
</record>
|
||||
<record model="workflow.activity" id="act_checkin">
|
||||
<field name="wkf_id" ref="wkf_reservation"/>
|
||||
<field name="name">checkin</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">action_reservation_checkin()</field>
|
||||
</record>
|
||||
<record id="act_checkin" model="workflow.activity">
|
||||
<field name="wkf_id" ref="wkf_reservation"/>
|
||||
<field name="name">checkin</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">action_reservation_checkin()</field>
|
||||
</record>
|
||||
<record model="workflow.activity" id="act_cancelled">
|
||||
<field name="wkf_id" ref="wkf_reservation"/>
|
||||
<field name="name">cancelled</field>
|
||||
<field name="flow_stop">True</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">action_cancel()</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Transition
|
||||
-->
|
||||
|
||||
<record model="workflow.transition" id="t1">
|
||||
<field name="act_from" ref="act_draft" />
|
||||
<field name="act_to" ref="act_confirm" />
|
||||
<field name="signal">confirm</field>
|
||||
</record>
|
||||
<record model="workflow.transition" id="t2">
|
||||
<field name="act_from" ref="act_confirm" />
|
||||
<field name="act_to" ref="act_done" />
|
||||
<field name="signal">done</field>
|
||||
</record>
|
||||
<record model="workflow.transition" id="t2">
|
||||
<field name="act_from" ref="act_checkin" />
|
||||
<field name="act_from" ref="act_confirm" />
|
||||
<field name="act_to" ref="act_done" />
|
||||
<field name="signal">done</field>
|
||||
</record>
|
||||
<record model="workflow.transition" id="trans_reservation_confirm_to_checkin">
|
||||
<field name="act_from" ref="act_confirm"/>
|
||||
<field name="act_to" ref="act_checkin"/>
|
||||
<field name="signal">%(launch_checkin_wizard)d</field>
|
||||
</record>
|
||||
<record model="workflow.transition" id="hotel_reservation.t2">
|
||||
<field name="act_from" ref="act_checkin" />
|
||||
<field name="act_from" ref="act_confirm" />
|
||||
<field name="act_to" ref="act_done" />
|
||||
<field name="signal">done</field>
|
||||
</record>
|
||||
<record id="trans_reservation_confirm_to_checkin" model="workflow.transition">
|
||||
<field name="act_from" ref="act_confirm"/>
|
||||
<field name="act_to" ref="act_checkin"/>
|
||||
<field name="signal">%(launch_checkin_wizard)d</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -1,68 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- Form view of hotel room type -->
|
||||
<record model="ir.ui.view" id="view_hotel_room_type_form">
|
||||
<field name="name">hotel.room_type.form</field>
|
||||
<field name="model">hotel.room.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Hotel Room Type">
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="toggle_active" type="object"
|
||||
class="oe_stat_button" icon="fa-archive">
|
||||
<field name="active" widget="boolean_button"
|
||||
options='{"terminology": "archive"}'/>
|
||||
</button>
|
||||
</div>
|
||||
<group colspan="4">
|
||||
<group>
|
||||
<field name="name" />
|
||||
<field name="code_type" />
|
||||
<field name="list_price" widget='monetary' options="{'currency_field': 'currency_id', 'field_digits': True}"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="class_id" />
|
||||
<field name="total_rooms_count"/>
|
||||
</group>
|
||||
</group>
|
||||
<group colspan="2">
|
||||
<group>
|
||||
<field name="room_ids" widget="many2many"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Tree view of hotel room type -->
|
||||
<record model="ir.ui.view" id="view_hotel_room_type_tree">
|
||||
<field name="name">hotel.room_type.tree</field>
|
||||
<field name="model">hotel.room.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string=" Hotel Room Type">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name" />
|
||||
<field name="code_type"/>
|
||||
<field name="list_price"/>
|
||||
<field name="room_ids"/>
|
||||
<field name="total_rooms_count"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Action for hotel room type -->
|
||||
<record model="ir.actions.act_window" id="open_hotel_room_type_form_tree">
|
||||
<field name="name">Room Type</field>
|
||||
<field name="res_model">hotel.room.type</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<menuitem id="menu_hotel_room" name="Room"
|
||||
parent="hotel.hotel_configuration_menu" sequence="2" />
|
||||
<menuitem name="Room Types" id="menu_open_hotel_room_type_form_tree"
|
||||
action="open_hotel_room_type_form_tree" sequence="6"
|
||||
parent="hotel.menu_hotel_room" />
|
||||
|
||||
</odoo>
|
||||
@@ -1,38 +1,34 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- FORM Virtual Room -->
|
||||
<record id="room_type_view_form" model="ir.ui.view">
|
||||
<field name="name">room.type.view.form</field>
|
||||
<!-- Form view of hotel room type -->
|
||||
<record model="ir.ui.view" id="view_hotel_room_type_form">
|
||||
<field name="name">hotel.room_type.form</field>
|
||||
<field name="model">hotel.room.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Virtual Room">
|
||||
<form string="Hotel Room Type">
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="toggle_active" type="object"
|
||||
class="oe_stat_button" icon="fa-archive">
|
||||
<field name="active" widget="boolean_button"
|
||||
options='{"terminology": "archive"}'/>
|
||||
</button>
|
||||
</div>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="toggle_active" type="object"
|
||||
class="oe_stat_button" icon="fa-archive">
|
||||
<field name="active" widget="boolean_button"
|
||||
options='{"terminology": "archive"}'/>
|
||||
</button>
|
||||
</div>
|
||||
<group colspan="4">
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="virtual_code"/>
|
||||
<field name="list_price"/>
|
||||
</group>
|
||||
<group>
|
||||
<group>
|
||||
<field name="name" />
|
||||
<field name="code_type" />
|
||||
<field name="list_price" widget='monetary' options="{'currency_field': 'currency_id', 'field_digits': True}"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="class_id" />
|
||||
<field name="total_rooms_count"/>
|
||||
<field name="max_real_rooms"/>
|
||||
<field name="room_type_ids" widget="many2many_tags" options="{'no_create': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<group colspan="4">
|
||||
<group colspan="2">
|
||||
<group>
|
||||
<field name="room_ids"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="service_ids"/>
|
||||
<field name="room_ids" widget="many2many"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
@@ -40,33 +36,33 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- TREE Virtual Room -->
|
||||
<record id="room_type_view_tree" model="ir.ui.view">
|
||||
<field name="name">room.type.view.tree</field>
|
||||
<!-- Tree view of hotel room type -->
|
||||
<record model="ir.ui.view" id="view_hotel_room_type_tree">
|
||||
<field name="name">hotel.room_type.tree</field>
|
||||
<field name="model">hotel.room.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Virtual Rooms">
|
||||
<field name="name"/>
|
||||
<field name="virtual_code"/>
|
||||
<tree string=" Hotel Room Type">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name" />
|
||||
<field name="code_type"/>
|
||||
<field name="list_price"/>
|
||||
<field name="room_ids"/>
|
||||
<field name="room_type_ids"/>
|
||||
<field name="total_rooms_count"/>
|
||||
<field name="max_real_rooms"/>
|
||||
<field name="service_ids"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="room_type_action_form">
|
||||
<field name="name">Virtual Rooms</field>
|
||||
<!-- Action for hotel room type -->
|
||||
<record model="ir.actions.act_window" id="open_hotel_room_type_form_tree">
|
||||
<field name="name">Room Type</field>
|
||||
<field name="res_model">hotel.room.type</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
</record>
|
||||
<menuitem id="menu_hotel_room" name="Room"
|
||||
parent="hotel.hotel_configuration_menu" sequence="2" />
|
||||
<menuitem name="Room Types" id="menu_open_hotel_room_type_form_tree"
|
||||
action="open_hotel_room_type_form_tree" sequence="6"
|
||||
parent="hotel.menu_hotel_room" />
|
||||
|
||||
<!-- MENUS -->
|
||||
<menuitem name="Virtual rooms" id="room_type_menu"
|
||||
action="room_type_action_form" sequence="40"
|
||||
parent="hotel.menu_hotel_room"/>
|
||||
|
||||
</odoo>
|
||||
</odoo>
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="act_checkin" model="workflow.activity">
|
||||
<field name="wkf_id" ref="hotel_reservation.wkf_reservation"/>
|
||||
<field name="name">checkin</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">action_reservation_checkin()</field>
|
||||
</record>
|
||||
<record model="workflow.transition" id="hotel_reservation.t2">
|
||||
<field name="act_from" ref="act_checkin" />
|
||||
<field name="act_from" ref="hotel_reservation.act_confirm" />
|
||||
<field name="act_to" ref="hotel_reservation.act_done" />
|
||||
<field name="signal">done</field>
|
||||
</record>
|
||||
<record id="trans_reservation_confirm_to_checkin" model="workflow.transition">
|
||||
<field name="act_from" ref="hotel_reservation.act_confirm"/>
|
||||
<field name="act_to" ref="act_checkin"/>
|
||||
<field name="signal">%(launch_checkin_wizard)d</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -1,167 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!--Template for hotel folio -->
|
||||
<template id="report_hotel_folio">
|
||||
<t t-call="report.html_container">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<t t-call="report.external_layout">
|
||||
<div class="page">
|
||||
<br/><br/>
|
||||
<div class="row">
|
||||
<h2>
|
||||
<span><center>Total Collection</center></span>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="row mt32 mb32">
|
||||
<div class="text-center">
|
||||
<strong>From:</strong>
|
||||
<span t-esc="formatLang(data['form']['date_start'],date=True)"/>
|
||||
<strong>To:</strong>
|
||||
<span t-esc="formatLang(data['form']['date_end'],date=True)"/>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-condensed">
|
||||
<tr>
|
||||
<td><strong>Folio No.</strong></td>
|
||||
<td><strong>Customer Name</strong></td>
|
||||
<td><strong>CheckIN</strong></td>
|
||||
<td><strong>CheckOut</strong></td>
|
||||
<td><strong>Total</strong></td>
|
||||
</tr>
|
||||
<tr t-foreach="get_data(data['form']['date_start'],data['form']['date_end'])" t-as="info">
|
||||
<td><span t-field="info.name"/></td>
|
||||
<td><span t-field="info.partner_id.name"/></td>
|
||||
<td><span t-field="info.checkin_date"/></td>
|
||||
<td><span t-field="info.checkout_date"/></td>
|
||||
<td><span t-esc="formatLang(get_total(info.amount_total))"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><strong>Net Total:</strong></td>
|
||||
<td t-esc="formatLang(get_Total())"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
|
||||
<!--Template for currency exchange-->
|
||||
<template id="report_currency_exchange">
|
||||
<t t-call="report.html_container">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<t t-call="report.external_layout">
|
||||
<div class="page">
|
||||
<div class="row">
|
||||
<h1>
|
||||
<u><center>Hotel <span t-field="o.hotel_id.name" ></span></center></u>
|
||||
</h1><br /><br /><br />
|
||||
<h3>
|
||||
<span><center>Encashment Certificate</center></span>
|
||||
</h3>
|
||||
</div>
|
||||
<br />
|
||||
<table width="100%" >
|
||||
<tr>
|
||||
<td width="50%" style="text-align:left;"><strong>Serial No. :</strong>
|
||||
<span t-field="o.name"/></td>
|
||||
<td width="50%" style="text-align:right;"><strong>Date :</strong>
|
||||
<span t-field="o.today_date"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50%" style="text-align:left;"><strong>Room No. :</strong>
|
||||
<span t-field="o.room_number"/></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br /><br />
|
||||
<p>
|
||||
We hereby certify that we have purchased today foreign currency from Mr./Mrs.  <strong><span t-field="o.guest_name"/></strong> 
|
||||
in <strong><span t-field="o.input_curr.name"/></strong> currency and paid net amount in <strong><span t-field="o.out_curr.name"/></strong> currency .
|
||||
Details are given below:
|
||||
</p>
|
||||
<br /><br />
|
||||
<p>
|
||||
A. Details of Foreign Currency Notes Purchased
|
||||
</p>
|
||||
<table class="table table-bordered" width="100%" >
|
||||
<tr>
|
||||
<th width="25%" style="text-align:center;"><strong>Currency purchased
|
||||
(indicating cash)</strong>
|
||||
</th>
|
||||
<th width="25%" style="text-align:center;"><strong>Amount</strong></th>
|
||||
<th width="25%" style="text-align:center;"><strong>Rate
|
||||
(per unit)</strong></th>
|
||||
<th width="25%" style="text-align:center;"><strong>Equivalent Amount</strong></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align:center;"><span t-field="o.type"/></td>
|
||||
<td style="text-align:center;"><span t-field="o.in_amount"/> <span t-field="o.input_curr.name"/></td>
|
||||
<td style="text-align:center;"><span t-field="o.rate"/></td>
|
||||
<td style="text-align:center;"><span t-field="o.out_amount"/> <span t-field="o.out_curr.name"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td width="80%"></td>
|
||||
<td width="10%" style="text-align:left;"><strong>Subtotal :</strong></td>
|
||||
<td width="10%" style="text-align:right;"><span t-field="o.out_amount"/> <span t-field="o.out_curr.name"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="80%"> </td><td width="10%"> </td><td width="10%"> </td></tr>
|
||||
<tr>
|
||||
<td width="80%"></td>
|
||||
<td width="10%" style="text-align:left;"><strong style = "margin-left:40px">Tax :</strong></td>
|
||||
<td width="10%" style="text-align:right;" ><span t-field="o.tax"/></td>
|
||||
</tr>
|
||||
<tr><td width="80%"> </td><td width="10%"> </td><td width="10%"> </td></tr>
|
||||
<tr>
|
||||
<td width="80%"></td>
|
||||
<td width="10%" style="text-align:left;"><strong style = "margin-left:28px">Total :</strong></td>
|
||||
<td width="10%" style="text-align:right;"><span t-field="o.total"/> <span t-field="o.out_curr.name"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br /><br /><br /><br /><br />
|
||||
<br />
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td width="50%" style="text-align:left;"><strong>.............................................</strong></td>
|
||||
<td width="50%" style="text-align:right;"><strong>.............................................</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50%" style="text-align:left;"><strong>Guest signature</strong></td>
|
||||
<td width="50%" style="text-align:right;"><strong>Manager signature</strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br /><br />
|
||||
<div class="row" align = "left">
|
||||
<span><b>Kind Regards</b></span>,<br />
|
||||
<b>Reservations Team </b><br />
|
||||
[<span t-field="o.hotel_id.name" ></span>]<br />
|
||||
<span t-field="o.hotel_id.partner_id.street"></span><br />
|
||||
<span t-field="o.hotel_id.partner_id.city"></span>,<br />
|
||||
<span t-field="o.hotel_id.partner_id.country_id.name"></span><br />
|
||||
<br />
|
||||
<span t-field="o.hotel_id.partner_id.website"></span> <br />
|
||||
</div>
|
||||
<br /><br />
|
||||
<p align = "center">
|
||||
* Valid for three months from the date of purchase of foreign currency *
|
||||
</p>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
@@ -21,7 +21,6 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
from . import hotel_wizard
|
||||
from . import folio_make_invoice_advance
|
||||
from . import checkinwizard
|
||||
from . import massive_changes
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
# Copyright 2017 Alexandre Díaz
|
||||
# Copyright 2017 Dario Lodeiros
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
from openerp import models, fields, api
|
||||
|
||||
|
||||
class FolioReportWizard(models.TransientModel):
|
||||
_name = 'folio.report.wizard'
|
||||
_rec_name = 'date_start'
|
||||
|
||||
date_start = fields.Datetime('Start Date')
|
||||
date_end = fields.Datetime('End Date')
|
||||
|
||||
@api.multi
|
||||
def print_report(self):
|
||||
data = {
|
||||
'ids': self.ids,
|
||||
'model': 'hotel.folio',
|
||||
'form': self.read(['date_start', 'date_end'])[0]
|
||||
}
|
||||
return self.env.ref('hotel.report_hotel_folio').report_action(self, data=data)
|
||||