[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
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
import logging
|
||||
|
||||
from odoo import _
|
||||
from odoo.http import request
|
||||
from odoo.http import route
|
||||
|
||||
|
|
@ -37,13 +36,13 @@ class CustomerPortal(sale_portal.CustomerPortal):
|
|||
|
||||
# Add translated day names for pickup_day display
|
||||
values["day_names"] = [
|
||||
_("Monday"),
|
||||
_("Tuesday"),
|
||||
_("Wednesday"),
|
||||
_("Thursday"),
|
||||
_("Friday"),
|
||||
_("Saturday"),
|
||||
_("Sunday"),
|
||||
request.env._("Monday"),
|
||||
request.env._("Tuesday"),
|
||||
request.env._("Wednesday"),
|
||||
request.env._("Thursday"),
|
||||
request.env._("Friday"),
|
||||
request.env._("Saturday"),
|
||||
request.env._("Sunday"),
|
||||
]
|
||||
|
||||
request.session["my_orders_history"] = values["orders"].ids[:100]
|
||||
|
|
@ -60,13 +59,13 @@ class CustomerPortal(sale_portal.CustomerPortal):
|
|||
# If it's a template render (not a redirect), add day_names to the context
|
||||
if hasattr(response, "qcontext"):
|
||||
response.qcontext["day_names"] = [
|
||||
_("Monday"),
|
||||
_("Tuesday"),
|
||||
_("Wednesday"),
|
||||
_("Thursday"),
|
||||
_("Friday"),
|
||||
_("Saturday"),
|
||||
_("Sunday"),
|
||||
request.env._("Monday"),
|
||||
request.env._("Tuesday"),
|
||||
request.env._("Wednesday"),
|
||||
request.env._("Thursday"),
|
||||
request.env._("Friday"),
|
||||
request.env._("Saturday"),
|
||||
request.env._("Sunday"),
|
||||
]
|
||||
|
||||
return response
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue