我有一个["&",["customer","=",True],["type","=","contact"]]
这样的域,
也具有类似{"lang":"en_US","tz":"Europe/Brussels","uid":2,"allowed_company_ids":[1],"params":{"action":157,"cids":1,"menu_id":112,"model":"crm.lead","view_type":"kanban"},"default_type":"opportunity","search_default_assigned_to_me":1}
现在,我想做的是编辑域时,如果它包含'&',那么我们的上下文将是具有新域的前一个域(意味着上下文看起来像{"lang":"en_US","tz":"Europe/Brussels","uid":2,"allowed_company_ids":[1],"params":{"action":157,"cids":1,"menu_id":112,"model":"crm.lead","view_type":"kanban"},"default_type":"opportunity","search_default_assigned_to_me":1}, "default_customer": True, "default_type":"contact")
,但是如果它包含“ |”,那么我们的上下文将是前一个(意味着现在上下文将看起来像{"lang":"en_US","tz":"Europe/Brussels","uid":2,"allowed_company_ids":[1],"params":{"action":157,"cids":1,"menu_id":112,"model":"crm.lead","view_type":"kanban"},"default_type":"opportunity","search_default_assigned_to_me":1}
)。
谁能建议如何做...