summaryrefslogtreecommitdiff
path: root/fixco_custom/models/stock_picking.py
diff options
context:
space:
mode:
Diffstat (limited to 'fixco_custom/models/stock_picking.py')
-rwxr-xr-xfixco_custom/models/stock_picking.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/fixco_custom/models/stock_picking.py b/fixco_custom/models/stock_picking.py
index 449959b..cd3a963 100755
--- a/fixco_custom/models/stock_picking.py
+++ b/fixco_custom/models/stock_picking.py
@@ -316,7 +316,13 @@ class StockPicking(models.Model):
# check validity diakhir
new_move.with_context(check_move_validity=True).action_post()
-
+
+ lines_to_reconcile = (
+ account_move.line_ids + new_move.line_ids
+ ).filtered(lambda l: l.account_id.internal_type == 'receivable' and not l.reconciled)
+
+ if lines_to_reconcile:
+ lines_to_reconcile.reconcile()
return action