Skip to content

Commit

Permalink
[MIG] account_debt_report: Migration to 15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vib-adhoc committed Jul 22, 2022
1 parent f6d3e56 commit 581bc16
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 60 deletions.
7 changes: 4 additions & 3 deletions account_debt_report/__manifest__.py
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Account Debt Report',
'version': '13.0.1.1.0',
'version': "15.0.1.0.0",
'category': 'Account Reporting',
'author': 'ADHOC SA',
'website': 'www.adhoc.com.ar',
Expand All @@ -30,12 +30,13 @@
],
'data': [
'report/account_debt_report.xml',
'data/mail_data.xml',
'data/mail_template_data.xml',
'security/ir.model.access.csv',
'wizard/account_debt_report_wizard_view.xml',
],
'demo': [
],
'test': [
],
'installable': False,
'installable': True,
}
31 changes: 0 additions & 31 deletions account_debt_report/data/mail_data.xml

This file was deleted.

32 changes: 32 additions & 0 deletions account_debt_report/data/mail_template_data.xml
@@ -0,0 +1,32 @@
<?xml version="1.0" ?>
<odoo>
<record id="email_template_debt_detail" model="mail.template">
<field name="name">Debt Detail Mail</field>
<field name="model_id" ref="base.model_res_partner"/>
<field name="auto_delete" eval="True"/>
<field name="partner_to">{{ object.id }}</field>
<field name="report_template" ref="account_debt_report"/>
<field name="report_name">Debt_Detail_{{ (object.name or '').replace('/','_') }}</field>
<field name="subject">Debt Detail {{ object.company_id.name }}</field>
<field name="lang">{{ object.lang }}</field>
<field name="email_from">{{ object.user_id.email or '' }}</field>
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Dear
<t t-if="object.parent_id">
<t t-out="object.name or ''"></t>
(<t t-out="object.parent_id.name or ''"></t>),
</t>
<t t-else="">
<t t-out="object.name or ''"></t>,
</t>
<br /><br />
Please find attached your debt detail from <t t-out="object.company_id.name or ''"></t>.
<br /><br />
Do not hesitate to contact us if you have any questions.
</p>
</div>
</field>
</record>
</odoo>
52 changes: 28 additions & 24 deletions account_debt_report/i18n/es.po
Expand Up @@ -20,32 +20,36 @@ msgstr ""
msgid ""
"<div style=\"margin: 0px; padding: 0px;\">\n"
" <p style=\"margin: 0px; padding: 0px; font-size: 13px;\">\n"
" Dear\n"
" % if object.parent_id:\n"
" ${object.name} (${object.parent_id.name}),\n"
" % else:\n"
" ${object.name},\n"
" % endif\n"
" <br/><br/>\n"
" Please find attached your debt detail from ${object.company_id.name}.\n"
" <br/><br/>\n"
" Do not hesitate to contact us if you have any questions.\n"
" Dear\n"
" <t t-if=\"object.parent_id\">\n"
" <t t-out=\"object.name or ''\"></t>\n"
" (<t t-out=\"object.parent_id.name or \'\'\"></t>),\n"
" </t>\n"
" <t t-else=\"\">\n"
" <t t-out=\"object.name or ''\"></t>,\n"
" </t>\n"
" <br /><br />\n"
" Please find attached your debt detail from <t t-out=\"object.company_id.name or ''\"></t>.\n"
" <br /><br />\n"
" Do not hesitate to contact us if you have any questions.\n"
" </p>\n"
"</div>\n"
" "
msgstr ""
"<div style=\"margin: 0px; padding: 0px;\">\n"
" <p style=\"margin: 0px; padding: 0px; font-size: 13px;\">\n"
" Estimado/a\n"
" % if object.parent_id:\n"
" ${object.name} (${object.parent_id.name}),\n"
" % else:\n"
" ${object.name},\n"
" % endif\n"
" <br/><br/>\n"
" Aquí tiene su detalle de deuda de ${object.company_id.name}.\n"
" <br/><br/>\n"
" No dude en contactarnos si tiene alguna pregunta.\n"
" Estimado/a\n"
" <t t-if=\"object.parent_id\">\n"
" <t t-out=\"object.name or ''\"></t>\n"
" (<t t-out=\"object.parent_id.name or ''\"></t>),\n"
" </t>\n"
" <t t-else=\"\">\n"
" <t t-out=\"object.name or ''\"></t>,\n"
" </t>\n"
" <br /><br />\n"
" Aquí tiene su detalle de deuda de <t t-out=\"object.company_id.name or ''\"></t>\n"
" <br/><br/>\n"
" No dude en contactarnos si tiene alguna pregunta.\n"
" </p>\n"
"</div>\n"
" "
Expand Down Expand Up @@ -103,8 +107,8 @@ msgstr ""

#. module: account_debt_report
#: model:mail.template,subject:account_debt_report.email_template_debt_detail
msgid "Debt Detail ${object.company_id.name|safe}"
msgstr "Detalle de Deuda ${object.company_id.name|safe}"
msgid "Debt Detail {{ object.company_id.name }}"
msgstr "Detalle de Deuda {{ object.company_id.name }}"

#. module: account_debt_report
#: model:ir.actions.act_window,name:account_debt_report.action_account_debt_report_wizard
Expand All @@ -113,8 +117,8 @@ msgstr "Detalle de Deuda"

#. module: account_debt_report
#: model:mail.template,report_name:account_debt_report.email_template_debt_detail
msgid "Debt_Detail_${(object.name or '').replace('/','_')}"
msgstr "Detalle_Deuda_${(object.name or '').replace('/','_')}"
msgid "Debt_Detail_{{ (object.name or '').replace('/','_') }}"
msgstr "Detalle_Deuda_{{ (object.name or '').replace('/','_') }}"

#. module: account_debt_report
#: model_terms:ir.ui.view,arch_db:account_debt_report.account_debt_report_wizard_form
Expand Down
1 change: 0 additions & 1 deletion account_debt_report/report/account_debt_report.xml
Expand Up @@ -7,7 +7,6 @@
<field name="in_format">oo-ods</field>
<field name="out_format" ref="report_aeroo.report_mimetypes_xls_odt"/>
<field name="report_file">account_debt_report/report/account_debt_report.ods</field>
<field name="parser_state">default</field>
<field name="tml_source">file</field>
</record>
</odoo>
2 changes: 2 additions & 0 deletions account_debt_report/security/ir.model.access.csv
@@ -0,0 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
account_debt_report.access_account_debt_report_wizard,access_account_debt_report_wizard,account_debt_report.model_account_debt_report_wizard,base.group_user,1,1,1,1
2 changes: 1 addition & 1 deletion account_debt_report/wizard/account_debt_report_wizard.py
Expand Up @@ -85,7 +85,7 @@ def send_by_email(self):
'default_use_template': True,
'default_template_id': self.env.ref(
'account_debt_report.email_template_debt_detail').id,
'default_partner_to': '${object.id or \'\'}',
'default_partner_to': '{{ object.id or \'\' }}',
}
self = self.with_context(context)
return {
Expand Down

0 comments on commit 581bc16

Please sign in to comment.