Saas 19.4 channex logs instead of catch chga - #30
Conversation
aae35dd to
d4d9c9b
Compare
frva-odoo
left a comment
There was a problem hiding this comment.
Review of the first commit, globally good to go well done !
| remote_id = data.json.get('data', {}).get('attributes', {}).get('id') | ||
| if not remote_id: | ||
| raise UserError("Invalid response from Channex for the creation of a group corresponding to group with id %s" % str(property.id)) | ||
| mapping.write({'x_remote_id': remote_id}) |
There was a problem hiding this comment.
Don't know from when it is, but it should be group_mapping here
| group_mapping, | ||
| "Error creating group" | ||
| ) | ||
| if not group_mapping.x_remote_id: continue |
There was a problem hiding this comment.
you can put the continue after create_on_channex, this is in a similar if
There was a problem hiding this comment.
I just add extra check to prevent unnecessary loop run for property whose group is not on channex, and this code is replace by server action calling in commit 2 so if commit 2 will merge then no need to change here
frva-odoo
left a comment
There was a problem hiding this comment.
Nothing to say about second commit, I think it's all good and your changes are good even for reading the code. I'll go through it again before merge to be sure nothing's wrong, as this is touching already validated features. Thank you for this and great job 🙏
handle usererror with logs for create and update call because records will create during daily sync but delete call will raise error because its not include in daily sync Task: 6449448
d4d9c9b to
10df083
Compare
|
@vava-odoo PR is ready to review. |
commit 1:handle usererror with logs for create and update call because
records will create during daily sync but delete call will raise
error because its not include in daily sync
commit 2:refactor code to reduce LOC.
Task: 6449448