Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: Invoicing
Entity: res.company
Compute Method: _compute_multi_vat_foreign_country
| Inputs | Method | Outputs |
|---|---|---|
|
company_to_foreign_vat_country = {
company.id: country_ids
for company, country_ids in self.env['account.fiscal.position']._read_group(
domain=[
*self.env['account.fiscal.position']._check_company_domain(self),
('foreign_vat', '!=', False),
],
groupby=['company_id'],
aggregates=['country_id:array_agg'],
)
}
for company in self:
company.multi_vat_foreign_country_ids = self.env['res.country'].browse(company_to_foreign_vat_country.get(company.id))
|
|
