[FIX] account: remove duplicated code

https://github.com/odoo/odoo/commit/42e74aae51904955e725e4a96e39eb2bd60f3019 was a backport of https://github.com/odoo/odoo/commit/7544c22de9a4cea028ff8fe63931bf68573e0821, and thus generated a duplicated code.

closes odoo/odoo#30318
This commit is contained in:
mreficent
2019-01-17 13:45:20 +00:00
parent 19558129f0
commit c45a4e8f83
-3
View File
@@ -255,9 +255,6 @@ class AccountMove(models.Model):
reversed_move = ac_move._reverse_move(date=date,
journal_id=journal_id)
reversed_moves |= reversed_move
#unreconcile all lines reversed
aml = ac_move.line_ids.filtered(lambda x: x.account_id.reconcile or x.account_id.internal_type == 'liquidity')
aml.remove_move_reconcile()
#reconcile together the reconciliable (or the liquidity aml) and their newly created counterpart
for account in set([x.account_id for x in aml]):
to_rec = aml.filtered(lambda y: y.account_id == account)