[FIX] account: tax journal item's label in reconciliation
-- Create a new bank statement; -- Add a transaction; -- Reconcile; -- Create a write-off with tax. Before this commit, the tax journal item's label only contains the name of the tax. Now, the tax journal item's label contains the write-off label and the tax's name. This is the same behaviour as it was in version 11 (https://github.com/odoo/odoo/blob/11.0/addons/account/models/account_move.py#L1259). opw-2025480 closes odoo/odoo#35348 Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
This commit is contained in:
@@ -898,7 +898,7 @@ var StatementModel = BasicModel.extend({
|
||||
'link': prop.id,
|
||||
'tax_id': [tax.id, null],
|
||||
'amount': tax.amount,
|
||||
'label': tax.name,
|
||||
'label': prop.label ? prop.label + " " + tax.name : tax.name,
|
||||
'date': prop.date,
|
||||
'account_id': tax.account_id ? [tax.account_id, null] : prop.account_id,
|
||||
'analytic': tax.analytic,
|
||||
|
||||
@@ -1266,14 +1266,14 @@ QUnit.module('account', {
|
||||
widget.$('.create .quick_add button:contains(ATOS)').trigger('click');
|
||||
|
||||
assert.strictEqual(widget.$('.accounting_view tbody .cell_label, .accounting_view tbody .cell_right').text().replace(/[\n\r\s$,]+/g, ' '),
|
||||
" ATOS Banque 1145.62 Tax 20.00% 229.12 ATOS Frais 26.71 Tax 10.00% include 2.67 ", "should display 4 lines");
|
||||
" ATOS Banque 1145.62 ATOS Banque Tax 20.00% 229.12 ATOS Frais 26.71 ATOS Frais Tax 10.00% include 2.67 ", "should display 4 lines");
|
||||
assert.strictEqual(widget.$('.accounting_view tfoot .cell_label, .accounting_view tfoot .cell_left').text().replace(/[\n\r\s$,]+/g, ' '),
|
||||
"Open balance229.12", "should display the 'Open balance' line with value in left column");
|
||||
|
||||
widget.$('.create .create_amount input').val('100').trigger('input');
|
||||
|
||||
assert.strictEqual(widget.$('.accounting_view tbody').text().replace(/[\n\r\s$,]+/g, ' '),
|
||||
" 101120 New ATOS Banque 1075.00 101120 New Tax 20.00% 215.00 101130 New ATOS Frais 90.91 101300 New Tax 10.00% include 9.09 ",
|
||||
" 101120 New ATOS Banque 1075.00 101120 New ATOS Banque Tax 20.00% 215.00 101130 New ATOS Frais 90.91 101300 New ATOS Frais Tax 10.00% include 9.09 ",
|
||||
"should update the value of the 4 lines (because the line must have 100% of the value)");
|
||||
assert.strictEqual(widget.$('.accounting_view tfoot .cell_label, .accounting_view tfoot .cell_left').text().replace(/[\n\r\s$,]+/g, ' '),
|
||||
"Open balance215.00", "should change the 'Open balance' line because the 20.00% tax is not an include tax");
|
||||
|
||||
Reference in New Issue
Block a user