Skip to content

Commit 12a7d6c

Browse files
committed
[IMP] donation: add description (if the field exists)
1 parent 224b3b3 commit 12a7d6c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

donation/models/account_bank_statement.py

+5
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ def _prepare_donation_vals(self, stline, move_line, payment_mode):
5959
"unit_price": amount,
6060
"analytic_account_id": move_line.analytic_account_id.id or False,
6161
}
62+
# https://github.com/ows-cloud/apps/tree/14.0/donation_analytic_description
63+
if "donation_description" in self.env["account.analytic.account"]._fields:
64+
line_vals["description"] = move_line.analytic_account_id.with_context(
65+
lang=stline.partner_id.lang
66+
).donation_description
6267
partner = stline.partner_id
6368
vals = {
6469
"company_id": company.id,

0 commit comments

Comments
 (0)