|
@ -15,6 +15,7 @@ class ResPartner(models.Model): |
|
|
|
|
|
|
|
|
@api.multi |
|
|
@api.multi |
|
|
def browse(self, arg=None, prefetch=None): |
|
|
def browse(self, arg=None, prefetch=None): |
|
|
|
|
|
if "update_relation_tab" in self.env.context: |
|
|
for tab in self._get_tabs(): |
|
|
for tab in self._get_tabs(): |
|
|
fieldname = tab.get_fieldname() |
|
|
fieldname = tab.get_fieldname() |
|
|
if fieldname not in self._fields: |
|
|
if fieldname not in self._fields: |
|
@ -71,6 +72,7 @@ class ResPartner(models.Model): |
|
|
@api.depends('is_company', 'category_id') |
|
|
@api.depends('is_company', 'category_id') |
|
|
def _compute_tabs_visibility(self): |
|
|
def _compute_tabs_visibility(self): |
|
|
"""Compute for all tabs wether they should be visible.""" |
|
|
"""Compute for all tabs wether they should be visible.""" |
|
|
|
|
|
if "update_relation_tab" in self.env.context: |
|
|
for tab in self._get_tabs(): # get all tabs |
|
|
for tab in self._get_tabs(): # get all tabs |
|
|
for this in self: |
|
|
for this in self: |
|
|
this[tab.get_visible_fieldname()] = \ |
|
|
this[tab.get_visible_fieldname()] = \ |
|
|