Sync organization trial period to Odoo sale order #566

Merged
tobru merged 2 commits from odoo-trial-period into main 2026-06-22 13:25:35 +00:00
Owner

Mirror an organization's trial window onto its Odoo sale order so trial usage is not invoiced. The window is derived from the existing validity mechanism: trial_start_date = created_at, trial_end_date = expiration_date (created_at + limit_profile.validity_days), sent as naive-UTC strings.

  • New Organization.push_trial_window_to_odoo() holds all eligibility logic: skips shared sale orders (origin.default_odoo_sale_order_id), skips orgs without validity, and never clears an existing window. Non-blocking.
  • Written at org creation (own-SO branch) and re-pushed via post_save signals when limit_profile is reassigned or a profile's validity_days changes.
Mirror an organization's trial window onto its Odoo sale order so trial usage is not invoiced. The window is derived from the existing validity mechanism: trial_start_date = created_at, trial_end_date = expiration_date (created_at + limit_profile.validity_days), sent as naive-UTC strings. - New Organization.push_trial_window_to_odoo() holds all eligibility logic: skips shared sale orders (origin.default_odoo_sale_order_id), skips orgs without validity, and never clears an existing window. Non-blocking. - Written at org creation (own-SO branch) and re-pushed via post_save signals when limit_profile is reassigned or a profile's validity_days changes.
tobru force-pushed odoo-trial-period from 97643f5201
All checks were successful
Tests / test (push) Successful in 56s
to 345eff779d
All checks were successful
Tests / test (push) Successful in 56s
2026-06-22 13:24:28 +00:00
Compare
tobru merged commit ac2d303414 into main 2026-06-22 13:25:35 +00:00
tobru deleted branch odoo-trial-period 2026-06-22 13:25:35 +00:00
Sign in to join this conversation.
No description provided.