From cd29f1a8149f1fde1817afbb5b6bfac18abb60ef Mon Sep 17 00:00:00 2001 From: Jacques-Etienne Baudoux Date: Sun, 1 Dec 2019 12:57:23 +0100 Subject: [PATCH] fixup! [IMP] Allow to reconcile pos order with write-off in case of paid order with a difference between total and paid amount. --- pos_autoreconcile/model/point_of_sale.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pos_autoreconcile/model/point_of_sale.py b/pos_autoreconcile/model/point_of_sale.py index dc732082..7278b5aa 100644 --- a/pos_autoreconcile/model/point_of_sale.py +++ b/pos_autoreconcile/model/point_of_sale.py @@ -28,7 +28,7 @@ class PosConfig(models.Model): writeoff_account_id = fields.Many2one( 'account.account', 'Write-Off Account', - domain=[('type','<>','view'), ('type', '<>', 'closed')]) + domain=[('type', '<>', 'view'), ('type', '<>', 'closed')]) class POSOrder(models.Model): @@ -80,7 +80,8 @@ class POSOrder(models.Model): self.pool.get('account.move.line').reconcile_partial( cr, uid, value) else: - period = self.pool['account.move'].browse(cr,uid,move_id).period_id + period = self.pool['account.move'].browse( + cr, uid, move_id).period_id self.pool.get('account.move.line').reconcile( cr, uid, value, writeoff_acc_id=session.config_id.writeoff_account_id.id,