-
Notifications
You must be signed in to change notification settings - Fork 117
[IMP] account: add sent status column and filters on invoice list #4874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 18.0-rd-accounting-onboarding-malb
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -340,6 +340,12 @@ def _sequence_year_range_monthly_regex(self): | |||||
| copy=False, | ||||||
| domain=[('display_type', 'in', ('product', 'line_section', 'line_note'))], | ||||||
| ) | ||||||
| invoice_sent_status = fields.Selection( | ||||||
| selection=[('sent', "Sent"), ('not_sent', "Not sent")], | ||||||
| compute='_compute_is_sent', | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Convention for the compute it should generally be like this, you take the name of the field as the name of compute (except if the compute is present on multiple field)
Suggested change
|
||||||
| copy=False, | ||||||
| store=True | ||||||
| ) | ||||||
|
|
||||||
| # === Date fields === # | ||||||
| invoice_date = fields.Date( | ||||||
|
|
@@ -781,6 +787,11 @@ def _compute_invoice_default_sale_person(self): | |||||
| else: | ||||||
| move.invoice_user_id = False | ||||||
|
|
||||||
| @api.depends('is_move_sent') | ||||||
| def _compute_is_sent(self): | ||||||
| for move in self: | ||||||
| move.invoice_sent_status = 'sent' if move.is_move_sent else 'not_sent' | ||||||
|
|
||||||
| @api.depends('sending_data') | ||||||
| def _compute_is_being_sent(self): | ||||||
| for move in self: | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -549,6 +549,7 @@ | |
| invisible="payment_state == 'invoicing_legacy' or move_type == 'entry'" | ||
| optional="show" | ||
| /> | ||
| <field name="invoice_sent_status" string="Sent" optional="hide" widget="badge" decoration-success="is_move_sent" decoration-warning="not is_move_sent"/> | ||
| <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"/> | ||
|
|
@@ -1594,6 +1595,15 @@ | |
| <filter name="not_secured" string="Not Secured" domain="[('secured', '=', False), ('state', '=', 'posted')]" | ||
| groups="account.group_account_secured,base.group_no_one"/> | ||
| <separator/> | ||
| <filter name="invoice_sent_status" | ||
| string="Sent invoices" | ||
| domain="[('invoice_sent_status', '=', 'sent')]" | ||
| /> | ||
| <filter name="invoice_sent_status" | ||
| string="Not sent invoices" | ||
| domain="[('invoice_sent_status', '=', 'not_sent')]" | ||
| /> | ||
|
Comment on lines
+1598
to
+1605
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just look at the one below, the not_sent is already present so let's do the same but for sent, no need to add those extra 😄 |
||
| <separator/> | ||
| <filter name="not_sent" | ||
| string="Not Sent" | ||
| domain="[('is_move_sent', '=', False)]" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing this change 👀