Project

General

Profile

Actions

Task #7330

closed

Epic #7276: Đơn hàng Trả góp

[Trả góp] Thêm logic hủy/không hủy đơn trả góp

Added by Bùi Ngọc about 2 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Long Đỗ
Target version:
-
Start date:
07/24/2025
Due date:
% Done:

0%

Estimated time:

Description

- Đơn chưa hoàn thành: Hủy/Hủy hoàn trả như đơn trả thẳng
- Đơn hoàn thành và chưa map tiền và kỳ đầu tiên trong kế hoạch trả góp: được Hủy/Hoàn trả
- Đơn hoàn thành và có map tiền vào kỳ đầu tiên trong kế hoạch trả góp: không được Hủy hoàn trả và Hủy toàn bộ

Actions #1

Updated by Long Đỗ about 2 months ago

  • Status changed from Open to Waiting to test
Actions #2

Updated by Bùi Ngọc about 2 months ago

  • Status changed from Waiting to test to Testing
  • Assignee changed from Long Đỗ to Bùi Ngọc
Actions #3

Updated by Tuan Sinh about 2 months ago

  • Assignee changed from Bùi Ngọc to Tuan Sinh
Actions #4

Updated by Bùi Ngọc about 2 months ago · Edited

@longdh
1. ấn Hủy báo lỗi:
RPC_ERROR

Odoo Server Error

Occured on devcrm.stl.vn on model dth.crm.sale.order and id 96 on 2025-07-25 06:45:06 GMT

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1963, in _transactioning
return service_model.retrying(func, env=self.env)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 156, in retrying
result = func()
^^^^
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1930, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/odoo/http.py", line 2178, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 333, in _dispatch
result = endpoint(**request.params)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/odoo/http.py", line 727, in route_wrapper
result = endpoint(self, *args, **params_ok)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/dataset.py", line 42, in call_button
action = call_kw(request.env[model], method, args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/odoo/api.py", line 533, in call_kw
result = getattr(recs, name)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/extra-addons/dth_sale_installment/models/dth_crm_sale_order.py", line 26, in action_cancel_sale_order
ins_detail = r.ins_detail.filtered(lambda detail: detail.detail_type == order_constants.INSTALLMENT_DETAIL_TYPE.INSTALLMENT and detail.paid_info != False)
^
NameError: name 'r' is not defined

The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
RPC_ERROR
at makeErrorFromResponse (https://devcrm.stl.vn/web/assets/07be28b/web.assets_web.min.js:3143:163)
at XMLHttpRequest.<anonymous> (https://devcrm.stl.vn/web/assets/07be28b/web.assets_web.min.js:3148:13)

2. Đơn hoàn thành và có map tiền vào kỳ đầu tiền trong kế hoạch: vẫn cho hủy toàn bộ

Actions #5

Updated by Bùi Ngọc about 2 months ago

  • Status changed from Testing to Feedback
  • Assignee changed from Tuan Sinh to Long Đỗ
Actions #6

Updated by Long Đỗ about 2 months ago

  • Status changed from Feedback to Waiting to test
Actions #7

Updated by Bùi Ngọc about 2 months ago

  • Status changed from Waiting to test to Feedback

1. Ấn Hủy không được: https://devcrm.stl.vn/odoo/action-339/511/dth.crm.sale.order/574
2. Đơn hoàn thành và chưa map tiền vào kỳ đầu trả góp: ấn Hủy toàn bộ không được: https://devcrm.stl.vn/odoo/dth.crm.sale.order/576

Actions #8

Updated by Long Đỗ about 2 months ago

  • Status changed from Feedback to Waiting to test
Actions #9

Updated by Bùi Ngọc about 2 months ago

  • Status changed from Waiting to test to Closed dev
Actions #10

Updated by Bùi Ngọc about 2 months ago

  • Status changed from Closed dev to Closed
Actions

Also available in: Atom PDF