Hi everyone, I need help with the field "condition" in default values model in Odoo. I want to know how could set a condition in a default value, I tried with python expressions with fields like team_id == 3 but doesn't work.
Thanks for your help!
Odoo is the world's easiest all-in-one management software.
 It includes hundreds of business apps:
Hi everyone, I need help with the field "condition" in default values model in Odoo. I want to know how could set a condition in a default value, I tried with python expressions with fields like team_id == 3 but doesn't work.
Thanks for your help!
Hello Juan
Popup would have conditions field and value of condition based on field defined with 'change_default' = True. if change_default set true on any field then those field will be visible on condition value.
let's take an example
move_type = fields.Selection(selection=[
            ('entry', 'Journal Entry'),
            ('out_invoice', 'Customer Invoice'),
            ('out_refund', 'Customer Credit Note'),
            ('in_invoice', 'Vendor Bill'),
            ('in_refund', 'Vendor Credit Note'),
            ('out_receipt', 'Sales Receipt'),
            ('in_receipt', 'Purchase Receipt'),
        ], string='Type', required=True, store=True, index=True, readonly=True, tracking=True,
        default="entry", change_default=True)
now above account.move object has field move_type with change_default=True so this field will be visible on popup for condition field. 
Below example says payement reference set  "123" as default only if move_type is customer invoice.
Thanks & Regards,
Mobile: (+91) 8849036209
Email: info@candidroot.com
Skype: live:candidroot
Web: https://www.candidroot.com
Address: 1229-1230, Iconic Shyamal, Near Shyamal Cross Road, Ahmedabad, Gujarat
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อ| Related Posts | ตอบกลับ | มุมมอง | กิจกรรม | |
|---|---|---|---|---|
|  | 2 ม.ค. 23  | 3196 | ||
|  | 1 ม.ค. 19  | 4478 | ||
|  | 0 ธ.ค. 18  | 5912 | ||
|  | 1 มี.ค. 15  | 5572 | ||
|  | 1 ก.พ. 23  | 2452 |