diff --git a/odoo/addons/base/models/ir_actions.py b/odoo/addons/base/models/ir_actions.py index ab341be699f..9cbdb57ce56 100644 --- a/odoo/addons/base/models/ir_actions.py +++ b/odoo/addons/base/models/ir_actions.py @@ -6,6 +6,7 @@ from odoo import api, fields, models, tools, SUPERUSER_ID, _, Command from odoo.exceptions import MissingError, UserError, ValidationError, AccessError from odoo.osv import expression from odoo.tools.safe_eval import safe_eval, test_python_expr +from odoo.tools.float_utils import float_compare import base64 from collections import defaultdict @@ -74,6 +75,7 @@ class IrActions(models.Model): 'datetime': tools.safe_eval.datetime, 'dateutil': tools.safe_eval.dateutil, 'timezone': timezone, + 'float_compare': float_compare, 'b64encode': base64.b64encode, 'b64decode': base64.b64decode, 'Command': Command, @@ -382,6 +384,7 @@ class IrActionsServer(models.Model): # - record: record on which the action is triggered; may be void # - records: recordset of all records on which the action is triggered in multi-mode; may be void # - time, datetime, dateutil, timezone: useful Python libraries +# - float_compare: Odoo function to compare floats based on specific precisions # - log: log(message, level='info'): logging function to record debug information in ir.logging table # - UserError: Warning Exception to use with raise # - Command: x2Many commands namespace