Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3448 Lượt xem

I want to set account_debit to '5848' if there is one, otherwise set the account to '5800'


<record id="hr_salary_rule-sau" model="hr.salary.rule">
    <field name="account_debit" search="['|',('code', '=', '5848'),('code', '=', '5800')]" />
</record>


But i think the Postgres optimizer uses the order of code in account.account rather than care about the order of precedence.

Is there a way to do this? Change the order by? Conditions in the XML?

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 3 25
2029
0
thg 11 24
1889
0
thg 6 24
1851
1
thg 6 24
2381
0
thg 10 23
2352