Skip to content

Commit

Permalink
temp rebasing PR 481 (516c0ac)
Browse files Browse the repository at this point in the history
  • Loading branch information
roboadhoc committed Jan 15, 2024
2 parents 111aab2 + 516c0ac commit 904a74b
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
4 changes: 2 additions & 2 deletions account_debt_report/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Account Debt Report',
'version': "16.0.1.0.0",
'version': "17.0.1.0.0",
'category': 'Account Reporting',
'author': 'ADHOC SA',
'website': 'www.adhoc.com.ar',
Expand All @@ -38,5 +38,5 @@
],
'test': [
],
'installable': False,
'installable': True,
}
35 changes: 17 additions & 18 deletions account_debt_report/data/mail_template_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,27 @@
<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="report_template_ids" eval="[(4, ref('account_debt_report'))]"/>
<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>
<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>
7 changes: 4 additions & 3 deletions account_debt_report/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ def get_line_vals(

if from_date:
initial_domain = domain + [('date', '<', from_date)]
inicial_lines = self.env['account.move.line'].sudo().read_group(
initial_domain, fields=['balance'], groupby=['partner_id'])
balance = inicial_lines[0]['balance'] if inicial_lines else 0.0
inicial_lines = self.env['account.move.line'].sudo()._read_group(
initial_domain, groupby=['partner_id'], aggregates=['balance:sum'])
balance = inicial_lines[0][1] if inicial_lines else 0.0

res = [get_line_vals(name=_('INITIAL BALANCE'), balance=balance)]
domain.append(('date', '>=', from_date))
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
</group>
<group>
<field name="historical_full"/>
<field name="from_date" string="Detallar desde" attrs="{'invisible': [('historical_full', '=', False)]}"/>
<field name="to_date" string="Detallar hasta" attrs="{'invisible': [('historical_full', '=', False)]}"/>
<field name="from_date" string="Detallar desde" invisible="not historical_full"/>
<field name="to_date" string="Detallar hasta" invisible="not historical_full"/>
<field name="secondary_currency"/>
<field name="show_invoice_detail"/>
<!-- <field name="show_receipt_detail" attrs="{'invisible': [('group_by_move', '=', False)]}"/> -->
Expand Down

0 comments on commit 904a74b

Please sign in to comment.