Skip to content

Commit

Permalink
[MIG] product_state_history: Migration to 16.0
Browse files Browse the repository at this point in the history
Signed-off-by: michaelslade <48970841+michaelslade54@users.noreply.github.com>
  • Loading branch information
michaelslade54 committed Aug 31, 2023
1 parent b574788 commit 9e14da4
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 43 deletions.
2 changes: 1 addition & 1 deletion product_state_history/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Product State History",
"summary": """
Allows to store product state history for reporting purpose""",
"version": "14.0.1.0.2",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"category": "Sales",
"maintainers": ["rousseldenis"],
Expand Down
32 changes: 0 additions & 32 deletions product_state_history/migrations/14.0.1.0.1/pre-migrate.py

This file was deleted.

1 change: 0 additions & 1 deletion product_state_history/models/product_state_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class ProductStateHistory(models.Model):

_name = "product.state.history"
_description = "Product State History"
_order = "id desc"
Expand Down
9 changes: 4 additions & 5 deletions product_state_history/models/product_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ def write(self, vals):
return res

def action_product_state_history(self):
action = self.env.ref("product_state_history.product_state_history_act_window")
result = action.read()[0]
result.update({"domain": [("product_template_id", "in", self.ids)]})

return result
xmlid = "product_state_history.product_state_history_act_window"
action = self.env["ir.actions.act_window"]._for_xml_id(xmlid)
action.update({"domain": [("product_template_id", "in", self.ids)]})
return action
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class ReportProductStateHistory(models.AbstractModel):

_name = "report.product_state_history.report_product_state_history"
_description = "Product State History Report"

Expand Down
4 changes: 2 additions & 2 deletions product_state_history/tests/common.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Copyright 2020 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests.common import SavepointCase
from odoo.tests.common import TransactionCase


class CommonProductStateHistory(SavepointCase):
class CommonProductStateHistory(TransactionCase):
@classmethod
def setUpClass(cls):
super(CommonProductStateHistory, cls).setUpClass()
Expand Down
2 changes: 1 addition & 1 deletion product_state_history/tests/test_product_state_history.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright 2020 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import mock
from unittest import mock

from odoo import fields

Expand Down

0 comments on commit 9e14da4

Please sign in to comment.