When Click the send by email button in sale, the default sale order attachment is loaded.
In my custom module I am try to change the default report to custom sale order report attachment
the email_template_edi_sale
id is noupdate="1"
so i added 'post_init_hook': 'post_init_hook',
in manifest file
in hooks.py
file i added a function for change report_template
def post_init_hook(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})
sale_template = env.ref('sale.email_template_edi_sale')
sale_template.write({'report_template':custom_sale_quotation})
But The default sale order report attachment will not be changed
is it possible to use this method for changing the report template?
reference:Can we able to inherit and change the noupdate="1" in odoo?