如何在Odoo 10窗体视图的右侧栏添加按钮?例如,我在扩展sale.order.form
视图具有以下字段:在Odoo窗体视图的右侧栏添加按钮
<xpath expr="//div[@name='carrier_selection']" position="after">
<field name="x_shipping_method_id" options="{'no_create': True, 'no_open': True}"/>
<field name="x_shipping_cost"/>
<field name="x_staff_notes" attrs="{'invisible': [('x_staff_notes', '=', False)]}"/>
<field name="x_custom_products" attrs="{'invisible': [('x_custom_products', '=', False)]}"/>
<field name="x_is_custom_products_acknowledged" invisible="1"/>
<button name="434" type="action" string="Acknowledge Custom Products" class="oe_highlight" attrs="{'invisible': ['|',('x_custom_products', '=', False),'&',('x_custom_products', '!=', False), ('x_is_custom_products_acknowledged', '=', True)]}"/>
</xpath>
这导致与左边的标签,右边的值网格添加新的领域。我希望将按钮元素添加到此网格的右侧列。目前它被放置在标签下方的左侧列中,但我希望它位于右侧列中的值下方。 Odoo可以吗?
这是一个准备好的截图,试图展示我正在努力完成的任务。我只想将按钮放在新的一行中,但是在右列中对齐,并使用上面的值。
见我已经更新了我的答案实现这一目标。 –