Skip to content

Saas 19.4 channex logs instead of catch chga - #30

Open
chga-odoo wants to merge 2 commits into
saas-19.4-channex-main-branch-frvafrom
saas-19.4-channex-logs-instead-of-catch-chga
Open

Saas 19.4 channex logs instead of catch chga#30
chga-odoo wants to merge 2 commits into
saas-19.4-channex-main-branch-frvafrom
saas-19.4-channex-logs-instead-of-catch-chga

Conversation

@chga-odoo

Copy link
Copy Markdown

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

@chga-odoo
chga-odoo force-pushed the saas-19.4-channex-logs-instead-of-catch-chga branch 2 times, most recently from aae35dd to d4d9c9b Compare August 18, 2026 07:21
@chga-odoo
chga-odoo marked this pull request as ready for review August 18, 2026 07:24

@frva-odoo frva-odoo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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})

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can put the continue after create_on_channex, this is in a similar if

@chga-odoo chga-odoo Aug 20, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 frva-odoo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@chga-odoo
chga-odoo force-pushed the saas-19.4-channex-logs-instead-of-catch-chga branch from d4d9c9b to 10df083 Compare August 20, 2026 06:05
@pgu-odoo

Copy link
Copy Markdown

@vava-odoo PR is ready to review.
@chga-odoo 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants