mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[IMP] account_credit_control: Change email_from template to avoid multi-company issues
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<!--Email template -->
|
||||
<record id="email_template_credit_control_base" model="mail.template">
|
||||
<field name="name">Credit Control Email</field>
|
||||
<field name="email_from">${object.partner_id.company_id.email or ''}</field>
|
||||
<field name="email_from">${user.company_id.email or ''}</field>
|
||||
<field name="subject">Credit Control:
|
||||
(${object.current_policy_level.name or 'n/a'})
|
||||
</field>
|
||||
|
||||
@@ -250,3 +250,13 @@ class CreditControlLine(models.Model):
|
||||
'context': ctx,
|
||||
'target': 'new',
|
||||
}
|
||||
|
||||
def button_credit_control_line_form(self):
|
||||
self.ensure_one()
|
||||
action = self.env.ref(
|
||||
'account_credit_control.credit_control_line_action')
|
||||
form = self.env.ref('account_credit_control.credit_control_line_form')
|
||||
action = action.read()[0]
|
||||
action['views'] = [(form.id, 'form')]
|
||||
action['res_id'] = self.id
|
||||
return action
|
||||
|
||||
@@ -133,7 +133,8 @@
|
||||
decoration-danger="state in ('error', 'email_error')"
|
||||
decoration-muted="state == 'ignored'"
|
||||
decoration-success="state == 'sent'">
|
||||
<button name="action_sale_order_form" type="object" icon="fa-external-link" class="oe_stat_button"/>
|
||||
<button name="button_credit_control_line_form"
|
||||
type="object" icon="fa-external-link" class="oe_stat_button"/>
|
||||
<field name="date"/>
|
||||
<field name="date_due"/>
|
||||
<field name="level"/>
|
||||
|
||||
Reference in New Issue
Block a user