Browse Source
Merge pull request #640 from NL66278/10.0-partner_multi_relation-export
[10.0][FIX] partner_multi_relation. Fix crash when exporting all fields.
pull/604/merge
Pedro M. Baeza
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
13 additions and
0 deletions
-
partner_multi_relation/models/res_partner_relation_all.py
|
@ -455,3 +455,16 @@ CREATE OR REPLACE VIEW %%(table)s AS |
|
|
base_resource = rec.get_base_resource() |
|
|
base_resource = rec.get_base_resource() |
|
|
rec.unlink_resource(base_resource) |
|
|
rec.unlink_resource(base_resource) |
|
|
return True |
|
|
return True |
|
|
|
|
|
|
|
|
|
|
|
@api.model |
|
|
|
|
|
def fields_get(self, allfields=None, attributes=None): |
|
|
|
|
|
"""Set type_selection_id field to not exportable. |
|
|
|
|
|
|
|
|
|
|
|
Trying to export type_selection_id would result in a crash |
|
|
|
|
|
as it does not refer to a real table. |
|
|
|
|
|
""" |
|
|
|
|
|
result = super(ResPartnerRelationAll, self).fields_get( |
|
|
|
|
|
allfields=allfields, attributes=attributes) |
|
|
|
|
|
if 'type_selection_id' in result: |
|
|
|
|
|
result['type_selection_id']['exportable'] = False |
|
|
|
|
|
return result |