[IMP] Creating dictionary to json

This commit is contained in:
Jose Luis
2019-03-20 18:47:03 +01:00
parent 066144159a
commit 153248d918
2 changed files with 10 additions and 6 deletions

View File

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

View File

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