Skip to content

Commit

Permalink
Merge PR #2938 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by Kev-Roche
  • Loading branch information
OCA-git-bot committed May 14, 2024
2 parents a976589 + 48c5061 commit 30727af
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tracking_manager/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "Tracking Manager",
"summary": """This module tracks all fields of a model,
including one2many and many2many ones.""",
"version": "14.0.1.0.2",
"version": "14.0.1.1.0",
"category": "Tools",
"website": "https://github.com/OCA/server-tools",
"author": "Akretion, Odoo Community Association (OCA)",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/python3
# pylint: disable=print-used


def migrate(cr, version):
cr.execute(
"""
UPDATE ir_model_fields
SET custom_tracking=False
WHERE trackable=False
"""
)
4 changes: 2 additions & 2 deletions tracking_manager/models/ir_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,12 @@ class IrModelFields(models.Model):
store=True,
)

@api.depends("native_tracking")
@api.depends("native_tracking", "trackable")
def _compute_custom_tracking(self):
for record in self:
if record.model_id.automatic_custom_tracking:
domain = literal_eval(record.model_id.automatic_custom_tracking_domain)
record.custom_tracking = bool(record.filtered_domain(domain))
record.custom_tracking = record.filtered_domain(domain).trackable
else:
record.custom_tracking = record.native_tracking

Expand Down
1 change: 0 additions & 1 deletion tracking_manager/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Expand Down

0 comments on commit 30727af

Please sign in to comment.