mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP] Improvements
This commit is contained in:
@@ -33,7 +33,6 @@
|
||||
"report/pms_folio.xml",
|
||||
"report/pms_folio_templates.xml",
|
||||
# "templates/pms_email_template.xml",
|
||||
"views/general.xml",
|
||||
"data/menus.xml",
|
||||
"wizards/wizard_payment_folio.xml",
|
||||
"wizards/folio_make_invoice_advance_views.xml",
|
||||
@@ -81,6 +80,7 @@
|
||||
],
|
||||
"qweb": [
|
||||
"static/src/xml/pms_base_templates.xml",
|
||||
"static/src/xml/reservation_group_button_views.xml",
|
||||
],
|
||||
"post_init_hook": "post_init_hook",
|
||||
}
|
||||
|
||||
@@ -5,33 +5,48 @@
|
||||
name="PMS Management"
|
||||
sequence="8"
|
||||
web_icon="pms,static/description/icon.png"
|
||||
groups="pms.group_pms_user,pms.group_pms_call"
|
||||
/>
|
||||
<menuitem
|
||||
id="pms_configuration_menu"
|
||||
name="Configuration"
|
||||
id="menu_reservations"
|
||||
name="Reservations"
|
||||
parent="pms_management_menu"
|
||||
sequence="5"
|
||||
/>
|
||||
<menuitem
|
||||
id="pms_sales_menu"
|
||||
name="Sales"
|
||||
sequence="15"
|
||||
parent="pms_management_menu"
|
||||
/>
|
||||
<menuitem
|
||||
id="pms_contacts_menu"
|
||||
name="Contacts"
|
||||
sequence="20"
|
||||
parent="pms_management_menu"
|
||||
groups="pms.group_pms_user"
|
||||
/>
|
||||
<menuitem
|
||||
id="pms_reports_menu"
|
||||
name="Reports"
|
||||
sequence="15"
|
||||
id="revenue_management_menu"
|
||||
name="Revenue Management"
|
||||
sequence="25"
|
||||
parent="pms_management_menu"
|
||||
groups="pms.group_pms_user"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_account_finance_xls_reports"
|
||||
name="XLS Reports"
|
||||
parent="pms.pms_reports_menu"
|
||||
sequence="50"
|
||||
id="pms_rooms_menu"
|
||||
name="Rooms"
|
||||
sequence="35"
|
||||
parent="pms_management_menu"
|
||||
/>
|
||||
<menuitem
|
||||
id="configuration_others"
|
||||
id="pms_services_menu"
|
||||
name="Services"
|
||||
sequence="45"
|
||||
parent="pms_management_menu"
|
||||
/>
|
||||
<menuitem
|
||||
id="pms_configuration_menu"
|
||||
name="Configuration"
|
||||
parent="pms.pms_configuration_menu"
|
||||
sequence="10"
|
||||
groups="pms.group_pms_manager"
|
||||
sequence="55"
|
||||
parent="pms_management_menu"
|
||||
/>
|
||||
</odoo>
|
||||
|
||||
@@ -63,6 +63,7 @@ class PmsBoardServiceRoomType(models.Model):
|
||||
amount = fields.Float(
|
||||
"Amount", digits=("Product Price"), compute="_compute_board_amount", store=True
|
||||
)
|
||||
by_default = fields.Boolean("Apply by Default")
|
||||
|
||||
# Compute and Search methods
|
||||
@api.depends("board_service_line_ids.amount")
|
||||
@@ -107,6 +108,28 @@ class PmsBoardServiceRoomType(models.Model):
|
||||
)
|
||||
)
|
||||
|
||||
@api.constrains("by_default", "pricelist_id")
|
||||
def constrains_duplicated_board_defaul(self):
|
||||
for record in self:
|
||||
default_boards = (
|
||||
record.pms_room_type_id.board_service_room_type_ids.filtered(
|
||||
"by_default"
|
||||
)
|
||||
)
|
||||
# TODO Check properties (with different propertys is allowed)
|
||||
if any(
|
||||
default_boards.mapped(
|
||||
lambda l: l.pricelist_id == record.pricelist_id
|
||||
and l.id != record.id
|
||||
)
|
||||
):
|
||||
raise UserError(
|
||||
_(
|
||||
"""Only can set one default board service by
|
||||
pricelist (or without pricelist)"""
|
||||
)
|
||||
)
|
||||
|
||||
# Action methods
|
||||
|
||||
def open_board_lines_form(self):
|
||||
|
||||
@@ -111,6 +111,9 @@ class PmsReservation(models.Model):
|
||||
board_service_room_id = fields.Many2one(
|
||||
"pms.board.service.room.type",
|
||||
string="Board Service",
|
||||
compute="_compute_board_service_room_id",
|
||||
store=True,
|
||||
readonly=False,
|
||||
)
|
||||
room_type_id = fields.Many2one(
|
||||
"pms.room.type",
|
||||
@@ -504,6 +507,32 @@ class PmsReservation(models.Model):
|
||||
# TODO: Logic priority (100 by example)
|
||||
self.priority = 100
|
||||
|
||||
@api.depends("pricelist_id", "room_type_id")
|
||||
def _compute_board_service_room_id(self):
|
||||
for reservation in self:
|
||||
if reservation.pricelist_id and reservation.room_type_id:
|
||||
board_service_default = self.env["pms.board.service.room.type"].search(
|
||||
[
|
||||
"&",
|
||||
"&",
|
||||
("pms_room_type_id", "=", reservation.room_type_id.id),
|
||||
("by_default", "=", True),
|
||||
"|",
|
||||
("pricelist_id", "=", reservation.pricelist_id.id),
|
||||
("pricelist_id", "=", False),
|
||||
]
|
||||
)
|
||||
if len(board_service_default) > 1:
|
||||
reservation.board_service_room_id = board_service_default.filtered(
|
||||
lambda b: b.pricelist_id == reservation.pricelist_id
|
||||
)
|
||||
else:
|
||||
reservation.board_service_room_id = (
|
||||
board_service_default.id if board_service_default else False
|
||||
)
|
||||
elif not reservation.board_service_room_id:
|
||||
reservation.board_service_room_id = False
|
||||
|
||||
@api.depends("preferred_room_id")
|
||||
def _compute_room_type_id(self):
|
||||
for reservation in self:
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
odoo.define("pms.ListController", function (require) {
|
||||
"use strict";
|
||||
/*
|
||||
* Pms
|
||||
* 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 () {
|
||||
// Sets this.$buttons
|
||||
this._super.apply(this, arguments);
|
||||
var self = this;
|
||||
if (this.modelName === "pms.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("pms.open_wizard_reservations");
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
54
pms/static/src/js/views/list/pms_list_controller.js
Normal file
54
pms/static/src/js/views/list/pms_list_controller.js
Normal file
@@ -0,0 +1,54 @@
|
||||
odoo.define("pms.group.reservation.wizard", function (require) {
|
||||
"use strict";
|
||||
|
||||
var core = require("web.core");
|
||||
var _t = core._t;
|
||||
|
||||
var qweb = core.qweb;
|
||||
|
||||
var ReservationWizard = {
|
||||
start: function () {
|
||||
// Define a unique uploadId and a callback method
|
||||
this.fileUploadID = _.uniqueId("account_bill_file_upload");
|
||||
$(window).on(this.fileUploadID, this._onFileUploaded.bind(this));
|
||||
return this._super.apply(this, arguments);
|
||||
},
|
||||
|
||||
_onNewReservationGroup: function (event) {
|
||||
var self = this;
|
||||
|
||||
return this.do_action("pms.pms_reservation_view_tree", {
|
||||
on_close: function () {
|
||||
self.reload();
|
||||
},
|
||||
});
|
||||
},
|
||||
};
|
||||
return ReservationWizard;
|
||||
});
|
||||
|
||||
odoo.define("pms.reservation.group", function (require) {
|
||||
"use strict";
|
||||
var core = require("web.core");
|
||||
var ListController = require("web.ListController");
|
||||
var ListView = require("web.ListView");
|
||||
var viewRegistry = require("web.view_registry");
|
||||
|
||||
var ReservationGroupRequestListController = ListController.extend(
|
||||
ReservationWizard,
|
||||
{
|
||||
buttons_template: "ReservationGroupList.buttons",
|
||||
events: _.extend({}, ListController.prototype.events, {
|
||||
"click .o_button_wizard_resevation": "_onNewReservationGroup",
|
||||
}),
|
||||
}
|
||||
);
|
||||
|
||||
var ReservationGroupRequestListView = ListView.extend({
|
||||
config: _.extend({}, ListView.prototype.config, {
|
||||
Controller: ReservationGroupRequestListController,
|
||||
}),
|
||||
});
|
||||
|
||||
viewRegistry.add("reservation_group", ReservationGroupRequestListView);
|
||||
});
|
||||
10
pms/static/src/xml/reservation_group_button_views.xml
Normal file
10
pms/static/src/xml/reservation_group_button_views.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<templates>
|
||||
<t t-extend="ListView.buttons" t-name="ReservationGroupList.buttons">
|
||||
<t t-jquery="button.o_list_button_add" t-operation="after">
|
||||
<button type="button" class="btn btn-secondary o_button_wizard_resevation">
|
||||
Booking Engine
|
||||
</button>
|
||||
</t>
|
||||
</t>
|
||||
</templates>
|
||||
@@ -39,4 +39,12 @@
|
||||
</xpath> -->
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Invoices"
|
||||
id="pms_invoice_menu"
|
||||
action="account.action_move_out_invoice_type"
|
||||
sequence="15"
|
||||
parent="pms.pms_sales_menu"
|
||||
/>
|
||||
</odoo>
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<!-- Backend stuff -->
|
||||
<template id="assets_backend" inherit_id="web.assets_backend">
|
||||
<xpath expr="." position="inside">
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="/pms/static/src/js/views/list/list_controller.js"
|
||||
/>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
@@ -38,11 +38,12 @@
|
||||
<field name="res_model">pms.amenity.type</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Amenity Types"
|
||||
id="menu_action_pms_room_amenity_type_view_form"
|
||||
action="action_pms_room_amenity_type_view_form"
|
||||
sequence="3"
|
||||
sequence="15"
|
||||
parent="pms.menu_amenity"
|
||||
/>
|
||||
</odoo>
|
||||
|
||||
@@ -105,13 +105,13 @@
|
||||
id="menu_amenity"
|
||||
name="Amenity"
|
||||
parent="pms.pms_configuration_menu"
|
||||
sequence="2"
|
||||
sequence="55"
|
||||
/>
|
||||
<menuitem
|
||||
name="Amenities"
|
||||
id="menu_action_pms_room_amenity_view_form"
|
||||
action="action_pms_room_amenity_view_form"
|
||||
sequence="2"
|
||||
sequence="5"
|
||||
parent="pms.menu_amenity"
|
||||
/>
|
||||
<!-- Amenities Categories -->
|
||||
|
||||
@@ -43,6 +43,6 @@
|
||||
id="menu_open_pms_board_service_form_tree"
|
||||
action="open_pms_board_service_form_tree"
|
||||
sequence="25"
|
||||
parent="pms.configuration_others"
|
||||
parent="pms.pms_services_menu"
|
||||
/>
|
||||
</odoo>
|
||||
|
||||
@@ -67,6 +67,6 @@
|
||||
id="menu_pms_cancelation_rule"
|
||||
action="action_pms_cancelation_rule"
|
||||
sequence="25"
|
||||
parent="pms.configuration_others"
|
||||
parent="pms.pms_configuration_menu"
|
||||
/>
|
||||
</odoo>
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<menuitem
|
||||
id="menu_pms_checkin_partner"
|
||||
name="Checkins"
|
||||
parent="pms.pms_reports_menu"
|
||||
sequence="25"
|
||||
action="action_checkin_partner"
|
||||
parent="pms.menu_reservations"
|
||||
/>
|
||||
<record id="pms_checkin_partner_view_form" model="ir.ui.view">
|
||||
<field name="name">Checkin Form</field>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
name="Ubications"
|
||||
id="menu_open_pms_floor_form_tree"
|
||||
action="open_pms_floor_form_tree"
|
||||
sequence="21"
|
||||
parent="pms.configuration_others"
|
||||
sequence="65"
|
||||
parent="pms.pms_rooms_menu"
|
||||
/>
|
||||
</odoo>
|
||||
|
||||
@@ -42,11 +42,11 @@
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button
|
||||
type="action"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
id="payment_smart_button"
|
||||
icon="fa-money"
|
||||
name="%(pms.action_payment_folio)d"
|
||||
name="action_pay"
|
||||
attrs="{'invisible': [('pending_amount','<=',0)]}"
|
||||
>
|
||||
<div class="o_form_field o_stat_info">
|
||||
@@ -150,6 +150,7 @@
|
||||
name="cancelled_reason"
|
||||
attrs="{'invisible':[('state','not in',('cancel'))]}"
|
||||
/>
|
||||
<field name="internal_comment" />
|
||||
</group>
|
||||
<group
|
||||
colspan="2"
|
||||
@@ -169,11 +170,16 @@
|
||||
attrs="{'readonly':[('state','not in',('draft'))]}"
|
||||
/>
|
||||
<field name="agency_id" />
|
||||
<<<<<<< HEAD
|
||||
<field
|
||||
name="channel_type_id"
|
||||
attrs="{'readonly':[('agency_id','!=', False)]}"
|
||||
/>
|
||||
<field name="internal_comment" />
|
||||
=======
|
||||
<field name="channel_type_id" />
|
||||
|
||||
>>>>>>> [IMP] Improvements
|
||||
</group>
|
||||
<group
|
||||
class="oe_subtotal_footer oe_right"
|
||||
@@ -322,8 +328,8 @@
|
||||
widget="monetary"
|
||||
groups="account.group_show_line_subtotals_tax_included"
|
||||
/>
|
||||
<field name="state" invisible="0" />
|
||||
<field name="invoice_status" invisible="0" />
|
||||
<field name="state" invisible="1" />
|
||||
<field name="invoice_status" invisible="1" />
|
||||
<field name="currency_id" invisible="1" />
|
||||
<field name="price_tax" invisible="1" />
|
||||
<field name="company_id" invisible="1" />
|
||||
@@ -540,17 +546,11 @@
|
||||
<field name="res_model">pms.folio</field>
|
||||
<field name="view_mode">tree,form,graph</field>
|
||||
</record>
|
||||
<menuitem
|
||||
id="menu_reservations"
|
||||
name="Reservations"
|
||||
parent="pms.pms_management_menu"
|
||||
sequence="4"
|
||||
/>
|
||||
<menuitem
|
||||
name="Folios"
|
||||
id="menu_open_pms_folio1_form_tree_all"
|
||||
id="pms_folio_menu"
|
||||
action="open_pms_folio1_form_tree_all"
|
||||
sequence="15"
|
||||
parent="menu_all_folio"
|
||||
sequence="5"
|
||||
parent="pms_sales_menu"
|
||||
/>
|
||||
</odoo>
|
||||
|
||||
@@ -62,9 +62,16 @@
|
||||
<!-- menus -->
|
||||
<menuitem
|
||||
action="pms_property_action"
|
||||
id="pms_property_menu"
|
||||
id="general_property_menu"
|
||||
parent="base.menu_users"
|
||||
sequence="10"
|
||||
name="Properties"
|
||||
/>
|
||||
<menuitem
|
||||
action="pms_property_action"
|
||||
id="pms_property_menu"
|
||||
parent="pms.pms_configuration_menu"
|
||||
sequence="65"
|
||||
name="Properties"
|
||||
/>
|
||||
</odoo>
|
||||
|
||||
@@ -174,14 +174,14 @@
|
||||
</span>
|
||||
<h1>
|
||||
<field
|
||||
name="preferred_room_id"
|
||||
select="1"
|
||||
name="room_type_id"
|
||||
placeholder="Room Type"
|
||||
on_change="1"
|
||||
nolabel="1"
|
||||
options="{'no_create': True,'no_open': True}"
|
||||
placeholder="Room"
|
||||
attrs="{'readonly':[('state','not in',('draft'))]}"
|
||||
style="margin-right: 30px;"
|
||||
attrs="{'invisible': [('splitted','=',True)]}"
|
||||
/>
|
||||
/>
|
||||
<field
|
||||
name="partner_id"
|
||||
default_focus="1"
|
||||
@@ -198,29 +198,34 @@
|
||||
/>
|
||||
</h1>
|
||||
<h3>
|
||||
<group>
|
||||
<div class="o_row">
|
||||
<field
|
||||
name="checkin"
|
||||
widget="daterange"
|
||||
nolabel="1"
|
||||
class="oe_inline"
|
||||
options="{'related_end_date': 'checkout'}"
|
||||
/>
|
||||
<i
|
||||
class="fa fa-long-arrow-right mx-2"
|
||||
aria-label="Arrow icon"
|
||||
title="Arrow"
|
||||
/>
|
||||
<field
|
||||
name="checkout"
|
||||
widget="daterange"
|
||||
nolabel="1"
|
||||
class="oe_inline"
|
||||
options="{'related_start_date': 'checkin'}"
|
||||
/>
|
||||
</div>
|
||||
</group>
|
||||
<field
|
||||
name="preferred_room_id"
|
||||
select="1"
|
||||
nolabel="1"
|
||||
options="{'no_create': True,'no_open': True}"
|
||||
placeholder="Room"
|
||||
style="margin-right: 30px;"
|
||||
attrs="{'invisible': [('splitted','=',True)]}"
|
||||
/>
|
||||
<field
|
||||
name="checkin"
|
||||
widget="daterange"
|
||||
nolabel="1"
|
||||
class="oe_inline"
|
||||
options="{'related_end_date': 'checkout'}"
|
||||
/>
|
||||
<i
|
||||
class="fa fa-long-arrow-right mx-2"
|
||||
aria-label="Arrow icon"
|
||||
title="Arrow"
|
||||
/>
|
||||
<field
|
||||
name="checkout"
|
||||
widget="daterange"
|
||||
nolabel="1"
|
||||
class="oe_inline"
|
||||
options="{'related_start_date': 'checkin'}"
|
||||
/>
|
||||
</h3>
|
||||
<field
|
||||
name="out_service_description"
|
||||
@@ -279,8 +284,7 @@
|
||||
col="3"
|
||||
string="Reservation Details"
|
||||
name="reservation_details"
|
||||
>
|
||||
<field name="pms_property_id" />
|
||||
>
|
||||
<field
|
||||
name="pricelist_id"
|
||||
attrs="{'invisible': [('reservation_type','in',('out'))]}"
|
||||
@@ -308,13 +312,7 @@
|
||||
<field name="qty_invoiced" invisible="1" />
|
||||
<field name="qty_to_invoice" invisible="1" />
|
||||
<field name="allowed_room_ids" invisible="1" />
|
||||
<field name="folio_payment_state" invisible="1" />
|
||||
<field
|
||||
name="room_type_id"
|
||||
on_change="1"
|
||||
options="{'no_create': True,'no_open': True}"
|
||||
attrs="{'readonly':[('state','not in',('draft'))]}"
|
||||
/>
|
||||
<field name="folio_payment_state" invisible="1" />
|
||||
<!-- TODO: How to filter to avoid show False (generic) pricelist board when exist a specific pricelist board¿? -->
|
||||
<field
|
||||
name="board_service_room_id"
|
||||
@@ -329,21 +327,42 @@
|
||||
colspan="2"
|
||||
nolabel="1"
|
||||
placeholder="Reservation Notes"
|
||||
/>
|
||||
/>
|
||||
<field name="agency_id" />
|
||||
<<<<<<< HEAD
|
||||
<field
|
||||
name="channel_type_id"
|
||||
attrs="{'readonly':[('agency_id','!=', False)]}"
|
||||
/>
|
||||
=======
|
||||
<field name="channel_type_id" />
|
||||
>>>>>>> [IMP] Improvements
|
||||
</group>
|
||||
<group
|
||||
colspan="2"
|
||||
col="3"
|
||||
class="oe_subtotal_footer"
|
||||
style="margin-right: 20px; !important"
|
||||
class="oe_subtotal_footer oe_right"
|
||||
name="reservation_total"
|
||||
string="Amounts"
|
||||
>
|
||||
>
|
||||
<field
|
||||
name="price_services"
|
||||
string="Only Services"
|
||||
widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}"
|
||||
/>
|
||||
<field
|
||||
name="price_total"
|
||||
string="Only Room"
|
||||
widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}"
|
||||
/>
|
||||
<field
|
||||
name="discount"
|
||||
string="Discount Room"
|
||||
widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}"
|
||||
/>
|
||||
<field name="price_subtotal" invisible="1" />
|
||||
<div
|
||||
class="oe_subtotal_footer_separator oe_inline o_td_label"
|
||||
>
|
||||
@@ -351,37 +370,23 @@
|
||||
for="price_room_services_set"
|
||||
string="Reservation Total"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<field
|
||||
name="price_room_services_set"
|
||||
nolabel="1"
|
||||
class="oe_subtotal_footer_separator"
|
||||
widget="monetary"
|
||||
/>
|
||||
<field
|
||||
name="discount"
|
||||
string="Discount Room"
|
||||
widget="monetary"
|
||||
/>
|
||||
<field name="price_subtotal" invisible="1" />
|
||||
<field
|
||||
name="price_services"
|
||||
string="Only Services"
|
||||
widget="monetary"
|
||||
/>
|
||||
<field
|
||||
name="price_total"
|
||||
string="Only Room"
|
||||
widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}"
|
||||
/>
|
||||
<field
|
||||
name="commission_percent"
|
||||
string="Commission percent (%)"
|
||||
string="Commission percent (%)"
|
||||
/>
|
||||
<field
|
||||
name="commission_amount"
|
||||
string="Commission Amount"
|
||||
widget="monetary"
|
||||
widget='monetary'
|
||||
options="{'currency_field': 'currency_id'}"
|
||||
/>
|
||||
<field name="invoice_status" invisible="1" />
|
||||
<field name="currency_id" invisible="1" />
|
||||
@@ -395,8 +400,9 @@
|
||||
placeholder="Credit Card Details"
|
||||
colspan="2"
|
||||
attrs="{'invisible':[('folio_id','!=',False),('folio_pending_amount','<=',0)]}"
|
||||
/>
|
||||
/>
|
||||
</group>
|
||||
<div class="oe_clear" />
|
||||
</group>
|
||||
<group invisible="1">
|
||||
<field
|
||||
@@ -413,13 +419,16 @@
|
||||
<page name="detail" string="Detail">
|
||||
<field name="reservation_line_ids" nolabel="1">
|
||||
<tree create="false" delete="false" editable="bottom">
|
||||
<field name="room_id" />
|
||||
<field
|
||||
name="room_id"
|
||||
attrs="{'column_invisible': [('parent.splitted','=', False)]}"
|
||||
/>
|
||||
<field name="date" readonly="1" force_save="1" />
|
||||
<field name="price" />
|
||||
<field name="discount" />
|
||||
<field
|
||||
name="move_line_ids"
|
||||
widget="many2many_tags"
|
||||
invisible="1"
|
||||
/>
|
||||
<field
|
||||
name="cancel_discount"
|
||||
@@ -530,6 +539,7 @@
|
||||
</page>
|
||||
<page name="others" string="Others">
|
||||
<group>
|
||||
<field name="pms_property_id" />
|
||||
<field name="localizator" />
|
||||
<field name="overbooking" />
|
||||
</group>
|
||||
@@ -582,6 +592,7 @@
|
||||
decoration-warning="splitted"
|
||||
decoration-bf="splitted"
|
||||
>
|
||||
<!--inside <tree>: js_class="reservation_group"-->
|
||||
<field name="splitted" invisible="1" />
|
||||
<field name="pricelist_id" invisible="1" />
|
||||
<field name="rooms" />
|
||||
@@ -597,8 +608,8 @@
|
||||
<field name="folio_id" decoration-bf="1" />
|
||||
<field name="allowed_room_ids" invisible="1" />
|
||||
<field name="partner_id" />
|
||||
<field name="room_type_id" invisible="1" />
|
||||
<field name="adults" />
|
||||
<field name="room_type_id" optional="show" />
|
||||
<field name="adults" optional="show"/>
|
||||
<field name="ratio_checkin_data" widget="progressbar" optional="show" />
|
||||
<field name="overbooking" invisible="1" />
|
||||
<field name="activity_ids" widget="list_activity" optional="show" />
|
||||
@@ -607,20 +618,14 @@
|
||||
optional="show"
|
||||
widget="many2one_avatar_user"
|
||||
/>
|
||||
<field name="origin" />
|
||||
<!-- <field name="origin" /> -->
|
||||
<field name="checkin_partner_ids" invisible="1" />
|
||||
<field name="to_assign" invisible="1" />
|
||||
<field name="checkin_partner_pending_count" invisible="1" />
|
||||
<field name="tax_ids" invisible="1" />
|
||||
<field name="price_subtotal" invisible="1" />
|
||||
<field name="price_total" />
|
||||
<field name="folio_pending_amount" string="Folio Pending Amount" />
|
||||
<field
|
||||
name="company_id"
|
||||
groups="base.group_multi_company"
|
||||
optional="show"
|
||||
readonly="1"
|
||||
/>
|
||||
<field name="folio_pending_amount" string="Folio Pending Amount" />
|
||||
<field
|
||||
name="state"
|
||||
decoration-success="state == 'onboard'"
|
||||
@@ -641,6 +646,18 @@
|
||||
widget="badge"
|
||||
optional="show"
|
||||
/>
|
||||
<field
|
||||
name="company_id"
|
||||
groups="base.group_multi_company"
|
||||
optional="show"
|
||||
readonly="1"
|
||||
/>
|
||||
<field
|
||||
name="pms_property_id"
|
||||
groups="base.group_multi_company"
|
||||
optional="show"
|
||||
readonly="1"
|
||||
/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -844,7 +861,7 @@
|
||||
/>
|
||||
<field
|
||||
name="folio_payment_state"
|
||||
string="State"
|
||||
string="Payment State"
|
||||
enable_counters="1"
|
||||
select="multi"
|
||||
/>
|
||||
@@ -854,9 +871,9 @@
|
||||
</record>
|
||||
<menuitem
|
||||
name="Reservation Rooms"
|
||||
id="menu_open_pms_reservation_form_tree_all"
|
||||
id="menu_reservation_rooms"
|
||||
action="open_pms_reservation_form_tree_all"
|
||||
sequence="10"
|
||||
parent="menu_all_folio"
|
||||
sequence="5"
|
||||
parent="pms.menu_reservations"
|
||||
/>
|
||||
</odoo>
|
||||
|
||||
@@ -37,6 +37,6 @@
|
||||
id="menu_pms_room_closure_reason_form_tree"
|
||||
action="open_pms_room_closure_reason_form_tree"
|
||||
sequence="25"
|
||||
parent="pms.configuration_others"
|
||||
parent="pms.pms_configuration_menu"
|
||||
/>
|
||||
</odoo>
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
name="Availability Plans"
|
||||
id="reservation_availability_rules_menu"
|
||||
action="room_type_availability_action"
|
||||
sequence="22"
|
||||
parent="pms.configuration_others"
|
||||
sequence="5"
|
||||
parent="pms.revenue_management_menu"
|
||||
/>
|
||||
</odoo>
|
||||
|
||||
@@ -58,10 +58,10 @@
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<menuitem
|
||||
name="Type Class"
|
||||
name="Room Type Class"
|
||||
id="menu_open_pms_room_type_class_form_tree"
|
||||
action="open_pms_room_type_class_form_tree"
|
||||
sequence="15"
|
||||
parent="pms.menu_pms_room"
|
||||
sequence="25"
|
||||
parent="pms.pms_rooms_menu"
|
||||
/>
|
||||
</odoo>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Property Room Type">
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<!-- <div class="oe_button_box" name="button_box">
|
||||
<button
|
||||
name="toggle_active"
|
||||
type="object"
|
||||
@@ -23,7 +23,7 @@
|
||||
options='{"terminology": "archive"}'
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
</div> -->
|
||||
<group colspan="4">
|
||||
<group>
|
||||
<field name="name" />
|
||||
@@ -61,6 +61,7 @@
|
||||
context="{'default_pms_room_type_id':id}"
|
||||
>
|
||||
<tree editable="bottom">
|
||||
<field name="by_default" />
|
||||
<field name="pms_room_type_id" invisible="1" />
|
||||
<field name="pms_board_service_id" />
|
||||
<field name="price_type" />
|
||||
@@ -70,7 +71,7 @@
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
id="go_board_lines"
|
||||
icon="fa fa-2x fa-bars"
|
||||
icon="fa-2x fa-bars"
|
||||
name="open_board_lines_form"
|
||||
/>
|
||||
</tree>
|
||||
@@ -105,17 +106,11 @@
|
||||
<field name="res_model">pms.room.type</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<menuitem
|
||||
id="menu_pms_room"
|
||||
name="Room"
|
||||
parent="pms.pms_configuration_menu"
|
||||
sequence="2"
|
||||
/>
|
||||
<menuitem
|
||||
name="Room Types"
|
||||
id="menu_open_pms_room_type_form_tree"
|
||||
action="open_pms_room_type_form_tree"
|
||||
sequence="6"
|
||||
parent="pms.menu_pms_room"
|
||||
sequence="15"
|
||||
parent="pms.pms_rooms_menu"
|
||||
/>
|
||||
</odoo>
|
||||
|
||||
@@ -245,7 +245,7 @@
|
||||
id="menu_open_pms_room_form"
|
||||
action="action_pms_room_form"
|
||||
sequence="5"
|
||||
parent="pms.menu_pms_room"
|
||||
parent="pms.pms_rooms_menu"
|
||||
/>
|
||||
<!-- Room Categories -->
|
||||
<!-- <record id="product_category_tree_view" model="ir.ui.view">
|
||||
|
||||
@@ -34,10 +34,10 @@
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<menuitem
|
||||
name="Sale Channel"
|
||||
name="Sale Channels"
|
||||
id="menu_open_pms_sale_channel_form_tree"
|
||||
action="open_pms_sale_channel_form_tree"
|
||||
sequence="21"
|
||||
parent="pms.configuration_others"
|
||||
sequence="55"
|
||||
parent="pms.revenue_management_menu"
|
||||
/>
|
||||
</odoo>
|
||||
|
||||
@@ -114,8 +114,8 @@
|
||||
<menuitem
|
||||
id="menu_pms_service_line"
|
||||
name="Services by Day"
|
||||
parent="pms.pms_reports_menu"
|
||||
sequence="30"
|
||||
sequence="35"
|
||||
action="action_service_line"
|
||||
parent="pms.menu_reservations"
|
||||
/>
|
||||
</odoo>
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
name="Shared Rooms"
|
||||
id="menu_open_pms_shared_room_form"
|
||||
action="action_pms_shared_room_form"
|
||||
sequence="5"
|
||||
parent="pms.menu_pms_room"
|
||||
sequence="55"
|
||||
parent="pms.pms_rooms_menu"
|
||||
/>
|
||||
</odoo>
|
||||
|
||||
@@ -45,15 +45,13 @@
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
|
||||
|
||||
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Pricelist"
|
||||
name="Pricelists"
|
||||
id="pricelist_menu"
|
||||
action="product.product_pricelist_action2"
|
||||
sequence="22"
|
||||
parent="pms.configuration_others"
|
||||
sequence="15"
|
||||
parent="pms.revenue_management_menu"
|
||||
/>
|
||||
</odoo>
|
||||
|
||||
@@ -32,4 +32,12 @@
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Services"
|
||||
id="menu_services_pms"
|
||||
action="product.product_template_action"
|
||||
sequence="15"
|
||||
parent="pms.pms_services_menu"
|
||||
/>
|
||||
</odoo>
|
||||
|
||||
@@ -10,6 +10,24 @@
|
||||
<field name="res_model">pms.folio</field>
|
||||
<field name="domain">[('partner_id', '=',active_id)]</field>
|
||||
</record>
|
||||
<record id="pms_customer_action" model="ir.actions.act_window">
|
||||
<field name="name">Customers</field>
|
||||
<field name="res_model">res.partner</field>
|
||||
<field name="view_mode">kanban,tree,form</field>
|
||||
<field name="domain">[('is_agency', '=',False)]</field>
|
||||
</record>
|
||||
<record id="pms_agency_action" model="ir.actions.act_window">
|
||||
<field name="name">Agencies</field>
|
||||
<field name="res_model">res.partner</field>
|
||||
<field name="view_mode">kanban,tree,form</field>
|
||||
<field name="domain">[('is_agency', '=',True)]</field>
|
||||
<field
|
||||
name="context"
|
||||
eval="{
|
||||
'default_is_agency': True,
|
||||
}"
|
||||
/>
|
||||
</record>
|
||||
<record id="res_partner_view_form" model="ir.ui.view">
|
||||
<field name="name">res.partner.view.form</field>
|
||||
<field name="model">res.partner</field>
|
||||
@@ -69,10 +87,17 @@
|
||||
</field>
|
||||
</record>
|
||||
<menuitem
|
||||
id="pms_customer_meu"
|
||||
name="Customers"
|
||||
id="menu_pms_customer"
|
||||
action="base.action_partner_form"
|
||||
sequence="500"
|
||||
parent="menu_all_folio"
|
||||
action="pms.pms_customer_action"
|
||||
sequence="10"
|
||||
parent="pms_contacts_menu"
|
||||
/>
|
||||
<menuitem
|
||||
id="pms_agency_menu"
|
||||
name="Agencies"
|
||||
action="pms.pms_agency_action"
|
||||
sequence="10"
|
||||
parent="pms_contacts_menu"
|
||||
/>
|
||||
</odoo>
|
||||
|
||||
@@ -275,6 +275,7 @@ class FolioAdvancePaymentInv(models.TransientModel):
|
||||
@api.model
|
||||
def _get_lines_to_invoice(self, folios, bill_services=True, bill_rooms=True):
|
||||
lines_to_invoice = folios.sale_line_ids
|
||||
import wdb; wdb.set_trace()
|
||||
if not self.bill_services:
|
||||
lines_to_invoice = lines_to_invoice - lines_to_invoice.filtered(
|
||||
lambda l: l.service_id and not l.service_id.is_board_service
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<menuitem
|
||||
id="menu_pms_advanced_filters"
|
||||
name="Advanced Filters"
|
||||
parent="pms.pms_reports_menu"
|
||||
parent="pms.pms_configuration_menu"
|
||||
sequence="30"
|
||||
action="action_advanced_filters_wizard"
|
||||
/>
|
||||
|
||||
@@ -128,10 +128,10 @@
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Folio wizard"
|
||||
name="Booking Engine"
|
||||
id="menu_pms_folio_wizard"
|
||||
action="action_wizard_folio"
|
||||
sequence="25"
|
||||
parent="pms.configuration_others"
|
||||
sequence="55"
|
||||
parent="pms.menu_reservations"
|
||||
/>
|
||||
</odoo>
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
name="Massive Changes"
|
||||
id="menu_pms_room_massive_changes_wizard"
|
||||
action="action_wizard_massive_changes"
|
||||
sequence="25"
|
||||
parent="pms.configuration_others"
|
||||
sequence="75"
|
||||
parent="pms.revenue_management_menu"
|
||||
/>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user