Browse Source

[12.0][partner_statement] Display the payment ref instead of 'Payment' string

See https://github.com/OCA/account-financial-reporting/issues/633
pull/634/head
Khalid Hazam 5 years ago
committed by GitHub
parent
commit
4b3f84abe7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      partner_statement/report/activity_statement.py

14
partner_statement/report/activity_statement.py

@ -63,12 +63,7 @@ class ActivityStatement(models.AbstractModel):
THEN l.name THEN l.name
ELSE '/' ELSE '/'
END as name, END as name,
CASE WHEN (aj.type IN ('sale', 'purchase'))
THEN l.ref
WHEN (aj.type in ('bank', 'cash'))
THEN 'Payment'
ELSE ''
END as ref,
l.ref as ref,
l.blocked, l.currency_id, l.company_id, l.blocked, l.currency_id, l.company_id,
CASE WHEN (l.currency_id is not null AND l.amount_currency > 0.0) CASE WHEN (l.currency_id is not null AND l.amount_currency > 0.0)
THEN sum(l.amount_currency) THEN sum(l.amount_currency)
@ -95,12 +90,7 @@ class ActivityStatement(models.AbstractModel):
THEN l.name THEN l.name
ELSE '/' ELSE '/'
END, END,
CASE WHEN (aj.type IN ('sale', 'purchase'))
THEN l.ref
WHEN (aj.type in ('bank', 'cash'))
THEN 'Payment'
ELSE ''
END,
l.ref,
l.blocked, l.currency_id, l.amount_currency, l.company_id l.blocked, l.currency_id, l.amount_currency, l.company_id
""", locals()), "utf-8") """, locals()), "utf-8")

Loading…
Cancel
Save