【发布时间】:2021-02-16 18:37:22
【问题描述】:
我想在 account.payment.register 向导的继承视图中隐藏一个字段。
这里我试过了
<record id="view_payment_register_form_inherit" model="ir.ui.view">
<field name="name">account.payment.register.form.inherit.payment.test</field>
<field name="model">account.payment.register</field>
<field name="inherit_id" ref="account.view_account_payment_register_form"/>
<field name="arch" type="xml">
<field name="communication" position="after">
<field name="new_field" attrs="{'invisible': [('journal_id.type', '=', 'bank')]}" />
</field>
</field>
</record>
更新模块时出错。
f(rec)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 685, in _tag_root
)) from e
Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 639, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 315, in _handle_exception
raise exception.with_traceback(None) from new_cause
payment.xml:5, near
【问题讨论】:
-
查看日志,应该会看到
Invalid composed field journal_id.type。
标签: javascript python xml odoo