[WIP] Roommatik

This commit is contained in:
Dario Lodeiros
2019-04-27 18:04:03 +02:00
parent 69d496676c
commit 0dd112bea3
3 changed files with 4 additions and 14 deletions

View File

@@ -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

View File

@@ -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()

View File

@@ -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 -------------------