summaryrefslogtreecommitdiff
path: root/fixco_custom/models/account_move.py
diff options
context:
space:
mode:
authorMqdd <ahmadmiqdad27@gmail.com>2026-02-27 14:21:50 +0700
committerMqdd <ahmadmiqdad27@gmail.com>2026-02-27 14:21:50 +0700
commit3a47b67ee123af57411557bf0eebeaa6e2ddc0a3 (patch)
tree67175d4a7ee46e0036209effd782687dcdb2bbfd /fixco_custom/models/account_move.py
parent149d3f03ffa0a99d032cb96fba711888d23f378c (diff)
<Miqdad> add context on creating invoices
Diffstat (limited to 'fixco_custom/models/account_move.py')
-rw-r--r--fixco_custom/models/account_move.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/fixco_custom/models/account_move.py b/fixco_custom/models/account_move.py
index 519c8d5..60e0b86 100644
--- a/fixco_custom/models/account_move.py
+++ b/fixco_custom/models/account_move.py
@@ -322,8 +322,9 @@ class AccountMove(models.Model):
if entry.move_type in ['out_invoice', 'out_refund']:
search_inv = entry.search([('move_type', '=', 'out_invoice'), ('id', '=', entry.id), ('invoice_marketplace', '=', entry.sale_id.invoice_mp)], limit=1).invoice_marketplace
entry.invoice_marketplace = search_inv
- if entry.picking_id:
- entry.invoice_date = entry.picking_id.date_done
+ if self.env.context.get('force_picking_date') == True:
+ if entry.picking_id and entry.picking_id.date_done:
+ entry.invoice_date = entry.picking_id.date_done
res = super(AccountMove, self).action_post()