Module to send emails massively.
Represents a batch of emails. Theres three possible states:
- Esborrany/Obert: You can add new partners or polisses to the batch
- Realitzat: The batch of email is sended, so you cannot add more emails.
There are two types of Lot:
- Infoenergia: It contains som.infoenergia.enviament type of emails and you can define specific fields
- Altres: It contains som.enviament.massiu type of emails, so is more generic. It supports poweremail templates with attachment.
Actions:
-
Send emails (aka Enviament reports Infoenergia del lot): Send all emails in "obert" state of this Lot . If test flag is equal True, allows you to change the email receiver
-
CSV Download, for infoenergia lots: Given a CSV path and a folder containing the reports informed in the CSV, it creates or updates the lot's som.infoenergia.enviament instances.
-
PDF Download, for infoenergia lots: downloads the report for the som.infoenergia.enviament instances in Esborrany state, or Obert state when force_download_pdf field is Checked.
-
Multiple state change: to change the state of multiple som.infoenergia.enviament instances.
-
Add contracts to lot: wizard with contract filters to create som.infoenergia.enviament/som.enviament.massiu from contracts that match the selection criteria.
-
Cancel from CSV, for lots: given a CSV file with polissa numbers, it changes the state to Cancel·lat of the lot's som.enviament.massiu/som.enviament.infoenergia instances associated to said polisses.
-
Create enviaments from CSV, for lots: given a CSV file with polissa numbers, it creates new som.enviament.massiu/som.enviament.infoenergia instances associated to said polisses and the selected lot.
Sendings with attached reports generated by BeeData. It handles the downloading, deanonymization and sending of the reports. They can be created from polissa or from CSVs. There are seven possible states:
- Pre-Esborrany: sending generated from polissa, without any further information.
- Esborrany: sending read from CSV, path for the PDF file informed.
- Obert: desanonymized PDF report attatched and ready to send.
- Encuat: sending on poweremail queue.
- Enviat: sending sended.
- Cancel·lat: when the polissa doesn't allow to recieve this kind of emails or manual action. The email won't be sent.
- Baixa: when the polissa is not active. The email won't be sent.
- Error: an error occurred.
To send poweremail templates. The template has to be based on this model. There are four possible states:
- Obert: sending generated (from partner or polissa) and ready to be sent.
- Encuat: sending on poweremail queue.
- Enviat: sending sended.
- Cancel·lat: For whatever reason you don't want to send this email
- Add action "Add partner to Batch email" (aka "Afegir partners a Lot d'Enviament Massiu"). It creates som.infoenergia.enviament objects based on the selected partners.
- Add action "Add contract to Batch email" (aka "Afegir polisses a Lot d'Enviament Massiu"). It creates som.infoenergia.enviament or som.infoenergia.enviament objects based on the selected contracts and the type of the Lot. For som.infoenergia.enviament objects, it sets the field found_in_search to True.
- poweremail
- giscedata.polissa (Commercial OpenERP module for electrical companies)