diff --git a/hotel/Doc/ChangeLog.txt b/hotel/Doc/ChangeLog.txt deleted file mode 100644 index 9e2d7b790..000000000 --- a/hotel/Doc/ChangeLog.txt +++ /dev/null @@ -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. diff --git a/hotel/__init__.py b/hotel/__init__.py index 4e39d461f..77df4efd9 100644 --- a/hotel/__init__.py +++ b/hotel/__init__.py @@ -4,5 +4,4 @@ from . import models from . import wizard -from . import report from . import date_utils diff --git a/hotel/__manifest__.py b/hotel/__manifest__.py index b1bcb0e22..23eda4660 100644 --- a/hotel/__manifest__.py +++ b/hotel/__manifest__.py @@ -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 } diff --git a/hotel/data/cron_jobs.xml b/hotel/data/cron_jobs.xml index 894fac0a9..1d8d701cc 100644 --- a/hotel/data/cron_jobs.xml +++ b/hotel/data/cron_jobs.xml @@ -3,20 +3,7 @@ - - Daily Plan - - - 1 - days - -1 - 0 - - - model.daily_plan() - - - + Inform Guest About Reservation Before 24 Hours 1 diff --git a/hotel/data/hotel-color.png b/hotel/data/hotel-color.png deleted file mode 100644 index 0e3644a50..000000000 Binary files a/hotel/data/hotel-color.png and /dev/null differ diff --git a/hotel/data/hotel-grey.png b/hotel/data/hotel-grey.png deleted file mode 100644 index 110e14614..000000000 Binary files a/hotel/data/hotel-grey.png and /dev/null differ diff --git a/hotel/data/hotel_data.xml b/hotel/data/hotel_data.xml index 00bd0816e..7861a5487 100644 --- a/hotel/data/hotel_data.xml +++ b/hotel/data/hotel_data.xml @@ -116,6 +116,7 @@ 25.00 3 - + diff --git a/hotel/views/hotel_sequence.xml b/hotel/data/hotel_sequence.xml similarity index 100% rename from hotel/views/hotel_sequence.xml rename to hotel/data/hotel_sequence.xml diff --git a/hotel/data/menus.xml b/hotel/data/menus.xml index 2274e43ca..bdf51467a 100644 --- a/hotel/data/menus.xml +++ b/hotel/data/menus.xml @@ -13,13 +13,15 @@ sequence="15" parent="hotel_management_menu" groups="hotel.group_hotel_user"/> - + + groups="hotel.group_hotel_manager" /> - + diff --git a/hotel/data/records.xml b/hotel/data/records.xml index b6ab9cbe3..0abd994e9 100644 --- a/hotel/data/records.xml +++ b/hotel/data/records.xml @@ -6,11 +6,11 @@ - - diff --git a/hotel/models/__init__.py b/hotel/models/__init__.py index 5cab9a32f..245da9802 100644 --- a/hotel/models/__init__.py +++ b/hotel/models/__init__.py @@ -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 diff --git a/hotel/models/currency_exchange.py b/hotel/models/currency_exchange.py deleted file mode 100644 index a56341d8e..000000000 --- a/hotel/models/currency_exchange.py +++ /dev/null @@ -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 diff --git a/hotel/models/cardex.py b/hotel/models/hotel_checkin_partner.py similarity index 100% rename from hotel/models/cardex.py rename to hotel/models/hotel_checkin_partner.py diff --git a/hotel/models/hotel_dashboard.py b/hotel/models/hotel_dashboard.py deleted file mode 100644 index 0208809ae..000000000 --- a/hotel/models/hotel_dashboard.py +++ /dev/null @@ -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 diff --git a/hotel/models/hotel_reservation.py b/hotel/models/hotel_reservation.py index f1974b24a..1952791f5 100644 --- a/hotel/models/hotel_reservation.py +++ b/hotel/models/hotel_reservation.py @@ -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 }) diff --git a/hotel/models/room_closure_reason.py b/hotel/models/hotel_room_closure_reason.py similarity index 100% rename from hotel/models/room_closure_reason.py rename to hotel/models/hotel_room_closure_reason.py diff --git a/hotel/models/inherit_account_invoice.py b/hotel/models/inherited_account_invoice.py similarity index 100% rename from hotel/models/inherit_account_invoice.py rename to hotel/models/inherited_account_invoice.py diff --git a/hotel/models/inherit_account_payment.py b/hotel/models/inherited_account_payment.py similarity index 100% rename from hotel/models/inherit_account_payment.py rename to hotel/models/inherited_account_payment.py diff --git a/hotel/models/inherit_payment_return.py b/hotel/models/inherited_payment_return.py similarity index 100% rename from hotel/models/inherit_payment_return.py rename to hotel/models/inherited_payment_return.py diff --git a/hotel/models/inherit_product_category.py b/hotel/models/inherited_product_category.py similarity index 100% rename from hotel/models/inherit_product_category.py rename to hotel/models/inherited_product_category.py diff --git a/hotel/models/inherit_product_pricelist.py b/hotel/models/inherited_product_pricelist.py similarity index 100% rename from hotel/models/inherit_product_pricelist.py rename to hotel/models/inherited_product_pricelist.py diff --git a/hotel/models/inherit_product_template.py b/hotel/models/inherited_product_template.py similarity index 100% rename from hotel/models/inherit_product_template.py rename to hotel/models/inherited_product_template.py diff --git a/hotel/models/inherit_res_company.py b/hotel/models/inherited_res_company.py similarity index 100% rename from hotel/models/inherit_res_company.py rename to hotel/models/inherited_res_company.py diff --git a/hotel/models/inherit_res_partner.py b/hotel/models/inherited_res_partner.py similarity index 100% rename from hotel/models/inherit_res_partner.py rename to hotel/models/inherited_res_partner.py diff --git a/hotel/report/__init__.py b/hotel/report/__init__.py deleted file mode 100644 index a89dbe55e..000000000 --- a/hotel/report/__init__.py +++ /dev/null @@ -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 diff --git a/hotel/report/hotel_report.py b/hotel/report/hotel_report.py deleted file mode 100644 index ae6ffe019..000000000 --- a/hotel/report/hotel_report.py +++ /dev/null @@ -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 diff --git a/hotel/report/hotel_report.xml b/hotel/report/hotel_report.xml deleted file mode 100644 index f6e3916f7..000000000 --- a/hotel/report/hotel_report.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - diff --git a/hotel/report/report_parte_viajero.xml b/hotel/report/report_parte_viajero.xml deleted file mode 100644 index 13758ad5f..000000000 --- a/hotel/report/report_parte_viajero.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - qweb-pdf - 1 - 1 - 201 - - - diff --git a/hotel/security/.~lock.ir.model.access.csv# b/hotel/security/.~lock.ir.model.access.csv# deleted file mode 100644 index 26689e352..000000000 --- a/hotel/security/.~lock.ir.model.access.csv# +++ /dev/null @@ -1 +0,0 @@ -,slimbook,slimbook-PRO,26.07.2018 11:51,file:///home/slimbook/.config/libreoffice/4; \ No newline at end of file diff --git a/hotel/static/description/bed.png b/hotel/static/description/bed.png deleted file mode 100644 index a1f2e0d48..000000000 Binary files a/hotel/static/description/bed.png and /dev/null differ diff --git a/hotel/static/description/book.png b/hotel/static/description/book.png deleted file mode 100644 index 985d40bca..000000000 Binary files a/hotel/static/description/book.png and /dev/null differ diff --git a/hotel/static/description/booking.png b/hotel/static/description/booking.png deleted file mode 100644 index bea6c674c..000000000 Binary files a/hotel/static/description/booking.png and /dev/null differ diff --git a/hotel/static/description/car.png b/hotel/static/description/car.png deleted file mode 100644 index 6c4a1454a..000000000 Binary files a/hotel/static/description/car.png and /dev/null differ diff --git a/hotel/static/description/checkin.png b/hotel/static/description/checkin.png deleted file mode 100644 index 3cc72c398..000000000 Binary files a/hotel/static/description/checkin.png and /dev/null differ diff --git a/hotel/static/description/currency.png b/hotel/static/description/currency.png deleted file mode 100644 index b91654c28..000000000 Binary files a/hotel/static/description/currency.png and /dev/null differ diff --git a/hotel/static/description/fast-food-icons.png b/hotel/static/description/fast-food-icons.png deleted file mode 100644 index e7e148596..000000000 Binary files a/hotel/static/description/fast-food-icons.png and /dev/null differ diff --git a/hotel/static/description/gym.png b/hotel/static/description/gym.png deleted file mode 100644 index a038cd5bf..000000000 Binary files a/hotel/static/description/gym.png and /dev/null differ diff --git a/hotel/static/description/head.png b/hotel/static/description/head.png deleted file mode 100644 index 64aa015bf..000000000 Binary files a/hotel/static/description/head.png and /dev/null differ diff --git a/hotel/static/description/hotel.png b/hotel/static/description/hotel.png deleted file mode 100644 index a31dae49e..000000000 Binary files a/hotel/static/description/hotel.png and /dev/null differ diff --git a/hotel/static/description/hotel1.png b/hotel/static/description/hotel1.png deleted file mode 100644 index e00355335..000000000 Binary files a/hotel/static/description/hotel1.png and /dev/null differ diff --git a/hotel/static/description/hotel2.png b/hotel/static/description/hotel2.png deleted file mode 100644 index 5b43befcc..000000000 Binary files a/hotel/static/description/hotel2.png and /dev/null differ diff --git a/hotel/static/description/icon-book.png b/hotel/static/description/icon-book.png deleted file mode 100644 index 22d8cc291..000000000 Binary files a/hotel/static/description/icon-book.png and /dev/null differ diff --git a/hotel/static/description/inc1.png b/hotel/static/description/inc1.png deleted file mode 100644 index 1104390f1..000000000 Binary files a/hotel/static/description/inc1.png and /dev/null differ diff --git a/hotel/static/description/inc2.png b/hotel/static/description/inc2.png deleted file mode 100644 index 4ee8fa639..000000000 Binary files a/hotel/static/description/inc2.png and /dev/null differ diff --git a/hotel/static/description/inc3.png b/hotel/static/description/inc3.png deleted file mode 100644 index 688e469ba..000000000 Binary files a/hotel/static/description/inc3.png and /dev/null differ diff --git a/hotel/static/description/inc4.png b/hotel/static/description/inc4.png deleted file mode 100644 index 2eb5dc82f..000000000 Binary files a/hotel/static/description/inc4.png and /dev/null differ diff --git a/hotel/static/description/inc5.png b/hotel/static/description/inc5.png deleted file mode 100644 index bb91959e6..000000000 Binary files a/hotel/static/description/inc5.png and /dev/null differ diff --git a/hotel/static/description/inc6.png b/hotel/static/description/inc6.png deleted file mode 100644 index 88b07252e..000000000 Binary files a/hotel/static/description/inc6.png and /dev/null differ diff --git a/hotel/static/description/inc7.png b/hotel/static/description/inc7.png deleted file mode 100644 index 340188a31..000000000 Binary files a/hotel/static/description/inc7.png and /dev/null differ diff --git a/hotel/static/description/inc8.png b/hotel/static/description/inc8.png deleted file mode 100644 index d38788552..000000000 Binary files a/hotel/static/description/inc8.png and /dev/null differ diff --git a/hotel/static/description/inc9.png b/hotel/static/description/inc9.png deleted file mode 100644 index 2c788af93..000000000 Binary files a/hotel/static/description/inc9.png and /dev/null differ diff --git a/hotel/static/description/index.html b/hotel/static/description/index.html deleted file mode 100644 index 8a850002e..000000000 --- a/hotel/static/description/index.html +++ /dev/null @@ -1,56 +0,0 @@ -
-
-
-

HOTEL MANAGEMENT SYSTEM

-
-
-
-
-
-
-

HOTEL BOOKING

-

Book your room.

- - - - - -
-
-

ALL INCLUSIVE

-

Facilities provided

- - - - - -
-
-

AMENITIES

-

Extra class hotel service

- - - - -
-
-

RESTURANTS

-

Bon Appetite !

- - - -
-
-

Currency Exchange

-

Exchange currency on the go

- - -
-
-

REPORTS

-

Manage and Analyze

- - -
-
-
diff --git a/hotel/static/description/key.png b/hotel/static/description/key.png deleted file mode 100644 index b954b8c4d..000000000 Binary files a/hotel/static/description/key.png and /dev/null differ diff --git a/hotel/static/description/menu.png b/hotel/static/description/menu.png deleted file mode 100644 index 0049bb373..000000000 Binary files a/hotel/static/description/menu.png and /dev/null differ diff --git a/hotel/static/description/menu_waitor.png b/hotel/static/description/menu_waitor.png deleted file mode 100644 index 4e53dc77a..000000000 Binary files a/hotel/static/description/menu_waitor.png and /dev/null differ diff --git a/hotel/static/description/money.png b/hotel/static/description/money.png deleted file mode 100644 index f763665a4..000000000 Binary files a/hotel/static/description/money.png and /dev/null differ diff --git a/hotel/static/description/opt.jpg b/hotel/static/description/opt.jpg deleted file mode 100644 index cc596767d..000000000 Binary files a/hotel/static/description/opt.jpg and /dev/null differ diff --git a/hotel/static/description/plate.png b/hotel/static/description/plate.png deleted file mode 100644 index 9460ac611..000000000 Binary files a/hotel/static/description/plate.png and /dev/null differ diff --git a/hotel/static/description/pool_icon.png b/hotel/static/description/pool_icon.png deleted file mode 100644 index aa3bf92c0..000000000 Binary files a/hotel/static/description/pool_icon.png and /dev/null differ diff --git a/hotel/static/description/rent.jpg b/hotel/static/description/rent.jpg deleted file mode 100644 index a2ef21570..000000000 Binary files a/hotel/static/description/rent.jpg and /dev/null differ diff --git a/hotel/static/description/report.png b/hotel/static/description/report.png deleted file mode 100644 index 622ff848d..000000000 Binary files a/hotel/static/description/report.png and /dev/null differ diff --git a/hotel/static/description/report1.png b/hotel/static/description/report1.png deleted file mode 100644 index 16752416f..000000000 Binary files a/hotel/static/description/report1.png and /dev/null differ diff --git a/hotel/static/description/revenue.png b/hotel/static/description/revenue.png deleted file mode 100644 index bcd9b36dc..000000000 Binary files a/hotel/static/description/revenue.png and /dev/null differ diff --git a/hotel/static/description/room.png b/hotel/static/description/room.png deleted file mode 100644 index af9395687..000000000 Binary files a/hotel/static/description/room.png and /dev/null differ diff --git a/hotel/static/description/star_icon.png b/hotel/static/description/star_icon.png deleted file mode 100644 index 1ebe93ec9..000000000 Binary files a/hotel/static/description/star_icon.png and /dev/null differ diff --git a/hotel/static/description/swim.png b/hotel/static/description/swim.png deleted file mode 100644 index b00d78b01..000000000 Binary files a/hotel/static/description/swim.png and /dev/null differ diff --git a/hotel/static/description/travel.png b/hotel/static/description/travel.png deleted file mode 100644 index bd1f6ad43..000000000 Binary files a/hotel/static/description/travel.png and /dev/null differ diff --git a/hotel/static/description/vodna.png b/hotel/static/description/vodna.png deleted file mode 100644 index ca556aaf2..000000000 Binary files a/hotel/static/description/vodna.png and /dev/null differ diff --git a/hotel/static/description/waiter.png b/hotel/static/description/waiter.png deleted file mode 100644 index 86940b889..000000000 Binary files a/hotel/static/description/waiter.png and /dev/null differ diff --git a/hotel/static/src/js/open_reservation_wizard_listview_button.js b/hotel/static/src/js/open_reservation_wizard_listview_button.js deleted file mode 100644 index 974594a59..000000000 --- a/hotel/static/src/js/open_reservation_wizard_listview_button.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2018 Alexandre Díaz -// 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(""); - this.$buttons.find('.oe_open_reservation_wizard').on('click', function(){ - self.do_action('hotel_calendar.open_wizard_reservations'); - }); - } - } -}); - -return ListView; - -}); diff --git a/hotel/static/src/js/views/list/list_controller.js b/hotel/static/src/js/views/list/list_controller.js new file mode 100644 index 000000000..e45f554cd --- /dev/null +++ b/hotel/static/src/js/views/list/list_controller.js @@ -0,0 +1,28 @@ +odoo.define('hotel.ListController', function(require) { +'use strict'; +/* + * Hotel + * GNU Public License + * Alexandre Díaz + */ + +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(""); + this.$buttons.find('.oe_open_reservation_wizard').on('click', function(){ + self.do_action('hotel.open_wizard_reservations'); + }); + } + } +}); + +}); diff --git a/hotel/views/currency_exchange.xml b/hotel/views/currency_exchange.xml deleted file mode 100644 index 1efd9fba3..000000000 --- a/hotel/views/currency_exchange.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - currency.exchange.form - currency.exchange - -
-
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

- -

- -
-
-
-
- - - - currency.exchange.tree - currency.exchange - - - - - - - - - - - - - Currency Exchange - currency.exchange - form - tree,form - - -
diff --git a/hotel/views/general.xml b/hotel/views/general.xml index a02d866be..8431bcca3 100644 --- a/hotel/views/general.xml +++ b/hotel/views/general.xml @@ -4,7 +4,7 @@ diff --git a/hotel/views/hotel_board_service.xml b/hotel/views/hotel_board_service_views.xml similarity index 100% rename from hotel/views/hotel_board_service.xml rename to hotel/views/hotel_board_service_views.xml diff --git a/hotel/views/cardex.xml b/hotel/views/hotel_checkin_partner_views.xml similarity index 100% rename from hotel/views/cardex.xml rename to hotel/views/hotel_checkin_partner_views.xml diff --git a/hotel/views/hotel_dashboard.xml b/hotel/views/hotel_dashboard.xml deleted file mode 100644 index f214e9310..000000000 --- a/hotel/views/hotel_dashboard.xml +++ /dev/null @@ -1,210 +0,0 @@ - - - - - Folios - hotel.dashboard - - - - Folios - hotel.dashboard - - - - Folios - hotel.dashboard - - - - Folios - hotel.dashboard - - - - hotel.dashboard.view - hotel.dashboard - - - - - - - Hotel Dashboard - hotel.dashboard - ir.actions.act_window - form - {} - kanban - - - - - - - - - Chekins Dashboard - sales - bar - 1 - - - On Board - sales - line - 1 - - - - diff --git a/hotel/views/hotel_floor.xml b/hotel/views/hotel_floor_views.xml similarity index 100% rename from hotel/views/hotel_floor.xml rename to hotel/views/hotel_floor_views.xml diff --git a/hotel/views/hotel_folio.xml b/hotel/views/hotel_folio_views.xml similarity index 100% rename from hotel/views/hotel_folio.xml rename to hotel/views/hotel_folio_views.xml diff --git a/hotel/views/hotel_report.xml b/hotel/views/hotel_report.xml deleted file mode 100644 index 1512c356a..000000000 --- a/hotel/views/hotel_report.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - diff --git a/hotel/views/hotel_reservation.xml b/hotel/views/hotel_reservation_views.xml similarity index 100% rename from hotel/views/hotel_reservation.xml rename to hotel/views/hotel_reservation_views.xml diff --git a/hotel/views/hotel_reservation_workflow.xml b/hotel/views/hotel_reservation_workflow.xml deleted file mode 100644 index 937c66de7..000000000 --- a/hotel/views/hotel_reservation_workflow.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - hotel.reservation.basic - hotel.reservation - True - - - #---------------------------------------------- - # Activity - #---------------------------------------------- - - - - True - draft - - - - confirm - function - confirmed_reservation() - - - - done - True - function - _create_folio() - - - - checkin - function - action_reservation_checkin() - - - - checkin - function - action_reservation_checkin() - - - - cancelled - True - function - action_cancel() - - - - - - - - confirm - - - - - done - - - - - - done - - - - - %(launch_checkin_wizard)d - - - - - - done - - - - - %(launch_checkin_wizard)d - - - diff --git a/hotel/views/hotel_room_amenities_type.xml b/hotel/views/hotel_room_amenities_type_views.xml similarity index 100% rename from hotel/views/hotel_room_amenities_type.xml rename to hotel/views/hotel_room_amenities_type_views.xml diff --git a/hotel/views/hotel_room_amenities.xml b/hotel/views/hotel_room_amenities_views.xml similarity index 100% rename from hotel/views/hotel_room_amenities.xml rename to hotel/views/hotel_room_amenities_views.xml diff --git a/hotel/views/room_closure_reason.xml b/hotel/views/hotel_room_closure_reason_views.xml similarity index 100% rename from hotel/views/room_closure_reason.xml rename to hotel/views/hotel_room_closure_reason_views.xml diff --git a/hotel/views/hotel_room_type.xml b/hotel/views/hotel_room_type.xml deleted file mode 100644 index fdaeb9b8d..000000000 --- a/hotel/views/hotel_room_type.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - hotel.room_type.form - hotel.room.type - -
- -
- -
- - - - - - - - - - - - - - - - -
-
-
-
- - - - hotel.room_type.tree - hotel.room.type - - - - - - - - - - - - - - - Room Type - hotel.room.type - form - tree,form - - - - -
diff --git a/hotel/views/hotel_room_type_availability.xml b/hotel/views/hotel_room_type_availability_views.xml similarity index 100% rename from hotel/views/hotel_room_type_availability.xml rename to hotel/views/hotel_room_type_availability_views.xml diff --git a/hotel/views/hotel_room_type_class.xml b/hotel/views/hotel_room_type_class_views.xml similarity index 100% rename from hotel/views/hotel_room_type_class.xml rename to hotel/views/hotel_room_type_class_views.xml diff --git a/hotel/views/hotel_room_type_views.xml b/hotel/views/hotel_room_type_views.xml index 7177a4f6e..fdaeb9b8d 100644 --- a/hotel/views/hotel_room_type_views.xml +++ b/hotel/views/hotel_room_type_views.xml @@ -1,38 +1,34 @@ - + - - - room.type.view.form + + + hotel.room_type.form hotel.room.type -
+ -
- -
+
+ +
- - - - - - + + + + + + + - - + - - + - - - - +
@@ -40,33 +36,33 @@ - - - room.type.view.tree + + + hotel.room_type.tree hotel.room.type - - - + + + + + - - - - - Virtual Rooms + + + Room Type hotel.room.type form tree,form - + + + - - - - + diff --git a/hotel/views/hotel_room.xml b/hotel/views/hotel_room_views.xml similarity index 100% rename from hotel/views/hotel_room.xml rename to hotel/views/hotel_room_views.xml diff --git a/hotel/views/hotel_service_line.xml b/hotel/views/hotel_service_line_views.xml similarity index 100% rename from hotel/views/hotel_service_line.xml rename to hotel/views/hotel_service_line_views.xml diff --git a/hotel/views/hotel_service_type.xml b/hotel/views/hotel_service_type_views.xml similarity index 100% rename from hotel/views/hotel_service_type.xml rename to hotel/views/hotel_service_type_views.xml diff --git a/hotel/views/hotel_service.xml b/hotel/views/hotel_service_views.xml similarity index 100% rename from hotel/views/hotel_service.xml rename to hotel/views/hotel_service_views.xml diff --git a/hotel/views/inherit_reservation_workflow.xml b/hotel/views/inherit_reservation_workflow.xml deleted file mode 100755 index a00e64a73..000000000 --- a/hotel/views/inherit_reservation_workflow.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - checkin - function - action_reservation_checkin() - - - - - - done - - - - - %(launch_checkin_wizard)d - - - diff --git a/hotel/views/inherit_account_invoice_views.xml b/hotel/views/inherited_account_invoice_views.xml similarity index 100% rename from hotel/views/inherit_account_invoice_views.xml rename to hotel/views/inherited_account_invoice_views.xml diff --git a/hotel/views/inherit_account_payment_views.xml b/hotel/views/inherited_account_payment_views.xml similarity index 100% rename from hotel/views/inherit_account_payment_views.xml rename to hotel/views/inherited_account_payment_views.xml diff --git a/hotel/views/inherit_product_template.xml b/hotel/views/inherited_product_template_views.xml similarity index 100% rename from hotel/views/inherit_product_template.xml rename to hotel/views/inherited_product_template_views.xml diff --git a/hotel/views/inherit_res_partner.xml b/hotel/views/inherited_res_partner_views.xml similarity index 100% rename from hotel/views/inherit_res_partner.xml rename to hotel/views/inherited_res_partner_views.xml diff --git a/hotel/views/report_hotel_management.xml b/hotel/views/report_hotel_management.xml deleted file mode 100644 index 5e24f6971..000000000 --- a/hotel/views/report_hotel_management.xml +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - - - - diff --git a/hotel/wizard/__init__.py b/hotel/wizard/__init__.py index 87e69afbd..9fbcd6f9e 100644 --- a/hotel/wizard/__init__.py +++ b/hotel/wizard/__init__.py @@ -21,7 +21,6 @@ # along with this program. If not, see . # ############################################################################## -from . import hotel_wizard from . import folio_make_invoice_advance from . import checkinwizard from . import massive_changes diff --git a/hotel/wizard/hotel_wizard.py b/hotel/wizard/hotel_wizard.py deleted file mode 100644 index b662e2940..000000000 --- a/hotel/wizard/hotel_wizard.py +++ /dev/null @@ -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) diff --git a/hotel/wizard/hotel_wizard.xml b/hotel/wizard/hotel_wizard.xml deleted file mode 100644 index 5d089dcb7..000000000 --- a/hotel/wizard/hotel_wizard.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - folio.report.wizard - folio.report.wizard - - - - - - -
-
- -
-
- - - - Hotel Folio Report - folio.report.wizard - form - form - new - - - - -
diff --git a/hotel_calendar/static/src/js/open_reservation_wizard_listview_button.js b/hotel_calendar/static/src/js/open_reservation_wizard_listview_button.js deleted file mode 100644 index 974594a59..000000000 --- a/hotel_calendar/static/src/js/open_reservation_wizard_listview_button.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2018 Alexandre Díaz -// 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(""); - this.$buttons.find('.oe_open_reservation_wizard').on('click', function(){ - self.do_action('hotel_calendar.open_wizard_reservations'); - }); - } - } -}); - -return ListView; - -});