Repository navigation
Expand file tree
/
Copy pathintrastat_service_reminder.xml
More file actions
71 lines (63 loc) · 2.85 KB
/
Copy pathintrastat_service_reminder.xml
File metadata and controls
71 lines (63 loc) · 2.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2013-2020 Akretion France (http://www.akretion.com/)
@author Alexis de Lattre <alexis.delattre@akretion.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<data noupdate="1">
<!-- noupdate = 1 for the 'active' field -->
<record id="intrastat_service_cron" model="ir.cron">
<field name="name">DES Reminder</field>
<field name="active" eval="False" />
<field name="user_id" ref="base.user_root" />
<field name="interval_number">1</field>
<field name="interval_type">months</field>
<field name="numbercall">-1</field>
<!-- don't limit the number of calls -->
<field name="doall" eval="False" />
<field name="model_id" ref="model_l10n_fr_intrastat_service_declaration" />
<field name="state">code</field>
<field name="code">model._scheduler_reminder()</field>
</record>
</data>
<data>
<record id="intrastat_service_reminder_email_template" model="mail.template">
<field name="name">DES Reminder</field>
<field
name="model_id"
ref="l10n_fr_intrastat_service.model_l10n_fr_intrastat_service_declaration"
/>
<field name="auto_delete" eval="False" />
<field name="email_from">
${object.company_id.email or 'odoo@example.com'}
</field>
<field name="email_to">${object.company_id.intrastat_email_list}</field>
<field name="subject">
DES ${object.year_month} for ${object.company_id.name}
</field>
<field
name="body_html"
><![CDATA[
<p>I would like to remind you that we are approaching the deadline for the DES declaration for month ${object.year_month}.</p>
<p>As there were no DES for that month in Odoo, a draft declaration has been generated automatically.</p>
% if ctx.get('exception'):
<p>When trying to generate the DES lines, the following error was encountered:</p>
<p>${ctx.get('error_msg')}</p>
<p>You should solve this error, then go to the menu <em>Invoicing > Reporting > Intrastat > DES</em>, open the declaration of month ${object.year_month} and click on the button <em>Re-generate lines</em>.</p>
% else:
% if object.num_decl_lines > 0:
<p>This draft DES contains ${object.num_decl_lines} ${object.num_decl_lines == 1 and 'line' or 'lines'} and the total amount is ${object.total_amount} ${object.currency_id.symbol}.</p>
% else:
<p>This draft DES generated automatically by Odoo doesn't contain any line.</p>
% endif
<p>Go and check this declaration in the menu <em>Invoicing > Reporting > Intrastat > DES</em>.</p>
% endif
<p>
-- <br/>
Automatic e-mail sent by Odoo.
</p>
]]></field>
</record>
</data>
</odoo>