|
1 | 1 | # Copyright 2024 Camptocamp (<https://www.camptocamp.com>).
|
2 | 2 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
3 | 3 |
|
4 |
| -from odoo import _, api, fields, models |
| 4 | +from odoo import api, fields, models |
5 | 5 | from odoo.exceptions import ValidationError
|
6 | 6 |
|
7 | 7 |
|
@@ -45,9 +45,9 @@ def action_view_is_alternative_to_pricelist(self):
|
45 | 45 | self.ensure_one()
|
46 | 46 | action = {
|
47 | 47 | "type": "ir.actions.act_window",
|
48 |
| - "name": _("Is Alternative to Pricelist"), |
| 48 | + "name": self.env._("Is Alternative to Pricelist"), |
49 | 49 | "res_model": "product.pricelist",
|
50 |
| - "view_mode": "tree,form", |
| 50 | + "view_mode": "list,form", |
51 | 51 | "domain": [("id", "in", self.is_alternative_to_pricelist_ids.ids)],
|
52 | 52 | "context": dict(self.env.context, create=False),
|
53 | 53 | }
|
@@ -91,7 +91,7 @@ def _check_pricelist_alternative_items_based_on_other_pricelist(self):
|
91 | 91 | and item.base == "pricelist"
|
92 | 92 | ):
|
93 | 93 | raise ValidationError(
|
94 |
| - _( |
| 94 | + self.env._( |
95 | 95 | "Formulas based on another pricelist are not allowed "
|
96 | 96 | "on alternative pricelists."
|
97 | 97 | )
|
|
0 commit comments