Skip to content

[IMP] booking_channex: consolidate Daily Sync - #27

Merged
frva-odoo merged 1 commit into
saas-19.3-booking-channex-main-branch-frvafrom
saas-19.3-channex-consolidate-daily-sync-frva
Aug 7, 2026
Merged

[IMP] booking_channex: consolidate Daily Sync#27
frva-odoo merged 1 commit into
saas-19.3-booking-channex-main-branch-frvafrom
saas-19.3-channex-consolidate-daily-sync-frva

Conversation

@frva-odoo

@frva-odoo frva-odoo commented Jul 28, 2026

Copy link
Copy Markdown

Task-5914258

@frva-odoo
frva-odoo force-pushed the saas-19.3-channex-consolidate-daily-sync-frva branch 8 times, most recently from 3b24ed6 to 4b81c19 Compare August 4, 2026 12:00
@frva-odoo

Copy link
Copy Markdown
Author

Hello @chga-odoo, can you do a quick review on this before merging ? Thanks !

@frva-odoo
frva-odoo requested a review from chga-odoo August 5, 2026 09:43

@chga-odoo chga-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.

@frva-odoo great work 🫡,
Flow looks good. I have only two suggestions
Thanks!

Comment on lines 9 to 12
try:
method, endpoint = env.context.get('method'), env.context.get('endpoint')
method, endpoint, res = env.context.get('method'), env.context.get('endpoint'), False
if not method or method not in ["GET", "POST", "PUT", "DELETE"]: raise UserError("Http request to channex cannot be sent because method is invalid (not GET, POST, PUT or DELETE)")
if not endpoint: raise UserError("Http request to channex cannot be sent because endpoint is empty")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think this part (variable initialization and the UserError validations) should be outside the try block. Otherwise, if a local error occurs before the HTTP request is sent, it will be reported as a Channex API error even though it's unrelated to Channex.

except Exception as e: log_sync_error_message('POST', 'restrictions', f"Daily sync: Failed to send rates to rate plans; error is :\n{str(e)}")

self.env['ir.cron']._commit_progress(remaining=2)
log_sync_error_message('/', '/', "Daily sync: The daily synchronization finished running")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

if we want use this function also for info message(non error). than we should change name of this function log_sync_message

@frva-odoo
frva-odoo force-pushed the saas-19.3-channex-consolidate-daily-sync-frva branch from 4b81c19 to f4d04a0 Compare August 7, 2026 11:40
@frva-odoo

Copy link
Copy Markdown
Author

Thanks for the review @chga-odoo. Looks okay to merge ?

@chga-odoo

Copy link
Copy Markdown

Thanks for the review @chga-odoo. Looks okay to merge ?

Yes, Looks okay 👍

@frva-odoo
frva-odoo merged commit 8f3b2e6 into saas-19.3-booking-channex-main-branch-frva Aug 7, 2026
2 checks passed
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.

2 participants