Skip to content

Conversation

@jedel-odoo
Copy link

@jedel-odoo jedel-odoo commented Nov 4, 2025

In the account module, we want to help customers visualize which invoice
has been sent or not.

task-5231288

@robodoo
Copy link

robodoo commented Nov 4, 2025

This PR targets the un-managed branch odoo-dev/odoo:18.0-rd-accounting-onboarding-malb, it needs to be retargeted before it can be merged.

Copy link

@malb-odoo malb-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit message needs to be modified to fit the guidelines 😄

tracking=True,
help="It indicates that the invoice/payment has been sent or the PDF has been generated.",
)
is_move_sent_string = fields.Selection(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In python it's kind of a bad practice to name a field with his type, why ? Because the type can change at any time during the execution. So maybe we could name the field move_sent_values

Comment on lines 618 to 624
selection=[
("sent", "Sent"),
("not_sent", "Not Sent")
],
copy=False,
compute="_compute_is_move_sent_string"
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rule of thumb when working with quotes in python --> Double quote for what the user will see, and single quote for other cases 😄

Suggested change
selection=[
("sent", "Sent"),
("not_sent", "Not Sent")
],
copy=False,
compute="_compute_is_move_sent_string"
)
selection=[
('sent', "Sent"),
('not_sent', "Not Sent")
],
copy=False,
compute='_compute_is_move_sent_string'
)

Comment on lines 854 to 857
if move.is_move_sent:
move.is_move_sent_string = "sent"
else:
move.is_move_sent_string = "not_sent"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if move.is_move_sent:
move.is_move_sent_string = "sent"
else:
move.is_move_sent_string = "not_sent"
move.is_move_sent_string = 'sent' if move.is_move_sent else 'not_sent'

In the account module, we want to help customers visualize which invoice
has been sent or not.

task-5231288
@jedel-odoo jedel-odoo force-pushed the 18.0-rd-accounting-onboarding-sent-status-jedel branch from 011e0b2 to c72bfe9 Compare November 5, 2025 16:06
/>
<filter name="sent"
string="Sent Invoices"
domain="[('is_move_sent', '=', True)]"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check the not_sent filter, why not using the invisible 👀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants