diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2025-05-26 12:00:26 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2025-05-26 12:00:26 +0700 |
| commit | 1752661b5e580fde5f8a1906406da0e327221b17 (patch) | |
| tree | 1880672e37f9179e760fb5d2d6a46118685c3dcc /fixco_custom | |
| parent | 3743daa204adfe208f6819b30c5d8c96e0c88433 (diff) | |
push
Diffstat (limited to 'fixco_custom')
| -rwxr-xr-x | fixco_custom/models/detail_order.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fixco_custom/models/detail_order.py b/fixco_custom/models/detail_order.py index 54d3a0a..3eb70b4 100755 --- a/fixco_custom/models/detail_order.py +++ b/fixco_custom/models/detail_order.py @@ -126,6 +126,8 @@ class DetailOrder(models.Model): records = self.search(domain, order='create_date asc', limit=limit) for rec in records: rec.execute_queue_detail() + + return True def prepare_data_so(self, json_data): data = { @@ -184,6 +186,7 @@ class DetailOrder(models.Model): self.picking_id.order_reference = order_id self.execute_status = 'so_confirm' + self.env.cr.commit() else: sale_orders = self.env['sale.order'].search([('order_reference', '=', order_id)]) if not sale_orders: @@ -202,6 +205,9 @@ class DetailOrder(models.Model): else: self.sale_id = sale_orders.id self.execute_status = 'already_so' + self.env.cr.commit() + + except Exception as e: self.write({ |
