Skip to content

Commit 6147cf9

Browse files
florian-dacostabealdav
authored andcommitted
[IMP] Add move_type for reporting
1 parent 73e0e2d commit 6147cf9

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

account_ecotax_report/models/account_move_line_ecotax.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ class AccountMoveLineEcotax(models.Model):
2121
invoice_state = fields.Selection(
2222
related="account_move_line_id.parent_state", store=True
2323
)
24+
move_type = fields.Selection(
25+
related="account_move_line_id.move_id.move_type", store=True
26+
)
2427
classif_categ_id = fields.Many2one(
2528
"account.ecotax.category",
2629
string="Classification category",
@@ -48,8 +51,6 @@ class AccountMoveLineEcotax(models.Model):
4851
supplier_status = fields.Selection(
4952
related="classification_id.supplier_status", readonly=True, store=True
5053
)
51-
currency_id = fields.Many2one(store=True)
52-
product_id = fields.Many2one(store=True)
5354
weight = fields.Float(
5455
related="product_id.weight",
5556
readonly=True,

account_ecotax_report/views/account_move_line_ecotax_view.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,17 @@
5454
domain="[('invoice_state','=','draft')]"
5555
/>
5656
<separator />
57+
<filter
58+
string="Invoices"
59+
name="invoices"
60+
domain="[('move_type', '=', 'out_invoice')]"
61+
/>
62+
<filter
63+
string="Refunds"
64+
name="refunds"
65+
domain="[('move_type', '=', 'out_refund')]"
66+
/>
67+
<separator />
5768
<filter name="filter_invoice_date" date="invoice_date" />
5869
<group expand="1" string="Group By">
5970
<filter

0 commit comments

Comments
 (0)