Skip to content

Commit

Permalink
[FIX] base_multi_company
Browse files Browse the repository at this point in the history
  • Loading branch information
max3903 authored and rousseldenis committed Mar 9, 2021
1 parent f99b71c commit 050ca3a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion base_multi_company/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
'name': 'Multi Company Base',
'summary': 'Provides a base for adding multi-company support to models.',
'version': '12.0.1.0.0',
'version': '12.0.1.0.1',
'author': "LasLabs, Tecnativa, Odoo Community Association (OCA)",
'category': 'base',
'website': 'https://github.com/OCA/multi-company',
Expand All @@ -15,4 +15,6 @@
'data': [
'security/ir.model.access.csv',
],
'development_status': 'Production/Stable',
'maintainers': ['pedrobaeza'],
}
4 changes: 2 additions & 2 deletions base_multi_company/models/multi_company_abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ class MultiCompanyAbstract(models.AbstractModel):
default=lambda self: self._default_company_ids(),
)
visible_for_all_companies = fields.Boolean(
compute='_get_visible_for_all_companies',
compute='_compute_visible_for_all_companies',
store=True,
index=True,
default=True)

@api.depends('company_ids')
@api.multi
def _get_visible_for_all_companies(self):
def _compute_visible_for_all_companies(self):
for rec in self:
if not rec.company_ids:
rec.visible_for_all_companies = True
Expand Down

0 comments on commit 050ca3a

Please sign in to comment.