diff --git a/energy_selfconsumption/data/mail_template.xml b/energy_selfconsumption/data/mail_template.xml index c74f4cfdcdfc2239c8b09d26a3a3538e213c53cc..ed0e7716701404847ce365ea8186bc84e7e8938a 100644 --- a/energy_selfconsumption/data/mail_template.xml +++ b/energy_selfconsumption/data/mail_template.xml @@ -4,7 +4,7 @@ <record id="selfconsumption_energy_delivered_invoicing_reminder" model="mail.template"> <field name="name">Selfconsumption Energy Delivered Invoicing Reminder</field> <field name="description">Email reminder for self-consumption billing of supplied energy</field> - <field name="email_from">info@somcomunitats.coop</field> + <field name="email_from">{{ (object.company_id.coop_email_contact or object.company_id.email_formatted) }}</field> <field name="subject">Selfconsumption - Energy Delivered Invoicing Reminder</field> <field name="model_id" ref="energy_selfconsumption.model_energy_selfconsumption_selfconsumption"/> <field name="body_html" type="html"> @@ -36,7 +36,7 @@ <record id="selfconsumption_energy_delivered_custom_invoicing_reminder" model="mail.template"> <field name="name">Selfconsumption Energy Delivered Custom Invoicing Reminder</field> <field name="description">E-mail reminder of personalized billing of self-consumption of energy supplied</field> - <field name="email_from">info@somcomunitats.coop</field> + <field name="email_from">{{ (object.company_id.coop_email_contact or object.company_id.email_formatted) }}</field> <field name="subject">Self-consumption billing reminder {{object.name}}</field> <field name="model_id" ref="energy_selfconsumption.model_energy_selfconsumption_selfconsumption"/> <field name="body_html" type="html"> @@ -78,7 +78,7 @@ <record id="selfconsumption_power_acquired_invoicing_reminder" model="mail.template"> <field name="name">Selfconsumption Power Acquired Invoicing Reminder</field> <field name="description">E-mail billing reminder of self-consumption of energy purchased</field> - <field name="email_from">info@somcomunitats.coop</field> + <field name="email_from">{{ (object.company_id.coop_email_contact or object.company_id.email_formatted) }}</field> <field name="subject">Selfconsumption - Power Acquired Invoicing Reminder</field> <field name="model_id" ref="energy_selfconsumption.model_energy_selfconsumption_selfconsumption"/> <field name="body_html" type="html"> @@ -104,7 +104,7 @@ <record id="selfconsumption_insciption_form" model="mail.template"> <field name="name">Registration in self-consumption project of the Energy Community</field> <field name="description">E-mail of inscription in the self-consumption project of the Energy Community</field> - <field name="email_from">info@somcomunitats.coop</field> + <field name="email_from">{{ (object.company_id.coop_email_contact or object.company_id.email_formatted) }}</field> <field name="subject">Registration in {{ object.name }}</field> <field name="model_id" ref="energy_selfconsumption.model_energy_selfconsumption_selfconsumption"/> <field name="body_html" type="html"> diff --git a/energy_selfconsumption/models/supply_point.py b/energy_selfconsumption/models/supply_point.py index e690a7322551976b5609a4c8f4eb8ec42fafc1f0..8c8a45f1ce77bd0abe972a53a622537aa581b517 100644 --- a/energy_selfconsumption/models/supply_point.py +++ b/energy_selfconsumption/models/supply_point.py @@ -96,7 +96,7 @@ class SupplyPoint(models.Model): def _compute_supply_point_name(self): for record in self: if record.partner_id and record.street: - record.name = f"{record.partner_id.name} - {record.street}" + record.name = f"{record.street}" else: record.name = _("New Supply Point") diff --git a/energy_selfconsumption/views/distribution_table_views.xml b/energy_selfconsumption/views/distribution_table_views.xml index 0a00934b4802927509436d50fb97954fefacbd88..053ad6ce9bf577b07bbb2c741e2859bc4101252b 100644 --- a/energy_selfconsumption/views/distribution_table_views.xml +++ b/energy_selfconsumption/views/distribution_table_views.xml @@ -50,6 +50,7 @@ name="selfconsumption_project_id" attrs="{'readonly': [('state', 'not in', ['draft'])]}" options="{'no_create': True}" + invisible="1" /> </group> <group>