Bahmni implementation, Creating robust deployment

@asaidi

Bahmni 0.88.244 (historical!), the res.partner.attributes was saving the person attributes in <name, value> format ie the code was (good old code!) saving an attribute key in the ‘name’ column and its value in the ‘value’ column.

Though the res.partner.attributes still have the ‘name’ and ‘value’ columns the code got changed at this point in the history and it started to store the attribute as a custom column!

So, the code forced implementers to create columns in the res.partner.attributes model as “x_<attribute key>”.

In your case, as @gsluthra has pointed out, the log shows that the following columns are missing from res.partner.attributes model

x_StatusRefugie, x_MaritalStatus, x_occupation, x_nomtuteur

These attributes are sent to the erp sync code only if the attributes are not null.

So, (most likely!) you will be able to replicate the issue by

  1. Will not sync to ERP - Creating a patient with a value for at least one of these attributes
  2. Will sync ERP - Create a patient with no value for any of these attributes.

The bottom line is, you will have to create these attributes in res.partner.models as shown on this wiki gif/video for consistently syncing patients to ERP.

Hope it helps!

1 Like