mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[ADD] Credit card Details
This commit is contained in:
@@ -176,6 +176,7 @@ class HotelFolio(models.Model):
|
||||
return_ids = fields.One2many('payment.return', 'folio_id',
|
||||
readonly=True)
|
||||
payment_term_id = fields.Many2one('account.payment.term', string='Payment Terms', oldname='payment_term')
|
||||
credit_card_details = fields.Text('Credit Card Details')
|
||||
|
||||
#Amount Fields------------------------------------------------------
|
||||
pending_amount = fields.Monetary(compute='compute_amount',
|
||||
|
||||
@@ -93,6 +93,7 @@
|
||||
</group>
|
||||
<group>
|
||||
<field name="internal_comment"/>
|
||||
<field name="credit_card_details" attrs="{'invisible':[('pending_amount','<=',0)]}"/>
|
||||
</group>
|
||||
<group colspan="2" class="oe_subtotal_footer oe_right">
|
||||
<field name="amount_untaxed" sum="Untaxed amount" widget='monetary' />
|
||||
|
||||
@@ -445,7 +445,7 @@
|
||||
/>
|
||||
<field name="folio_id"/>
|
||||
<button type="object" class="oe_stat_button"
|
||||
icon="fa fa-1x fa-user-plus"
|
||||
icon="fa fa-2x fa-user-plus"
|
||||
name="action_checks"
|
||||
context="{'partner_id': partner_id,'enter_date': checkin,
|
||||
'exit_date': checkout,'reservation_id': id, 'hidden_checkin_partner': True, 'edit_checkin_partner': True }"
|
||||
@@ -497,6 +497,11 @@
|
||||
<attribute name="delete">false</attribute>
|
||||
<attribute name="string">Rooms</attribute>
|
||||
</tree>
|
||||
<xpath expr="//field[@name='state']" position="before">
|
||||
<button type="object" class="oe_stat_button"
|
||||
icon="fa fa-2x fa-suitcase"
|
||||
name="open_reservation_form"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='folio_id']" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</xpath>
|
||||
@@ -506,9 +511,6 @@
|
||||
<xpath expr="//button[@name='open_folio'][2]" position="attributes">
|
||||
<attribute name="invisible">True</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//button[@name='open_folio'][2]" position="attributes">
|
||||
<attribute name="invisible">True</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//button[@name='%(open_hotel_reservation_form_tree_all)d']" position="attributes">
|
||||
<attribute name="invisible">True</attribute>
|
||||
</xpath>
|
||||
@@ -521,6 +523,12 @@
|
||||
<xpath expr="//field[@name='create_uid']" position="attributes">
|
||||
<attribute name="invisible">True</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='create_date']" position="attributes">
|
||||
<attribute name="invisible">True</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='last_updated_res']" position="attributes">
|
||||
<attribute name="invisible">True</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -64,6 +64,8 @@ class FolioWizard(models.TransientModel):
|
||||
default=_get_default_checkin)
|
||||
checkout = fields.Date('Check Out', required=True,
|
||||
default=_get_default_checkout)
|
||||
credit_card_details = fields.Text('Credit Card Details')
|
||||
internal_comment = fields.Text(string='Internal Folio Notes')
|
||||
reservation_wizard_ids = fields.One2many('hotel.reservation.wizard',
|
||||
'folio_wizard_id',
|
||||
string="Resevations")
|
||||
@@ -220,7 +222,6 @@ class FolioWizard(models.TransientModel):
|
||||
services = [(5, False, False)]
|
||||
if self.autoassign:
|
||||
self.create_reservations()
|
||||
import wdb; wdb.set_trace()
|
||||
for line in self.reservation_wizard_ids:
|
||||
reservations.append((0, False, {
|
||||
'room_id': line.room_id.id,
|
||||
@@ -247,6 +248,8 @@ class FolioWizard(models.TransientModel):
|
||||
'channel_type': self.channel_type,
|
||||
'room_lines': reservations,
|
||||
'service_lines': services,
|
||||
'internal_comment': self.internal_comment,
|
||||
'credit_card_details': self.credit_card_details,
|
||||
}
|
||||
newfol = self.env['hotel.folio'].create(vals)
|
||||
if self.confirm:
|
||||
@@ -304,9 +307,6 @@ class HotelRoomTypeWizards(models.TransientModel):
|
||||
minstay_restrictions = self.env['hotel.room.type.restriction.item'].search([
|
||||
('room_type_id', '=', res.room_type_id.id),
|
||||
])
|
||||
avail_restrictions = self.env['hotel.room.type.availability'].search([
|
||||
('room_type_id', '=', res.room_type_id.id)
|
||||
])
|
||||
real_max = len(res.room_type_id.check_availability_room_type(
|
||||
res.checkin,
|
||||
res.checkout,
|
||||
@@ -326,7 +326,6 @@ class HotelRoomTypeWizards(models.TransientModel):
|
||||
else:
|
||||
avail = real_max
|
||||
|
||||
|
||||
if 100000 > avail > 0:
|
||||
res.max_rooms = avail
|
||||
else:
|
||||
|
||||
@@ -12,11 +12,13 @@
|
||||
<field name="checkin" required="1" />
|
||||
<field name="checkout" required="1" />
|
||||
<field name="partner_id"/>
|
||||
<field name="credit_card_details" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="call_center" invisible="1" />
|
||||
<field name="channel_type" required="1" force_save="1" attrs="{'readonly':[('call_center','=',True)]}"/>
|
||||
<field name="pricelist_id"/>
|
||||
<field name="internal_comment"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
|
||||
Reference in New Issue
Block a user