Skip to content

Commit ea1aaa7

Browse files
committed
[FIX] estate_account: invoice line descriptions must be translated
1 parent 0fd1b1d commit ea1aaa7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

estate_account/models/estate_property.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
from odoo import Command, models
1+
from odoo import Command, models, _
22

33
class EstateProperty(models.Model):
44
_inherit = "estate.property"
55

66
def action_set_sold(self) -> bool:
7+
percent_description = _("6 percent of selling price")
8+
admin_fee_description = _("Administrative fees")
79
# Note: does not work if fiscal localization is not set
810
for record in self:
911
account_move = {
1012
"partner_id": record.buyer_id.id,
1113
"move_type": "out_invoice",
1214
"invoice_line_ids": [
13-
Command.create({"name": "6 percent of selling price", "quantity": 1, "price_unit": 0.06 * record.selling_price}),
14-
Command.create({"name": "Administrative fees", "quantity": 1, "price_unit": 100.0}),
15+
Command.create({"name": percent_description, "quantity": 1, "price_unit": 0.06 * record.selling_price}),
16+
Command.create({"name": admin_fee_description, "quantity": 1, "price_unit": 100.0}),
1517
],
1618
}
1719
self.env["account.move"].create(account_move)

0 commit comments

Comments
 (0)