Skip to content

Commit

Permalink
[IMP] donation: add description (if the field exists)
Browse files Browse the repository at this point in the history
  • Loading branch information
norlinhenrik committed Mar 8, 2024
1 parent 224b3b3 commit 12a7d6c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions donation/models/account_bank_statement.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ def _prepare_donation_vals(self, stline, move_line, payment_mode):
"unit_price": amount,
"analytic_account_id": move_line.analytic_account_id.id or False,
}
# https://github.com/ows-cloud/apps/tree/14.0/donation_analytic_description
if "donation_description" in self.env["account.analytic.account"]._fields:
line_vals["description"] = move_line.analytic_account_id.with_context(

Check warning on line 64 in donation/models/account_bank_statement.py

View check run for this annotation

Codecov / codecov/patch

donation/models/account_bank_statement.py#L64

Added line #L64 was not covered by tests
lang=stline.partner_id.lang
).donation_description
partner = stline.partner_id
vals = {
"company_id": company.id,
Expand Down

0 comments on commit 12a7d6c

Please sign in to comment.