summaryrefslogtreecommitdiff
path: root/addons/account/data
diff options
context:
space:
mode:
authorAnkit Sathvara <asa@odoo.com>2020-09-29 08:32:40 +0000
committerThibault Delavallée <tde@odoo.com>2020-09-29 08:45:52 +0000
commit71a39c6650e18b71a212bf21150fece683ae01c7 (patch)
tree677cfd54390209cf1d86f2fca91f08b6347e671f /addons/account/data
parentbf24c18c44fc45e934524cdeab3d5d8ba50b4def (diff)
[FIX] account, mail: properly evaluate and clean xml context
Before this commit, there were some traceback while performing several actions due to context that was not properly evaluated. This commit fixes those traceback by evaluating the context and thus enabling user to perform those actions without traceback. We also clean some badly-configured email actions in accounting. Task Id : 2302572 PR #56501 Co-authored-by: D J <dja@odoo.com> Co-authored-by: Thibault Delavallée <tde@odoo.com>
Diffstat (limited to 'addons/account/data')
-rw-r--r--addons/account/data/payment_receipt_data.xml14
1 files changed, 4 insertions, 10 deletions
diff --git a/addons/account/data/payment_receipt_data.xml b/addons/account/data/payment_receipt_data.xml
index 50b5f6e3689..74b6eb657fb 100644
--- a/addons/account/data/payment_receipt_data.xml
+++ b/addons/account/data/payment_receipt_data.xml
@@ -37,16 +37,13 @@
<field name="res_model">mail.compose.message</field>
<field name="view_mode">form</field>
<field name="target">new</field>
- <field name="context">{
- 'default_model': 'account.payment',
+ <field name="context" eval="{
'mail_post_autofollow': True,
'default_composition_mode': 'comment',
'default_use_template': True,
- 'default_res_id': active_id,
'default_template_id': ref('account.mail_template_data_payment_receipt'),
- 'force_email': True,
'custom_layout': 'mail.mail_notification_light',
- }</field>
+ }"/>
<field name="binding_model_id" ref="model_account_payment"/>
<field name="binding_view_types">form</field>
<field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/>
@@ -57,16 +54,13 @@
<field name="res_model">mail.compose.message</field>
<field name="view_mode">form</field>
<field name="target">new</field>
- <field name="context">{
- 'default_model': 'account.payment',
+ <field name="context" eval="{
'mail_post_autofollow': True,
'default_composition_mode': 'mass_mail',
'default_use_template': True,
- 'default_res_id': active_id,
'default_template_id': ref('account.mail_template_data_payment_receipt'),
- 'force_email': True,
'custom_layout': 'mail.mail_notification_light',
- }</field>
+ }"/>
<field name="binding_model_id" ref="model_account_payment"/>
<field name="binding_view_types">list</field>
</record>