Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ var StatementModel = BasicModel.extend({
this._computeReconcileModels(handle, prop.reconcileModelId);
}
}
if ('label' in values || 'account_id' in values || 'amount' in values || 'tax_id' in values || 'force_tax_included' in values) {
if ('account_id' in values || 'amount' in values || 'tax_id' in values || 'force_tax_included' in values) {
prop.__tax_to_recompute = true;

if(values.tax_id){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ var LineRenderer = Widget.extend(FieldManagerMixin, {
relation: 'account.journal',
type: 'many2one',
name: 'journal_id',
domain: [['company_id', '=', state.st_line.company_id], ['type', '=', 'general']],
domain: [['company_id', '=', state.st_line.company_id]],
}, {
relation: 'account.tax',
type: 'many2one',
Expand Down
7 changes: 3 additions & 4 deletions addons/account/static/tests/reconciliation_tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,10 @@ var db = {
fields: {
id: {string: "ID", type: 'integer'},
display_name: {string: "Displayed name", type: 'char'},
type: {string: "Type", type: 'char'},
company_id: {string: "Company", type: 'many2one', relation: 'res.company'},
},
records: [
{id: 8, display_name: "company 1 journal", type:'general', company_id: 1}
{id: 8, display_name: "company 1 journal", company_id: 1}
]
},
'account.analytic.account': {
Expand Down Expand Up @@ -1740,7 +1739,7 @@ QUnit.module('account', {
assert.deepEqual(
_.pick(args.args[0][0].new_mv_line_dicts[1 - idx],
'account_id', 'name', 'credit', 'debit', 'tax_line_id'),
{account_id: 287, name: "dummy text Tax 20.00%", credit: 0, debit: 36, tax_line_id: 6},
{account_id: 287, name: "Tax 20.00%", credit: 0, debit: 36, tax_line_id: 6},
"Reconciliation rpc payload, new_mv_line_dicts.tax is correct"
);
}
Expand Down Expand Up @@ -1803,7 +1802,7 @@ QUnit.module('account', {
"Tax line account number is valid");
assert.equal($($newLineTaxeTds[2]).text().trim(), "New",
"Tax line is flagged as new");
assert.equal($($newLineTaxeTds[3]).text().trim(), "dummy text Tax 20.00%",
assert.equal($($newLineTaxeTds[3]).text().trim(), "Tax 20.00%",
"Tax line has the correct label");
assert.equal($($newLineTaxeTds[4]).text().trim(), "36.00",
"Tax line has the correct left amount");
Expand Down
2 changes: 1 addition & 1 deletion addons/account/views/account_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@
<field name="amount" class="oe_inline"/>
<span class="o_form_label oe_inline" attrs="{'invisible':[('amount_type','!=','percentage')]}">%</span>
</div>
<field name="journal_id" domain="[('type', '=', 'general'), ('company_id', '=', company_id)]" widget="selection"
<field name="journal_id" domain="[('type', '!=', 'general'), ('company_id', '=', company_id)]" widget="selection"
attrs="{'invisible': [('rule_type', '!=', 'writeoff_button')]}"/>
</group>
</group>
Expand Down