Python 3.x 从另一个odoo查看一个视图中的基本属性
我在我的设置中创建了一个名为“纸张处方”的字段:Python 3.x 从另一个odoo查看一个视图中的基本属性,python-3.x,xml,odoo,odoo-12,Python 3.x,Xml,Odoo,Odoo 12,我在我的设置中创建了一个名为“纸张处方”的字段: paper_prescriptions_exempt_forms_pres = fields.Boolean( string="Paper Prescriptions Exempt Forms Visible") res.config.settings.view.form.inherit.sale res.config.settings 处方 并希望将其称为另一个表单视图中的属性: <?xml version="1.0
paper_prescriptions_exempt_forms_pres = fields.Boolean(
string="Paper Prescriptions Exempt Forms Visible")
res.config.settings.view.form.inherit.sale
res.config.settings
处方
并希望将其称为另一个表单视图中的属性:
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="prescriptions_form" model="ir.ui.view">
<field name="name">prescriptions.prescriptions.form</field>
<field name="model">prescriptions.prescriptions</field>
<field name="arch" type="xml">
<form sting='prescriptions'>
<group col ='4' style="margin-left:50px;">
<group>
<field name="name" style="font-size:42px"/>
<field name="date_entered_by_user"/>
<group string='Paper Prescriptions'>
<group string='Forms'>
<field name="paper_prescriptions_exempt_forms" attrs="{'invisible': [('paper_prescriptions_exempt_forms_pres','=',False)]}"/>
处方。处方。表格
处方
但我得到了以下错误:
属性中使用的字段“纸张\处方\豁免\表格\压力”必须出现在视图中,但缺少:
-attrs中的“纸质处方豁免表格”=“{'invisible':[('纸质处方豁免表格','=',False)]”
任何关于如何正确执行此操作的建议都将不胜感激 纸质处方、豁免表格和压力字段是什么模式?另外,纸张处方和豁免表单是什么类型的字段?它是一个布尔值,在res\u config\u设置模型中
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="prescriptions_form" model="ir.ui.view">
<field name="name">prescriptions.prescriptions.form</field>
<field name="model">prescriptions.prescriptions</field>
<field name="arch" type="xml">
<form sting='prescriptions'>
<group col ='4' style="margin-left:50px;">
<group>
<field name="name" style="font-size:42px"/>
<field name="date_entered_by_user"/>
<group string='Paper Prescriptions'>
<group string='Forms'>
<field name="paper_prescriptions_exempt_forms" attrs="{'invisible': [('paper_prescriptions_exempt_forms_pres','=',False)]}"/>