From 153248d918911fea32e412d80565046d9866f94a Mon Sep 17 00:00:00 2001 From: Jose Luis Date: Wed, 20 Mar 2019 18:47:03 +0100 Subject: [PATCH] [IMP] Creating dictionary to json --- hotel_roommatik/models/inherited_res_partner.py | 4 ---- hotel_roommatik/models/roommatik.py | 12 ++++++++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/hotel_roommatik/models/inherited_res_partner.py b/hotel_roommatik/models/inherited_res_partner.py index 6ce0ff185..a68cd73c0 100755 --- a/hotel_roommatik/models/inherited_res_partner.py +++ b/hotel_roommatik/models/inherited_res_partner.py @@ -69,10 +69,6 @@ class ResPartner(models.Model): street_2 += ', ' + customer['IdentityDocument'][0]['Address'][0]['Flat'] street_2 += ', ' + customer['IdentityDocument'][0]['Address'][0]['Number'] - # Debug Stop ------------------- - #import wdb; wdb.set_trace() - # Debug Stop ------- - # Check birthdate_date # Here need to convert birthdate_date to '%d%m%Y' fomat diff --git a/hotel_roommatik/models/roommatik.py b/hotel_roommatik/models/roommatik.py index 09c6594ea..1f816bbd3 100755 --- a/hotel_roommatik/models/roommatik.py +++ b/hotel_roommatik/models/roommatik.py @@ -12,12 +12,20 @@ class RoomMatik(models.Model): @api.model def rm_get_date(self): # FECHA/HORA - # Need know UTC in the machine/hotel + # TODO Need know UTC in the machine/hotel utc_s = '+01:00' - json_response = datetime.now().strftime("%Y-%m-%dT%H:%M:%S.%f") + utc_s + json_response = dict() + json_response = { + 'dateTime': datetime.now().strftime("%Y-%m-%dT%H:%M:%S.%f") + utc_s + } json_response = json.dumps(json_response) return json_response + @api.model + def rm_add_customer(self, customer): + apidata = self.env['res.partner'] + return apidata.rm_add_customer(customer) + # Debug Stop ------------------- # import wdb; wdb.set_trace() # Debug Stop -------------------