Skip to content

[19.0][MIG] migration to 19.0#6

Open
wouitmil wants to merge 1 commit into
0yik:18.0from
baboum-dev:19.0
Open

[19.0][MIG] migration to 19.0#6
wouitmil wants to merge 1 commit into
0yik:18.0from
baboum-dev:19.0

Conversation

@wouitmil
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_ocr and document_ocr module versions to 19.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 YMD date 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:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants