fix: incorrect indicator title for portal sales order (backport #39247) (#39255)

fix: incorrect indicator title for portal sales order (#39247)

(cherry picked from commit 2d2ff7cf52a548b8e880cd212cbbe6ef4569ea28)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
mergify[bot] 2024-01-09 17:42:27 +05:30 committed by GitHub
parent bb6025ca26
commit 9f793b9b28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -582,17 +582,17 @@ class SalesOrder(SellingController):
def set_indicator(self):
"""Set indicator for portal"""
if self.per_billed < 100 and self.per_delivered < 100:
self.indicator_color = "orange"
self.indicator_title = _("Not Paid and Not Delivered")
self.indicator_color = {
"Draft": "red",
"On Hold": "orange",
"To Deliver and Bill": "orange",
"To Bill": "orange",
"To Deliver": "orange",
"Completed": "green",
"Cancelled": "red",
}.get(self.status, "blue")
elif self.per_billed == 100 and self.per_delivered < 100:
self.indicator_color = "orange"
self.indicator_title = _("Paid and Not Delivered")
else:
self.indicator_color = "green"
self.indicator_title = _("Paid")
self.indicator_title = _(self.status)
def on_recurring(self, reference_doc, auto_repeat_doc):
def _get_delivery_date(ref_doc_delivery_date, red_doc_transaction_date, transaction_date):