Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] storing display_name breaks contact widget in v17 as from v17 o… #735

Open
wants to merge 2 commits into
base: 17.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions partner_multi_company/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,14 @@
# Copyright 2015-2019 Pedro M. Baeza <[email protected]>
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html.html

from odoo import Command, _, api, fields, models
from odoo import Command, _, api, models
from odoo.exceptions import ValidationError


class ResPartner(models.Model):
_inherit = ["multi.company.abstract", "res.partner"]
_name = "res.partner"

# This is needed because after installation this field becomes
# unsearchable and unsortable. Which is not explicitly changed in this
# module and as such can be considered an undesired yield.
display_name = fields.Char(
compute="_compute_display_name",
store=True,
index=True,
)

@api.model_create_multi
def create(self, vals_list):
"""Neutralize the default value applied to company_id that can't be
Expand Down
Loading