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

Module: Base

Entity: res.partner

Compute Method: _compute_is_company

View 19.0 View 20.0
Inputs Method Outputs
  • commercial_partner_id
  • has_vat
+ """ By default, a partner is considered as a company if they are their own
+         commercial entity (see computed field), and if their VAT is considered as being
+         valid, based on a default heuristic (not void, '/', 'na' or 'NA').
+ 
+         Each localization can then further refine this definition according to legal
+         definition of what is a company (e.g. more strict VAT, specific field usage,
+         ...) """
+ for partner in self:
+             partner.is_company = partner.commercial_partner_id == partner and partner.has_vat
  • is_company

Back to entity