Skip to content

Conversation

@danych2
Copy link

@danych2 danych2 commented Jan 26, 2026

Added delivery date to invoice header
Set delivery date to current date when posting invoices

task-5867648

Added delivery date to invoice header
Set delivery date to current date when posting invoices

task-5867648
@robodoo
Copy link

robodoo commented Jan 26, 2026

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

@FlorianGilbert FlorianGilbert marked this pull request as ready for review January 27, 2026 07:51
@robodoo
Copy link

robodoo commented Jan 27, 2026

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

Copy link

@FlorianGilbert FlorianGilbert left a comment

Choose a reason for hiding this comment

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

I know the delivery field is appearing at the top of the document if you set it but we would like to have it everytime, even when it's not filled.

Thank you!


def _post(self, soft=True):
posted = super()._post(soft=soft)
posted.filtered(lambda m: not m.delivery_date).delivery_date = fields.Date.context_today(self)

Choose a reason for hiding this comment

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

We should use the invoice_date instead.
I am wondering if there is no compute that we can override instead of overriding the _post method 🤔

Copy link
Author

Choose a reason for hiding this comment

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

Indeed, I misread the task

<odoo>
<template id="l10n_es.external_layout_standard" inherit_id="web.external_layout_standard">
<!-- And similar xpaths for the rest of the layouts -->
<xpath expr="//div[@name='company_address']" position="after">

Choose a reason for hiding this comment

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

Why didn't we put the xpath directly in report_invoice ?

Copy link
Author

Choose a reason for hiding this comment

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

It's the way I could think of to put the delivery address at the top. Otherwise it would have to into the address block (which didn't feel right) or the body of the invoice.

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