diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2019-05-08 08:21:31 +0000 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2019-05-08 12:41:00 +0000 |
| commit | 709e59b4e9ce2dd8cd189e70fb912a0c45ed7706 (patch) | |
| tree | a682e80fa8e09eb223c6fb6de3b25459e83f15dd | |
| parent | 6ff5498fc079f713519acaa8bde9d916491f379d (diff) | |
[FIX] account: analytic account and cash basis
- Activate cash basis
- Set a tax
Tax Due: Based on Payment
Include in Analytic Cost: true
- Create an invoice, add the tax and an analytic account on the invoice
line
- Validate and pay
The analytic account is correctly set on the tax line, but it is not set
on any of the cash basis entries.
Partial backport of 079a13a349c942ab69ca704263bc5cb52c391d92.
opw-1971751
closes odoo/odoo#33236
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
| -rw-r--r-- | addons/account/models/account_move.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index babf9bee4a5..08afcf0e071 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -1751,6 +1751,9 @@ class AccountPartialReconcile(models.Model): 'debit': abs(rounded_amt) if rounded_amt < 0 else 0.0, 'credit': rounded_amt if rounded_amt > 0 else 0.0, 'account_id': line.account_id.id, + # DO NOT FORWARD-PORT!!! ONLY FOR v11 + 'analytic_account_id': line.analytic_account_id.id, + 'analytic_tag_ids': line.analytic_tag_ids.ids, 'tax_exigible': True, 'amount_currency': line.amount_currency and line.currency_id.round(-line.amount_currency * amount / line.balance) or 0.0, 'currency_id': line.currency_id.id, @@ -1763,6 +1766,9 @@ class AccountPartialReconcile(models.Model): 'debit': rounded_amt if rounded_amt > 0 else 0.0, 'credit': abs(rounded_amt) if rounded_amt < 0 else 0.0, 'account_id': line.tax_line_id.cash_basis_account.id, + # DO NOT FORWARD-PORT!!! ONLY FOR v11 + 'analytic_account_id': line.analytic_account_id.id, + 'analytic_tag_ids': line.analytic_tag_ids.ids, 'tax_line_id': line.tax_line_id.id, 'tax_exigible': True, 'amount_currency': line.amount_currency and line.currency_id.round(line.amount_currency * amount / line.balance) or 0.0, |
