-
Notifications
You must be signed in to change notification settings - Fork 118
[ADD]l10n_es: add delivery date into the header #5000
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
[ADD]l10n_es: add delivery date into the header #5000
Conversation
|
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. |
malb-odoo
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.
It's missing the part to display the delivery date on the move it self next to the due date. And also on post if the delivery date is empty, fill it with the invoice date 😄
Btw nice addition for the delivery date in the pdf but it wasn't mandatory 👀
fec07d0 to
5fc6572
Compare
malb-odoo
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.
| @api.depends('state', 'invoice_date') | ||
| def _compute_delivery_date(self): | ||
| super()._compute_delivery_date() | ||
| for record in self: | ||
| if record.state == 'posted' and not record.delivery_date: | ||
| record.delivery_date = record.invoice_date |
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.
That's one way to do it but with a compute you will change enter that compute multiple time instead of just one when clicking the post button
Take a look at the action_post method or _post 👀
Also it's missing the part to display the delivery date on top of the form all the time 😄 Check the field show_delivery_date
| <xpath expr="//field[@name='delivery_date']" position="attributes"> | ||
| <attribute name="invisible"></attribute> | ||
| </xpath> | ||
| <xpath expr="//page[@id='other_tab']//field[@name='delivery_date']" position="attributes"> | ||
| <attribute name="readonly"></attribute> | ||
| </xpath> |
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.
Not needed with the python overrides 😄
| </t> | ||
| </div> | ||
| </xpath> | ||
| </template> |
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 wasn't very clear in the spec so won't block for that but the pdf wasn't suppose to be touched 😂
5fc6572 to
3b8c34f
Compare
- Delivery date in the header of account.move report - Change the logic of the field delivery_date to always display it and fill it with info when it's empty
3b8c34f to
fc9809e
Compare
|
I deleted the readonly xpath, I leave the invisible xpath because it the way the delivery date remains at the top of the form view. Furthermore, I checked the method action_post and I think that's the same. Finally, I changed the commit message :) |
malb-odoo
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.
Let's deploy thaaaat
| for record in self: | ||
| if record.state == 'posted' and not record.delivery_date: | ||
| record.delivery_date = record.invoice_date | ||
|
No newline at end of file |
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.
Care that you should avoid having those, you can set up you IDE to do it for you 😄 Won't block for that though ahah

TaskID - 5867738