Skip to content

Commit 5ce8a34

Browse files
migration-bot-adhocmatiasperalta1
authored andcommitted
[MIG] product_prices_update: Migration to 19.0
1 parent f520a6e commit 5ce8a34

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

product_prices_update/__manifest__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
##############################################################################
2020
{
2121
"name": "Product Prices Update",
22-
"version": "18.0.1.0.0",
22+
"version": "19.0.1.0.0",
2323
"category": "Product",
2424
"sequence": 14,
2525
"summary": "",
@@ -35,7 +35,7 @@
3535
"wizards/product_prices_update_views.xml",
3636
],
3737
"demo": [],
38-
"installable": False,
38+
"installable": True,
3939
"auto_install": False,
4040
"application": False,
4141
}

product_prices_update/wizards/product_prices_update_views.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
<field name="type">ir.actions.act_window</field>
6868
<field name="res_model">product.prices_update_wizard_result</field>
6969
<field name="view_mode">form</field>
70-
<field name="target">inline</field>
70+
<field name="target">current</field>
7171
</record>
7272

7373
</odoo>

product_prices_update/wizards/wizard_update_prices.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class ProductPricesUpdateWizard(models.TransientModel):
3030
check = fields.Boolean("Check before changing")
3131

3232
def change_prices(self):
33-
active_ids = self._context.get("active_ids", [])
33+
active_ids = self.env.context.get("active_ids", [])
3434
products_vals = []
3535
if not active_ids:
3636
raise UserError(_("You must select at least one product"))
@@ -113,11 +113,11 @@ class ProductPricesUpdateWizardResult(models.TransientModel):
113113
@api.model
114114
def _get_details(self):
115115
ret = []
116-
price_discount = self._context.get("price_discount", 0.0)
117-
price_surcharge = self._context.get("price_surcharge", 0.0)
118-
price_round = self._context.get("price_round", 0.0)
119-
product_tmpl_ids = self._context.get("product_tmpl_ids", [])
120-
price_type = self._context.get("price_type", False)
116+
price_discount = self.env.context.get("price_discount", 0.0)
117+
price_surcharge = self.env.context.get("price_surcharge", 0.0)
118+
price_round = self.env.context.get("price_round", 0.0)
119+
product_tmpl_ids = self.env.context.get("product_tmpl_ids", [])
120+
price_type = self.env.context.get("price_type", False)
121121
for product_tmpl in self.env["product.template"].browse(product_tmpl_ids):
122122
if price_type == "list_price":
123123
old_price = product_tmpl.list_price
@@ -137,7 +137,7 @@ def _get_details(self):
137137

138138
def confirm(self):
139139
products_vals = []
140-
price_type = self._context.get("price_type", False)
140+
price_type = self.env.context.get("price_type", False)
141141
for line in self.detail_ids:
142142
vals = {
143143
"product_tmpl": line.product_tmpl_id,

0 commit comments

Comments
 (0)