Skip to content

[FIX] energy_communities: demo data not loading.

MR Related !191 (merged)

Changelog

  • Using hook_cron to be able to call or not the process in a cron job for demo data logic.
  • Calling action_set_won_rainbowman if crm_lead_id is assigned.

Error Log

share_product_id is created in the cron job and demo data read expected date before the cron job runs.

2023-11-15 14:44:12,793 2017 ERROR odoo_test odoo.sql_db: bad query: INSERT INTO "subscription_request" ("id", "create_uid", "create_date", "write_uid", "write_date", "active", "address", "birthdate", "city", "company_id", "country_id", "data_policy_approved", "date", "email", "financial_risk_approved", "firstname", "gender", "generic_rules_approved", "iban", "internal_rules_approved", "lang", "lastname", "mandate_approved", "ordered_parts", "phone", "share_product_id", "source", "state", "type", "vat", "zip_code") VALUES (nextval('subscription_request_id_seq'), 1, (now() at time zone 'UTC'), 1, (now() at time zone 'UTC'), true, 'C. de Sta. Catalina, 55', '1997-06-03', 'Barcelona', 22, 68, false, '2023-11-03 14:44:12.741409', 'ignacio@fake.com', false, 'Ignacio', 'male', false, 'ES4734051800397702714765', false, 'es_ES', 'Mora Herrera', false, 1, '603903268', NULL, 'manual', 'draft', 'new', '43549978F', '08014') RETURNING id
ERROR: null value in column "share_product_id" violates not-null constraint
DETAIL:  Failing row contains (5, null, null, null, Ignacio, Mora Herrera, 1997-06-03, male, new, draft, ignacio@fake.com, ES4734051800397702714765, null, null, 1, C. de Sta. Catalina, 55, Barcelona, 08014, 68, 603903268, null, null, null, es_ES, 2023-11-03, 22, null, null, null, null, null, null, null, null, null, null, null, null, null, null, manual, f, f, f, f, t, 1, 2023-11-15 14:42:39.578266, 1, 2023-11-15 14:42:39.578266, null, 43549978F, null, f, null).
Edited by Daniil Digtyar Vasilieva

Merge request reports