跳至内容
菜单
此问题已终结
1 回复
889 查看
最佳答案

Hi,

In Odoo, when you create a new contact (res.partner), the default type is usually set to "Individual" (is_company = False). If you want to change the default to "Company" instead (or vice versa), you can do it by modifying the default value of the is_company field.

Try any of the following methods.

1- Change Default via Python (in a custom module)

Python

from odoo import models, fields


class ResPartner(models.Model):

    _inherit = 'res.partner'


    is_company = fields.Boolean(default=True)

2- Change Default via Studio (if using Odoo Studio)

3- Use Automated Action (if no module access)

            - Go to Settings > Technical > Automated Actions

            - Create a new action:

                         -Model: Contact

                         -Trigger: On Creation

                         - Add a server action with Python code:

                                      record.is_company = True


Hope it helps

形象
丢弃
相关帖文 回复 查看 活动
3
7月 25
1311
2
7月 25
784
0
7月 25
100
6
7月 25
2734
1
7月 25
228