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_show_button_enhance

Inputs Method Outputs
  • is_company
  • vat
"""for the button to be show
        the partner has to be a company and the partner.vat should be BE000000000"""
for rec in self:
            if rec.is_company and rec.vat and rec.vat.startswith("BE"):
                rec.cweb_show_button_enhance = True
            else:
                rec.cweb_show_button_enhance = False

Back to entity