Browse Source

Apr 5 [UPDT] : Bug Fixed 'statement_report'

pull/278/merge
AjmalCybro 1 year ago
parent
commit
d58d299a00
  1. 2
      statement_report/__manifest__.py
  2. 6
      statement_report/doc/RELEASE_NOTES.md
  3. 4
      statement_report/models/res_partner.py
  4. 7
      statement_report/views/res_partner_views.xml

2
statement_report/__manifest__.py

@ -21,7 +21,7 @@
############################################################################# #############################################################################
{ {
'name': 'Customer/ Supplier Payment Statement Report', 'name': 'Customer/ Supplier Payment Statement Report',
'version': '16.0.1.0.0', 'version': '16.0.1.0.1',
'category': 'Productivity', 'category': 'Productivity',
'summary': """Customer/ Supplier Payment Statement Report for Odoo 16""", 'summary': """Customer/ Supplier Payment Statement Report for Odoo 16""",
'description': """ This module help you to get Customer/ Supplier 'description': """ This module help you to get Customer/ Supplier

6
statement_report/doc/RELEASE_NOTES.md

@ -3,5 +3,9 @@
#### 16.02.2023 #### 16.02.2023
#### Version 16.0.1.0.0 #### Version 16.0.1.0.0
#### ADD #### ADD
- Initial commit for Customer/ Supplier Payment Statement Report - Initial commit for Customer/ Supplier Payment Statement Report
#### 05.04.2024
#### Version 16.0.1.0.1
#### UPDATED
- Added the case of credit and debit notes in to the statement

4
statement_report/models/res_partner.py

@ -50,7 +50,7 @@ class Partner(models.Model):
""" for computing 'invoices' of partner""" """ for computing 'invoices' of partner"""
inv_ids = self.env['account.move'].search( inv_ids = self.env['account.move'].search(
[('partner_id', '=', self.id), [('partner_id', '=', self.id),
('move_type', '=', 'out_invoice'), ('move_type', 'in', ['out_invoice', 'out_refund']),
('payment_state', '!=', 'paid'), ('payment_state', '!=', 'paid'),
('state', '=', 'posted')]).ids ('state', '=', 'posted')]).ids
self.customer_report_ids = inv_ids self.customer_report_ids = inv_ids
@ -59,7 +59,7 @@ class Partner(models.Model):
""" for computing 'bills' of partner """ """ for computing 'bills' of partner """
bill_ids = self.env['account.move'].search( bill_ids = self.env['account.move'].search(
[('partner_id', '=', self.id), [('partner_id', '=', self.id),
('move_type', '=', 'in_invoice'), ('move_type', '=', ['in_invoice', 'in_refund']),
('payment_state', '!=', 'paid'), ('payment_state', '!=', 'paid'),
('state', '=', 'posted')]).ids ('state', '=', 'posted')]).ids
self.vendor_statement_ids = bill_ids self.vendor_statement_ids = bill_ids

7
statement_report/views/res_partner_views.xml

@ -30,7 +30,8 @@
<br/> <br/>
<field name="customer_report_ids"> <field name="customer_report_ids">
<tree create='false' delete="false"> <tree create='false' delete="false">
<field name="currency_id" invisible="1"/> <!-- <field name="currency_id" invisible="1"/>-->
<field name="currency_id"/>
<field name="invoice_date" <field name="invoice_date"
string="Invoice Date"/> string="Invoice Date"/>
<field name="name" string="Invoice No."/> <field name="name" string="Invoice No."/>
@ -42,7 +43,7 @@
<field name="amount_residual_signed" <field name="amount_residual_signed"
string="Amount Due" widget="monetary" string="Amount Due" widget="monetary"
options="{'currency_field': 'currency_id'}"/> options="{'currency_field': 'currency_id'}"/>
<field name="amount_residual" sum="Balance Due" <field name="amount_residual_signed" sum="Balance Due"
string="Balance" widget="monetary" string="Balance" widget="monetary"
options="{'currency_field': 'currency_id'}"/> options="{'currency_field': 'currency_id'}"/>
</tree> </tree>
@ -81,7 +82,7 @@
<field name="amount_residual_signed" <field name="amount_residual_signed"
string="Amount Due" widget="monetary" string="Amount Due" widget="monetary"
options="{'currency_field': 'currency_id'}"/> options="{'currency_field': 'currency_id'}"/>
<field name="amount_residual" sum="Balance Due" <field name="amount_residual_signed" sum="Balance Due"
string="Balance" widget="monetary" string="Balance" widget="monetary"
options="{'currency_field': 'currency_id'}"/> options="{'currency_field': 'currency_id'}"/>
</tree> </tree>

Loading…
Cancel
Save