Skip to content

Conversation

@vicire1
Copy link

@vicire1 vicire1 commented Nov 3, 2025

When cancelling an invoice the due date is still displayed in the list view even if it is not relevant anymore so I moved it when the state of the invoice is 'cancel'

task-5231323

@robodoo
Copy link

robodoo commented Nov 3, 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.

Nitpick to be done and then it will be good to gooo, and commit message to be corrected 😎

<field name="invoice_date" optional="show" column_invisible="context.get('default_move_type') not in ('out_invoice', 'out_refund', 'out_receipt')" readonly="state != 'draft'" string="Invoice Date" decoration-warning="abnormal_date_warning"/>
<field name="date" optional="hide" string="Accounting Date" readonly="state in ['cancel', 'posted']"/>
<field name="invoice_date_due" widget="remaining_days" optional="show" invisible="payment_state in ('paid', 'in_payment', 'reversed')"/>
<field name="invoice_date_due" widget="remaining_days" optional="show" invisible="payment_state in ('paid', 'in_payment', 'reversed') or state in ('cancel')"/>

Choose a reason for hiding this comment

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

no need to use the in operator there since there in only one element 😄

Suggested change
<field name="invoice_date_due" widget="remaining_days" optional="show" invisible="payment_state in ('paid', 'in_payment', 'reversed') or state in ('cancel')"/>
<field name="invoice_date_due" widget="remaining_days" optional="show" invisible="payment_state in ('paid', 'in_payment', 'reversed') or state == 'cancel'"/>

@vicire1 vicire1 force-pushed the 18.0-invinsible-due-date-cancelled-invoices-videc branch from 5d57883 to bb1068d Compare November 5, 2025 10:54
@vicire1 vicire1 changed the title [IMP] Account: Hide due date when status is cancel [IMP] account: hide due date when status is cancel Nov 5, 2025
@vicire1 vicire1 force-pushed the 18.0-invinsible-due-date-cancelled-invoices-videc branch from bb1068d to 32ee1b0 Compare November 5, 2025 14:38
When cancelling an invoice the due date is still displayed in the list view even if it is not relevant anymore so I moved it when the state of the invoice is 'cancel'
task-5231323
@vicire1 vicire1 force-pushed the 18.0-invinsible-due-date-cancelled-invoices-videc branch from 32ee1b0 to 1279bca Compare November 5, 2025 14:39
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