Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions addons/account/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,7 @@ def _sequence_year_range_monthly_regex(self):
tracking=True,
help="It indicates that the invoice/payment has been sent or the PDF has been generated.",
)
is_move_sent_label = fields.Char(string="Invoice Sent", compute="_compute_is_move_sent_label")
is_being_sent = fields.Boolean(
help="Is the move being sent asynchronously",
compute='_compute_is_being_sent'
Expand Down Expand Up @@ -765,6 +766,14 @@ def init(self):
# COMPUTE METHODS
# -------------------------------------------------------------------------

@api.depends('is_move_sent')
def _compute_is_move_sent_label(self):
for move in self:
if move.is_move_sent:
move.is_move_sent_label = "Sent"
else:
move.is_move_sent_label = "Not Sent"

@api.depends('move_type', 'partner_id')
def _compute_invoice_default_sale_person(self):
# We want to modify the sale person only when we don't have one and if the move type corresponds to this condition
Expand Down
7 changes: 7 additions & 0 deletions addons/account/views/account_move_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,13 @@
invisible="payment_state == 'invoicing_legacy' or move_type == 'entry'"
optional="show"
/>
<field name="is_move_sent_label"
string="Send Status"
widget="badge"
decoration-success="is_move_sent"
decoration-danger="not is_move_sent"
optional="hide"
/>
<field name="move_type" column_invisible="context.get('default_move_type', True)"/>
<field name="abnormal_amount_warning" column_invisible="1"/>
<field name="abnormal_date_warning" column_invisible="1"/>
Expand Down