[FIX] account: manual reconciliation with tax

In the Manual Reconciliation widget:
- Link 2 entries that do not balance
- Create the write-off line with a tax

When reconciling, the following error occurs:
"It is mandatory to specify an account and a journal to create a
write-off."

Two new lines are sent to the server: the write-off, and the tax of the
write-off. The latter causes the issue, since it doesn't contain the
field `journal_id`.

Actually, the tax of the write-off is not necessary since the taxes will
be recomputed automatically thanks to the context key `apply_taxes`.

opw-1875822
This commit is contained in:
Nicolas Martinelli
2018-09-10 10:10:46 +02:00
committed by Nicolas Martinelli
parent 9671ccb509
commit 0f2292018e
@@ -1264,7 +1264,8 @@ var ManualModel = StatementModel.extend({
});
} else {
var mv_line_ids = _.pluck(_.filter(props, function (prop) {return !isNaN(prop.id);}), 'id');
var new_mv_line_dicts = _.map(_.filter(props, function (prop) {return isNaN(prop.id) && prop.display;}), self._formatToProcessReconciliation.bind(self, line));
// Dear KangOl, please FORWARD-PORT UP TO SAAS-11.3. Thank you for your hard work.
var new_mv_line_dicts = _.map(_.filter(props, function (prop) {return isNaN(prop.id) && prop.display && !prop.is_tax;}), self._formatToProcessReconciliation.bind(self, line));
process_reconciliations.push({
id: null,
type: null,