[FIX] account: removing a line produced by a model
If a line was produced by a reconciliaion model, it shouldn't be put back in the reconciliation propositions because a rpc request would not give it back. Also, the line is not correctly formatted. closes odoo/odoo#36826 Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
This commit is contained in:
@@ -588,10 +588,12 @@ var StatementModel = BasicModel.extend({
|
||||
line.reconciliation_proposition = _.filter(line.reconciliation_proposition, function (p) {
|
||||
return p.id !== prop.id && p.id !== prop.link && p.link !== prop.id && (!p.link || p.link !== prop.link);
|
||||
});
|
||||
if (['receivable', 'payable', 'liquidity'].includes(prop.account_type)) {
|
||||
line.mv_lines_match_rp.unshift(prop);
|
||||
} else {
|
||||
line.mv_lines_match_other.unshift(prop);
|
||||
if (prop['reconcileModelId'] === undefined) {
|
||||
if (['receivable', 'payable', 'liquidity'].includes(prop.account_type)) {
|
||||
line.mv_lines_match_rp.unshift(prop);
|
||||
} else {
|
||||
line.mv_lines_match_other.unshift(prop);
|
||||
}
|
||||
}
|
||||
|
||||
// No proposition left and then, reset the st_line partner.
|
||||
|
||||
Reference in New Issue
Block a user