You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
437 B
15 lines
437 B
# -*- coding: utf-8 -*-
|
|
# Copyright 2019 Roberto Fichera
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
|
|
from odoo import api, models
|
|
|
|
|
|
class ResPartner(models.Model):
|
|
_inherit = 'res.partner'
|
|
|
|
@api.model
|
|
def create_from_ui(self, partner):
|
|
if 'is_company' in partner:
|
|
partner['is_company'] = partner['is_company'] == 'true'
|
|
return super(ResPartner, self).create_from_ui(partner)
|