[18.0][MIG] stock_partner_delivery_window: Migration to 18.0#1
Closed
thienvh332 wants to merge 36 commits into18.0from
Closed
[18.0][MIG] stock_partner_delivery_window: Migration to 18.0#1thienvh332 wants to merge 36 commits into18.0from
thienvh332 wants to merge 36 commits into18.0from
Conversation
Two small improvements: * add a hook to change the delivery time format * no need to display seconds, hh:mm is enough
…ry_time_preference The default value introduced by workdays feature breaks the installation of Demo databases as the change is not reflected in sale_partner_delivery_window.
… field is related
version conflict prevents upload to pypi
When copying partner, if the partner's delivery time preference is time window, time window ids should be copied as well.
Currently translated at 100.0% (27 of 27 strings) Translation: stock-logistics-workflow-16.0/stock-logistics-workflow-16.0-stock_partner_delivery_window Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_partner_delivery_window/es/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: stock-logistics-workflow-16.0/stock-logistics-workflow-16.0-stock_partner_delivery_window Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_partner_delivery_window/
Currently translated at 100.0% (27 of 27 strings) Translation: stock-logistics-workflow-16.0/stock-logistics-workflow-16.0-stock_partner_delivery_window Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_partner_delivery_window/it/
Currently translated at 100.0% (27 of 27 strings) Translation: stock-logistics-workflow-16.0/stock-logistics-workflow-16.0-stock_partner_delivery_window Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_partner_delivery_window/it/
xaviedoanhduy
approved these changes
Nov 27, 2024
| partner_id = fields.Many2one( | ||
| "res.partner", required=True, index=True, ondelete="cascade" | ||
| ) | ||
| tz = fields.Selection(related="partner_id.tz", readonly=True) |
There was a problem hiding this comment.
Suggested change
| tz = fields.Selection(related="partner_id.tz", readonly=True) | |
| tz = fields.Selection(related="partner_id.tz") |
By default, related fields are:
not stored
not copied
readonly
computed in superuser mode
| formatted_scheduled_date = format_datetime(self.env, scheduled_date) | ||
| partner = self.partner_id | ||
| if partner.delivery_time_preference == "workdays": | ||
| message = _( |
There was a problem hiding this comment.
You can replace the call to translate a string () with self.env. for getting some performance improvement in some cases. See odoo/odoo#174844.
please also get rid of the .format, see OCA/odoo-module-migrator#114
(here and in other locations; also impact translations)
f51baa7 to
ba0b1b4
Compare
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.
No description provided.