Skip to content

Commit d31c944

Browse files
committed
[IMP] account_ecotax_report add product weight to view
1 parent 3557d67 commit d31c944

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

account_ecotax_report/models/account_move_line_ecotax.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,8 @@ class AccountMoveLineEcotax(models.Model):
5050
)
5151
currency_id = fields.Many2one(store=True)
5252
product_id = fields.Many2one(store=True)
53+
weight = fields.Float(
54+
related="product_id.weight",
55+
readonly=True,
56+
store=True,
57+
)

account_ecotax_report/views/account_move_line_ecotax_view.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<field name="company_id" groups="base.group_multi_company" />
2121
<field name="amount_total" optional="show" sum="Total" />
2222
<field name="quantity" optional="hide" sum="Total" />
23+
<field name="weight" optional="hide" sum="Total" />
2324
<field name="currency_id" optional="hide" />
2425
</tree>
2526
</field>

0 commit comments

Comments
 (0)