Base Onchange Rules

base_onchange_rule
REPOSITORY
REPOSITORYOCA/server-tools
GIT
GIThttps://github.com/OCA/server-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-tools/tree/10.0/base_onchange_rule
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Akretion
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Akretion
COMMITTERS
COMMITTERSDavid Beal, oca-travis, OCA-git-bot, Mourad Elhadj Mimoune, Mourad
WEBSITE
WEBSITEhttps://odoo-community.org/
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:19:59
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
onchange_rule_form_view onchange.rule form New
onchange_rule_line_search onchange.rule.line search New
onchange_rule_line_tree onchange.rule.line tree New
onchange_rule_tree onchange.rule tree New
Models touched (3)

New fields (1)
  • onchange_rule_unavailable Boolean
Public methods (0)

No public methods.

New fields (7)
  • active Boolean
    default=True help='The active field allows you to make your record without effect but without remove it.'
  • company_id Many2one → res.company
    comodel_name='res.company' default=_default_company index=1 string='Company'
  • exist_restrictive_line Boolean
    compute='_compute_exist_restrictive_line'
  • model_id Many2one → ir.model
    comodel_name='ir.model' help='' required=True string='Model'
  • name Char
    required=True
  • rule_line_ids One2many → onchange.rule.line
    comodel_name='onchange.rule.line' inverse_name='onchange_rule_id' string='Onchange Rule Lines'
  • sequence Integer
Public methods (3)
  • create(self, vals)
    @api.model
  • unlink(self)
    @api.multi
  • write(self, vals)
    @api.multi

New fields (18)
  • dest_field_id Many2one → ir.model.fields
    comodel_name='ir.model.fields' help="Select field that'll be driven by onchange according to implied record." required=True string='Destination Field'
  • dest_value Char
    compute='_compute_value' string='Value'
  • implied_model Char
    help='' related='onchange_field_id.relation' string='Implied Model'
  • implied_record Reference
    help="Select the object that'll execute onchange." required=True selection='_authorised_implied_models'
  • is_restrictive_rule Boolean
    help='Restrictive rule is used to force the value of destination field.\nIf restrictive rule is False, destination value is set as default and can be modified by user' string='Restrictive Rule'
  • m2o_value Reference
    help='Final value after onchange is executed (Many2one)' selection='_authorised_destination_models' string='M2O Value'
  • method Char
    help='Name of the python function called to set value'
  • method_comment Char
    help='Explanation of the method: documentation' string='Comment'
  • model_id Many2one → ir.model
    comodel_name='ir.model' help='' related='onchange_rule_id.model_id'
  • onchange_domain Char
    help="Domain is used in on_change. Domain must be in this form: {'partner_id': [('name', '=', 'Akretion')]}" string='Domain'
  • onchange_field_id Many2one → ir.model.fields
    comodel_name='ir.model.fields' required=True string='Onchange Field'
  • onchange_rule_id Many2one → onchange.rule
    comodel_name='onchange.rule' required=True string='Onchange Rules'
  • onchange_warning Text
    string='Warning'
  • readonly Boolean
    help="If checked ensure than record can't be updated by user (only by inserted data)"
  • related_field Char
    help='Related value is used to apply the onchange value get form related fields.\nE.g.: on sale order we can apply the partner price list by using this notation: partner_id.price_list_id' string='Related Field'
  • selection_value Char
    help='Final select value after onchange is executed' string='Selection Value'
  • sequence Integer
  • val_type Selection
    help='Destination value type' selection=[('fixed', 'Fixed'), ('related', 'Related'), ('method', 'Method')] string='Type'
Public methods (3)
  • button_duplicate_record(self)
  • create(self, vals)
    @api.model
  • write(self, vals)
    @api.multi