Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
953 มุมมอง

How i can change default Individual partner !

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
3
ก.ค. 25
286
Payment joural entries issues of odoo18 แก้ไขแล้ว
3
ก.ค. 25
1656
1
ก.ค. 25
140
1
ก.ค. 25
238
2
ก.ค. 25
356