Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Companyweb

Entity: res.partner

Compute Method: _compute_cweb_cweb_show_tab

Inputs Method Outputs
"""for the tab with data to be shown
        at least one of the field _enable has to be true"""
for rec in self:
            if (
                rec.cweb_name_enable
                or rec.cweb_jur_form_enable
                or rec.cweb_address_enable
                or rec.cweb_creditLimit_enable
                or rec.cweb_startDate_enable
                or rec.cweb_endDate_enable
                or rec.cweb_score_enable
                or rec.cweb_warnings_enable
                or rec.cweb_url_enable
                or rec.cweb_vat_liable_enable
                or rec.cweb_balance_data_enable
                or rec.cweb_prefLang_enable
                or rec.cweb_companystatus_enable
                or rec.cweb_url_report_enable
            ):
                rec.cweb_show_tab = True
            else:
                rec.cweb_show_tab = False

Back to entity