File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -614,6 +614,13 @@ 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+ move_sent_selection = fields .Selection (
618+ selection = [
619+ ('sent' , 'Sent' ),
620+ ('not_sent' , 'Not Sent' ),
621+ ],
622+ compute = 'compute_move_sent_selection' ,
623+ )
617624 is_being_sent = fields .Boolean (
618625 help = "Is the move being sent asynchronously" ,
619626 compute = '_compute_is_being_sent'
@@ -848,6 +855,11 @@ def _get_valid_journal_types(self):
848855 elif self .origin_payment_id or self .statement_line_id or self .env .context .get ('is_payment' ) or self .env .context .get ('is_statement_line' ):
849856 return ['bank' , 'cash' , 'credit' ]
850857 return ['general' ]
858+
859+ @api .depends ('is_move_sent' )
860+ def compute_move_sent_selection (self ):
861+ for move in self :
862+ move .move_sent_selection = 'sent' if move .is_move_sent else 'not_sent'
851863
852864 def _search_default_journal (self ):
853865 if self .statement_line_ids .statement_id .journal_id :
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 =" move_sent_selection"
553+ widget =" badge"
554+ string =" Sent"
555+ decoration-success =" move_sent_selection == 'sent'"
556+ decoration-danger =" move_sent_selection == 'not_sent'"
557+ optional =" hide" />
552558 <field name =" move_type" column_invisible =" context.get('default_move_type', True)" />
553559 <field name =" abnormal_amount_warning" column_invisible =" 1" />
554560 <field name =" abnormal_date_warning" column_invisible =" 1" />
15951601 groups =" account.group_account_secured,base.group_no_one" />
15961602 <separator />
15971603 <filter name =" not_sent"
1598- string =" Not Sent"
1604+ string =" Not Sent invoices "
15991605 domain =" [('is_move_sent', '=', False)]"
16001606 invisible =" context.get('default_move_type') in ('in_invoice', 'in_refund', 'in_receipt')"
16011607 />
1608+ <filter name =" sent"
1609+ string =" Sent invoices"
1610+ domain =" [('is_move_sent', '=', True)]"
1611+ invisible =" context.get('default_move_type') in ('in_invoice', 'in_refund', 'in_receipt')"
1612+ />
16021613 <separator />
16031614 <filter name =" out_invoice"
16041615 string =" Invoices"
You can’t perform that action at this time.
0 commit comments