File tree Expand file tree Collapse file tree 2 files changed +9
-12
lines changed Expand file tree Collapse file tree 2 files changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -614,13 +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- is_move_sent_string = fields .Selection (
617+ is_move_sent_value = fields .Selection (
618618 selection = [
619- (" sent" , "Sent" ),
620- (" not_sent" , "Not Sent" )
619+ (' sent' , "Sent" ),
620+ (' not_sent' , "Not Sent" )
621621 ],
622622 copy = False ,
623- compute = "_compute_is_move_sent_string"
623+ compute = '_compute_is_move_sent_value'
624624 )
625625 is_being_sent = fields .Boolean (
626626 help = "Is the move being sent asynchronously" ,
@@ -849,12 +849,9 @@ def _compute_journal_id(self):
849849 move .journal_id = move ._search_default_journal ()
850850
851851 @api .depends ('is_move_sent' )
852- def _compute_is_move_sent_string (self ):
852+ def _compute_is_move_sent_value (self ):
853853 for move in self :
854- if move .is_move_sent :
855- move .is_move_sent_string = "sent"
856- else :
857- move .is_move_sent_string = "not_sent"
854+ move .is_move_sent_value = 'sent' if move .is_move_sent else 'not_sent'
858855
859856 def _get_valid_journal_types (self ):
860857 if self .is_sale_document (include_receipts = True ):
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_string "
552+ <field name =" is_move_sent_value "
553553 string =" Sent"
554554 widget =" badge"
555- decoration-danger =" is_move_sent_string == 'not_sent'"
556- decoration-success =" is_move_sent_string == 'sent'"
555+ decoration-danger =" is_move_sent_value == 'not_sent'"
556+ decoration-success =" is_move_sent_value == 'sent'"
557557 optional =" hide"
558558 />
559559 <field name =" move_type" column_invisible =" context.get('default_move_type', True)" />
You can’t perform that action at this time.
0 commit comments