[REF] Code quality improvements and structure fixes
- Add mypy.ini configuration to exclude migration scripts - Rename migration files to proper snake_case (post-migration.py → post_migration.py) - Add __init__.py to migration directories for proper Python package structure - Add new portal access tests for website_sale_aplicoop - Code formatting improvements (black, isort) - Update copilot instructions and project configuration Related to previous code quality refactoring work.
This commit is contained in:
parent
380d05785f
commit
cf9ea887c1
30 changed files with 1129 additions and 1102 deletions
4
website_sale_aplicoop/migrations/18.0.1.0.0/__init__.py
Normal file
4
website_sale_aplicoop/migrations/18.0.1.0.0/__init__.py
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
"""Make migrations folder a package so mypy maps module names correctly.
|
||||
|
||||
Empty on purpose.
|
||||
"""
|
||||
|
|
@ -1,9 +1,13 @@
|
|||
# Copyright 2025 Criptomart
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
|
||||
|
||||
import logging
|
||||
|
||||
from odoo import SUPERUSER_ID
|
||||
from odoo import api
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def migrate(cr, version):
|
||||
"""Migración para agregar soporte multicompañía.
|
||||
|
|
@ -27,5 +31,4 @@ def migrate(cr, version):
|
|||
(default_company.id,),
|
||||
)
|
||||
|
||||
cr.commit()
|
||||
print(f"✓ Asignado company_id={default_company.id} a group.order")
|
||||
_logger.info("Asignado company_id=%d a group.order", default_company.id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue