[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:
snt 2026-02-21 13:47:16 +01:00
parent 380d05785f
commit cf9ea887c1
30 changed files with 1129 additions and 1102 deletions

View file

@ -1,8 +1,6 @@
# Copyright 2026 Your Company
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _
from odoo import api
from odoo import fields
from odoo import models
@ -41,7 +39,7 @@ class ResPartner(models.Model):
# Return action to open wizard modal
return {
"type": "ir.actions.act_window",
"name": _("Update Product Price Category"),
"name": self.env._("Update Product Price Category"),
"res_model": "wizard.update.product.category",
"res_id": wizard.id,
"view_mode": "form",

View file

@ -1,8 +1,6 @@
# Copyright 2026 Your Company
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _
from odoo import api
from odoo import fields
from odoo import models
@ -53,8 +51,8 @@ class WizardUpdateProductCategory(models.TransientModel):
"type": "ir.actions.client",
"tag": "display_notification",
"params": {
"title": _("No Products"),
"message": _("No products found with this supplier."),
"title": self.env._("No Products"),
"message": self.env._("No products found with this supplier."),
"type": "warning",
"sticky": False,
},
@ -67,9 +65,12 @@ class WizardUpdateProductCategory(models.TransientModel):
"type": "ir.actions.client",
"tag": "display_notification",
"params": {
"title": _("Success"),
"message": _('%d products updated with category "%s".')
% (len(products), self.price_category_id.display_name),
"title": self.env._("Success"),
"message": self.env._(
"%(count)d products updated with category %(category)s",
count=len(products),
category=self.price_category_id.display_name,
),
"type": "success",
"sticky": False,
},