mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[WIP] Roommatik
This commit is contained in:
@@ -4,4 +4,4 @@ from . import inherited_res_partner
|
||||
from . import inherited_hotel_room_type
|
||||
from . import roommatik
|
||||
from . import inherited_hotel_reservation
|
||||
from . import inherited_accuont_payment
|
||||
from . import inherited_account_payment
|
||||
|
||||
@@ -25,6 +25,7 @@ class AccountPayment(models.Model):
|
||||
'partner_type': 'customer',
|
||||
'state': 'draft',
|
||||
}
|
||||
self.update(vals)
|
||||
for cashpay in payment['PaymentTransaction']['CreditCardPayments']:
|
||||
vals = {
|
||||
'journal_id': 15, # TODO:config setting
|
||||
@@ -38,5 +39,5 @@ class AccountPayment(models.Model):
|
||||
'partner_type': 'customer',
|
||||
'state': 'draft',
|
||||
}
|
||||
self.update(vals)
|
||||
self.update(vals)
|
||||
self.with_context({'ignore_notification_post': True}).post()
|
||||
|
||||
@@ -79,18 +79,7 @@ class RoomMatik(models.Model):
|
||||
@api.model
|
||||
def _rm_add_payment(self, code, payment):
|
||||
apidata = self.env['account.payment']
|
||||
reservation = self.env['hotel.reservation'].search([
|
||||
'|', ('localizator', '=', code),
|
||||
('folio_id.name', '=', code)])
|
||||
if reservation:
|
||||
for cashpay in payment['PaymentTransaction']['CashPayments']:
|
||||
|
||||
for cashpay in payment['PaymentTransaction']['CreditCardPayments:']:
|
||||
|
||||
|
||||
|
||||
|
||||
return apidata.rm_checkin_partner(stay)
|
||||
return apidata.rm_checkin_partner(code, payment)
|
||||
# Debug Stop -------------------
|
||||
# import wdb; wdb.set_trace()
|
||||
# Debug Stop -------------------
|
||||
|
||||
Reference in New Issue
Block a user