File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -614,6 +614,7 @@ def _sequence_year_range_monthly_regex(self):
614614 tracking = True ,
615615 help = "It indicates that the invoice/payment has been sent or the PDF has been generated." ,
616616 )
617+ is_move_sent_label = fields .Char (string = "Invoice Sent" , compute = "_compute_is_move_sent_label" )
617618 is_being_sent = fields .Boolean (
618619 help = "Is the move being sent asynchronously" ,
619620 compute = '_compute_is_being_sent'
@@ -765,6 +766,14 @@ def init(self):
765766 # COMPUTE METHODS
766767 # -------------------------------------------------------------------------
767768
769+ @api .depends ('is_move_sent' )
770+ def _compute_is_move_sent_label (self ):
771+ for move in self :
772+ if move .is_move_sent :
773+ move .is_move_sent_label = "Sent"
774+ else :
775+ move .is_move_sent_label = "Not Sent"
776+
768777 @api .depends ('move_type' , 'partner_id' )
769778 def _compute_invoice_default_sale_person (self ):
770779 # We want to modify the sale person only when we don't have one and if the move type corresponds to this condition
Original file line number Diff line number Diff line change 549549 invisible =" payment_state == 'invoicing_legacy' or move_type == 'entry'"
550550 optional =" show"
551551 />
552+ <field name =" is_move_sent_label"
553+ string =" Send Status"
554+ widget =" badge"
555+ decoration-success =" is_move_sent"
556+ decoration-danger =" not is_move_sent"
557+ optional =" hide"
558+ />
552559 <field name =" move_type" column_invisible =" context.get('default_move_type', True)" />
553560 <field name =" abnormal_amount_warning" column_invisible =" 1" />
554561 <field name =" abnormal_date_warning" column_invisible =" 1" />
You can’t perform that action at this time.
0 commit comments