[IMP] l10n_se: add delivery date to invoice - #5228
Draft
gato-odoo wants to merge 2 commits into
Draft
Conversation
Add delivery date to the invoice to comply with Swedish legislation task-6438916
If an invoice is posted with a delivery date, automatically set the delivery date to the invoice date. If the invoice date is not set either, fall back to current date. task-6438916
|
This PR targets the un-managed branch odoo-dev/odoo:19.0-onboarding-august-malb, it needs to be retargeted before it can be merged. |
SaddemAmine
reviewed
Aug 10, 2026
Comment on lines
+86
to
+87
|
|
||
|
|
Comment on lines
+88
to
+92
| def _post(self, soft=True): | ||
| for move in self: | ||
| if move.country_code == 'SE' and move.is_sale_document() and not move.delivery_date: | ||
| move.delivery_date = move.invoice_date or fields.Date.context_today(self) | ||
| return super()._post(soft) |
| def _post(self, soft=True): | ||
| for move in self: | ||
| if move.country_code == 'SE' and move.is_sale_document() and not move.delivery_date: | ||
| move.delivery_date = move.invoice_date or fields.Date.context_today(self) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Show delivery date on the invoice for the Swedish localisation.
If the invoice is pushed with no delivery date set, automatically set the delivery date to the invoice date instead.
If the invoice date is also not set, fall back to the current date.
task-6438916