-
Notifications
You must be signed in to change notification settings - Fork 118
[FIX] l10n_es: add delivery_date to header #4972
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: 19.0-l10n_es-accounting-onboarding-malb
Are you sure you want to change the base?
[FIX] l10n_es: add delivery_date to header #4972
Conversation
Added delivery date to invoice header Set delivery date to current date when posting invoices task-5867648
|
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. |
|
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
left a comment
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.
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) |
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.
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 🤔
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.
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"> |
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.
Why didn't we put the xpath directly in report_invoice ?
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.
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.
Added delivery date to invoice header
Set delivery date to current date when posting invoices
task-5867648