[19.0][MIG] migration to 19.0#6
Open
wouitmil wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Migrates the OCR addons to Odoo 19.0 by bumping module versions and adjusting a couple of model behaviors to align with newer framework patterns.
Changes:
- Bump
base_ocranddocument_ocrmodule versions to19.0.1.0.0. - Adjust OCR provider logic: fix language-mapping lookup to use the current provider type and migrate
create()to@api.model_create_multi. - Update vendor bill date parsing settings to prefer
YMDdate order.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| document_ocr/models/vendor_bill.py | Changes dateparser DATE_ORDER setting for vendor bill date parsing. |
| document_ocr/manifest.py | Bumps addon version to 19.0. |
| base_ocr/models/ocr_provider.py | Updates language mapping lookup and migrates create() to multi-create API. |
| base_ocr/manifest.py | Bumps addon version to 19.0. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+120
to
+127
| for vals in vals_list: | ||
| if vals.get("is_default"): | ||
| self.search( | ||
| [ | ||
| ("is_default", "=", True), | ||
| ("company_id", "=", vals.get("company_id", self.env.company.id)), | ||
| ] | ||
| ).write({"is_default": False}) |
Comment on lines
+120
to
+127
| for vals in vals_list: | ||
| if vals.get("is_default"): | ||
| self.search( | ||
| [ | ||
| ("is_default", "=", True), | ||
| ("company_id", "=", vals.get("company_id", self.env.company.id)), | ||
| ] | ||
| ).write({"is_default": False}) |
Comment on lines
109
to
113
| # Get the standard code (value) and then map it to target provider | ||
| standard_code = mappings[language] | ||
| # Find the key in target provider mapping that has this standard code as value | ||
| for target_code, std_code in self.LANGUAGE_MAPPINGS[target_provider].items(): | ||
| for target_code, std_code in self.LANGUAGE_MAPPINGS[self.provider_type].items(): | ||
| if std_code == standard_code: |
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.