Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

from_to: [{“from”:”Policy”,”to”:”Invoice”}, {“from”:”Contract”,”to”:”Invoice”}, {“from”:”ContractContributionPlanDetails”,”to”:”InvoiceLine”},]

list of impacted parameters: NULL (will take data from product, claims … )

...

convert(from, to, obj_from, **agrv)save = True)

to convert a “from” object (obj_from) to a to object

from = ‘Contract' / 'Policy’

...

obj_from policy/contract obj

Registration on signals from other module(existing or not):

  • Policy activated

if active_for_object(ContractDetails/Policy, 'submit', type, sub_type):

...

save will save the “To“ object in the database

Wrappers are required to attach “convert“ function to those signal

  • Policy activated (obj_from is the instance from the signal data)

convert_batch(from, to, **agrv)

→ only required for informal sector

argv : product or dateStart, dateEnd, location (optionnal)

Informal sector / from Policy to Invoice: this function will take the all polices related to the product (all product if not specified) that have no invoice and were created in the period specified in the specified location if any

getLinkedClass(classname)

...